This repo aims to help you with your very first VHDL codes and digital designs. There are also many sources on internet, especially for spesific projects such as VGA drive, 7 segment displays and even for RISC based microcontroller/processor architectures.
As text editor Visual Studio Code and for simulations ModelSim are used in this repo.
Note #1: If you already have any IDE or programs to simulate/synthesize your design, these installations are not important. You can also try these codes on your IDE.
Note #2: Also "Modern VHDL" extension pack is used for writing VHDL code easier. After installation, you also can download and install by searching it in extension packs tab in VSCode.
Note #3: For MAC users also there are GHDL and GTKWave programs.
Basically, you can open files with ".mpf" extensions on ModelSim and compile the design files. Testbenches are named as "_CodeName_tb.vhd". Start simulation on a testbench, add your waves to simulation and run within dedicated time on the tab on top of the program. A simulation of RAM design is shown below:
- Go to File > New > Project.
- Enter your project name.
- Choose your project location path.
- Click OK and choose "Add Existing Files".
- Add your design and testbench.
- Click OK. Your project is created.
Simulation process differs from project to project. However, most basic logic is processed in this manual.
- Go to Compile > Compile All. This compiles your VHDL codes included in your project. If compile is successful, continue with simulation part:
- Go to Simulate > Start Simulation. A new window will pop up.
- Under "work" directory, choose your testbench file and click OK.
- On left panel, in "sim" layout, right click on your unit under test (UUT).
- Click Add Waves. All objects will be displayed on "Wave" layout.
- On the tab, click "Run". This process runs your simulation in dedicated time near Run button.