-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Re-organized everything and edited scripts to automate compiling and …
…running. Also added many READMEs to try and make things clearer
- Loading branch information
1 parent
ab80c8e
commit 6e57b93
Showing
3 changed files
with
54 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,34 @@ | ||
# fake_fpga | ||
A GUI pretending to be a DE1 for visualizing Verilog sims | ||
|
||
# Compile and run | ||
# Compiling | ||
|
||
Make sure you have installed Icarus Verilog, and on a Linux system, use: | ||
To compile the GUI, run `make` in the `GUI` folder. There are | ||
instructions in GUI/README.txt to help you get started. | ||
|
||
To compile the Modelsim plugin, follow the instructions in | ||
`simulation/include/README.txt` and `simulation/lib/README.txt` which | ||
ask you to copy come files from the modelsim install folder. Then, run | ||
`make` in the `simulation` folder. | ||
|
||
# Running | ||
|
||
To run the GUI, just double-click `run.bat` in the `GUI` folder. Do | ||
this before starting the simulation. By the way, this batch file can be | ||
sourced from inside `bash` on a Linux system. | ||
|
||
Likewise, you can just double-click `demo.bat` in the `demo` folder to | ||
run the demo. Note that this script uses relative paths to find | ||
`fakefpga.vpi` (the thing you make when you run `make` in the | ||
`simulation` directory), so you may need to edit the last line if your | ||
files are in different folders. By the way, `demo.bat` can also be | ||
sourced on Linux. | ||
|
||
# Acknowledgements | ||
|
||
We would like to thank Ruiqi Wang for helping with the GUI. | ||
|
||
# Problems? | ||
|
||
Contact me at [email protected] | ||
|
||
``` | ||
$ make | ||
$ make run | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
vlib work | ||
vlog hello.v | ||
vlog tb.v | ||
vsim -pli ../simulation/fakefpga.vpi -c -do "run -all" tb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
This Makefile depends on the GNU find command. I installed make and find | ||
on my Windows computer via MinGW. | ||
|
||
Brief instructions for installing make find: | ||
1. Download the mingw-get package manager from | ||
https://osdn.net/projects/mingw/releases/. | ||
2. From this package manager, install the mingw32-make and the | ||
msys-findutils "bin" packages. | ||
3. Edit your system's PATH variable to include "C:\MinGW\bin" and | ||
"C:\MinGW\msys\1.0\bin". (These file locations may be slightly | ||
different on your computer. You can double-check if they're right | ||
by making sure the first one has "make.exe" in it and the second | ||
one has "find.exe" in it). | ||
|
||
The Makefile also invokes the java compiler and archiver. Here is the | ||
output of `java -version` on my computer: | ||
|
||
java version "14.0.2" 2020-07-14 | ||
Java(TM) SE Runtime Environment (build 14.0.2+12-46) | ||
Java HotSpot(TM) 64-Bit Server VM (build 14.0.2+12-46, mixed mode, sharing) | ||
|