What is FPGA (Field Programmable Gate Array)
Or, read Wiki, https://en.wikipedia.org/wiki/Field-programmable_gate_array
Installing Simulator
There are several simulators, and someone suggested to use Icarus Verilog (http://iverilog.icarus.com/) as it is light.
Environment: Ubuntu 20.04
I've originally downloaded the source code and compiled, but later found Ubuntu already has apt package ready.
Reference video, https://www.youtube.com/watch?v=xd-ZvBJiv3M -- this is in Chinese, so no clue what the video uploader is saying, but you can just watch the video with steps. I wrote the steps here to avoid watching the whole thing.
Testing Simulator #1
1. Create project directory
$ mkdir verilog_test1
2. Using VSC, edit a file called "test1.v" in the directory created above:
3. compile the code
4. Run it
$ vvp test1
Testing Simulator #2
This is from https://www.youtube.com/watch?v=3Xm6fgKAO94, and it also shows installing Icarus Verilog on Windows.
1. Create two files
hello.v:
hello_tb.v:
2. Compile and run
$ iverilog -o hello_tb.vvp hello_tb.v
$ vvp hello_tb.vvp
VCD info: dumpfile hello_tb.vcd opened for output.
Test complete
hello_tb.vvp file is created.
3. View wave
$ gtkwave hello_tb.vcd
or, File > Open Tab > and select "hello_tb.vcd"
In left nav, lower pane, select both reg A, wire B. Then click on "Insert" button.
No comments:
Post a Comment