- Praveen Kumar Gupta
- Durvesh Bhalekar
This verilog program shows the simulation of a 8-bit processor built on the principles of the Von Neumman architecture. The program can be loaded in the RAM module and the following code carries out the instructions accordingly.
This processor allows supported instructions (as given in the Instruction Set file) to be written in the RAM module.
An Instruction cycle is broken into 3 phases - Fetch , Decode and Execute
Instructions from RAM Module are fetched into the Instruction Register on the appropriate phase, it is decoded by the control unit which sets various flags and select lines depending on the type of instruction, like
- fetching into immediate register
- writing in register file
- changing PC value
- selecting address from imm. or PC
- selecting the correct register from RF
- Deciding the ALU operation
- Sending the ALU output to the required place.
- Logisim
- iverilog
- gtkwave
-
Open either Behavioural or Dataflow Modelling Verilog file for CPU.
-
From the given Instruction Set table, write 8-Bit binary instructions in the given RAM module at the end of the file.
-
Sample instructions are already present. Overwrite it if needed.
-
Enable Simulation.
Compile the file as
` iverilog VerilogBM-210-235.v Verilog-210-235.v -o Verilog-210-235.vvp `
Run the vvp file as
` vvp Verilog-210-235.vvp `
Open the output wave as
` gtkwave VerilogBM-210-235.vcd `
Corresponding changes can be seen in the wave as per instructions.
- Computer Organization and Design - Book by David Patterson and John Hennessy
- Computer Architechture Tutorials