![]() |
|
| loadi | Load immediate from program memory |
| loadm | Load memory from RAM |
| store | Store memory into RAM |
| add | Sum of two regiesters |
| subt | Difference of two registers |
| and | Logical and of two registers |
| or_r | Logical or of two registers |
| Xor_r | Logical xor of two registers |
| shr_r | Shift right operand |
| shl_r | Shift left operand |
| sign | Check for sign, used for jump is less than zero |
| jnz | Check for zero, used for jump if not zero |
| halt | Halt the program |
| Step 1: | Download and untar the provided source files from below. |
| Step 2: | Edited assembly source file you are interested on
running on the processor(such as mult or gcd) and insert values you wish to process.
Alternatively you can create your own assembly source files if you are careful to use only
the instructions available in the proper format(see section on creating your own assembly
source files below). Now run the assemble program on your file(usage: assemble |
| Step 3: | Simlulate the processor with synopsys using the script file provided, zsim.scr. You may have to set permissions to run this file. If you wish to track the wave forms as the simulation runs, click the Misc button, then hierarchy browser. Select through the components and find the targets that you wish to track. After double clicking, the waveform window should appear. If it is empty, close it and reselect the target until it appears(bug?). Next click view, then full name to display only the filename(you can also compress here if you have more than fit in the window). Now click back to the debugger and in the box next to run input the time to run the simulation for. You may continue running, so if you're interested in watching the waveform as it progresses you can enter a relatively small amount, say 1000. Otherwise enter slightly more than the testbench assert wait time you entered earlier. |
| Step 4: | To synthesize the processor, run the script zsyn.scr. After each file has been analyzed(this could take some awhile), edit each gate file that was created. Comment out the line 15, that begins with "type UNSIGNED is array (INTEGER ", by adding -- to the beginning of the file. Next run the script file zgatesim.scr. Now you can simulate the synthesys in the same way you did before. |
|
|
All vhdl source files and scripts needed to run the simulations and synthesys. |
|
|
The assembler program including C++ source file and a readme containing guidlines for writing programs to be assembled with this. |
|
| Arithmatic logic unit, where all mathmatic operations are conducted |
|
| Control unit, handles the states and signal changes for each state |
| Library file that contains all constant variables | |
| This unit's sole purpose is to tie all the other units together | |
| 3X1 multiplexor unit | |
| tri-state buffer that prevents output until program has halted | |
| The program's RAM storage | |
| 32-bit register file | |
| Program memory(ROM) | |
| Shifter unit to shift left or right | |
| Returns the sign of the word that is passed in | |
| Test bench file with assert statement to check for correct output | |
| Checks whether passed in word is equal to zero | |
| Executable to assemble simple programs into ROM files | |
| Simple program for division | |
| Simple program to execute fibonacci sequence | |
| Simple program to calculate greatest common divisor | |
| Source file for assemble program | |
| Makefile for compiling assemble source | |
| Simple program to preform multiplication | |
| Simple program to perform binary "ones count" | |
| Simple program to raise int to int power | |
| Simple program to determine sign of a value |
