Skip to content

Commit

Permalink
Re-organized everything and edited scripts to automate compiling and …
Browse files Browse the repository at this point in the history
…running. Also added many READMEs to try and make things clearer
  • Loading branch information
esophagus-now committed Aug 12, 2020
1 parent ab80c8e commit 6e57b93
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 6 deletions.
35 changes: 29 additions & 6 deletions README.md
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
```
4 changes: 4 additions & 0 deletions demo/demo.bat
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
21 changes: 21 additions & 0 deletions gui/README.txt
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)

0 comments on commit 6e57b93

Please sign in to comment.