Tested the instructions using the instruction memory
All of the instructions seem to be working other than beq. I might just be calling it wrong
This commit is contained in:
@@ -10,12 +10,32 @@ module instructionMemory(
|
||||
|
||||
initial begin
|
||||
//Equation Solver
|
||||
memory[0] <= 9'b000100000;
|
||||
memory[1] <= 9'b000101000;
|
||||
memory[2] <= 9'b010100010;
|
||||
memory[3] <= 9'b111100000;
|
||||
memory[4] <= 9'b111100000;
|
||||
memory[5] <= 9'b000000000;
|
||||
memory[0] <= 9'b000000000;
|
||||
memory[1] <= 9'b000100000; //load
|
||||
memory[2] <= 9'b000101000; //load
|
||||
memory[3] <= 9'b010100010; //add
|
||||
memory[4] <= 9'b111100000; //shift left
|
||||
memory[5] <= 9'b111100000; //shift left
|
||||
|
||||
//Testing all instructions
|
||||
memory[6] <= 9'b010100011; //sub
|
||||
memory[7] <= 9'b011001011; //addi
|
||||
memory[8] <= 9'b011110000; //slt
|
||||
memory[9] <= 9'b110111000; //nor
|
||||
memory[10] <= 9'b111011000; //or
|
||||
memory[11] <= 9'b111011001; //and
|
||||
memory[12] <= 9'b111111000; //sll
|
||||
memory[13] <= 9'b111111001; //srl
|
||||
// memory[14] <= 9'b100101100; //j
|
||||
memory[14] <= 9'b110001001; //beq
|
||||
memory[15] <= 9'b100001000; //jr
|
||||
|
||||
|
||||
|
||||
|
||||
memory[16] <= 9'b000000000;
|
||||
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user