One very good thing about this is that it makes it easy to create test cases directly in C++. You just supply inputs and clock the simulation directly in a C++ loop, then read outputs and assert them with
assert()
. And you can inspect variables by printing them or with GDB. This is infinitely more convenient than doing these IO-type tasks in Verilog itself.Some simulation examples under verilog.
First install Verilator. On Ubuntu:Tested on Verilator 4.038, Ubuntu 22.04.
sudo apt install verilator
Run all examples, which have assertions in them:
cd verilator
make run
File structure is for example:
- verilog/counter.v: Verilog file
- verilog/counter.cpp: C++ loop which clocks the design and runs tests with assertions on the outputs
- verilog/counter.params: gcc compilation flags for this example
- verilog/counter_tb.v: Verilog version of the C++ test. Not used by Verilator. Verilator can't actually run out
_tb
files, because they do in Verilog IO things that we do better from C++ in Verilator, so Verilator didn't bother implementing them. This is a good thing.
Example list:
- verilog/negator.v, verilog/negator.cpp: the simplest non-identity combinatorial circuit!
- verilog/counter.v, verilog/counter.cpp: sequential hello world. Synchronous active high reset with active high enable signal. Adapted from: www.asic-world.com/verilog/first1.html
- verilog/subleq.v, verilog/subleq.cpp: subleq one instruction set computer with separated instruction and data RAMs
Opens a virtual MIDI piano GUI. It just works on Ubuntu 20.04: askubuntu.com/questions/34391/virtual-midi-piano-keyboard-setup/1298026#1298026
VMPK is a virtual device that replicates what you would get by connecting a physical MIDI keyboard to your computer. It is not a software synthesizer on its own. But it does connect to a working synthesizer by default (Sonivox EAS) which makes it produce sounds out-of-the box.
TODO: then I messed with my sound settings, and then it stopped working by default on the default "MIDI Connection" > "MIDI Out Driver" > "Network". But it still works on "SonivoxEAS".
A hello world of actually connecting it to a specific software synthesizer manually on Advanced Linux Sound Architecture with
aconnect
can be found at: askubuntu.com/questions/34391/virtual-midi-piano-keyboard-setup/1298026#1298026Save to a MIDI file: askubuntu.com/questions/709673/save-as-midi-when-playing-from-vmpk-qsynth/1298231#1298231
Reasonable default key mappings to keyboard covering 2 octaves.
3 multiple simultaneous keys did not work (tested "ZQI"). This might just be a limitation of my keyboard however.
TODO how to save to a
.mid
file? askubuntu.com/questions/709673/save-as-midi-when-playing-from-vmpk-qsynthCreated by Dr. Rod Nave from Georgia State University, where he worked from 1968 after his post-doc in North Wales on molecular spectroscopy.
While there is value to that website, it always feels like it falls a bit too short as too "encyclopedic" and too little "tutorial-like". Most notably, it has very little on the history of physics/experiments.
Ciro Santilli likes this Rod, he really practices some good braindumping, just look at how he documented his life in the pre-social media Internet dark ages: hyperphysics.phy-astr.gsu.edu/Nave-html/nave.html
The website evolved from a HyperCard stack, as suggested by the website name, mentioned at: hyperphysics.phy-astr.gsu.edu/hbase/index.html.
Shame he was too old for CC BY-SA, see "Please respect the Copyright" at hyperphysics.phy-astr.gsu.edu/hbase/index.html.
exhibits.library.gsu.edu/kell/exhibits/show/nave-kell-hall/capturing-a-career has some good photo selection focused on showing the department, and has an interview.
Kell hall is a building of GSU that was demolished in 2019: atlanta.curbed.com/2020/1/31/21115980/gsu-georgia-state-atlanta-kell-hall-demolition-park-library-north
There are unlisted articles, also show them or only show them.