mirror of
https://github.com/supleed2/ELEC50010-IAC-CW.git
synced 2024-11-10 01:35:49 +00:00
Add testcases and ref outputs for addiu, and, andi
This commit is contained in:
parent
1bf7b5d40e
commit
7ffd8fb400
1
inputs/addiu.ref.txt
Normal file
1
inputs/addiu.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
30
|
3
inputs/addiu.txt
Normal file
3
inputs/addiu.txt
Normal file
|
@ -0,0 +1,3 @@
|
|||
3404000a
|
||||
24820014
|
||||
00000008
|
1
inputs/and.ref.txt
Normal file
1
inputs/and.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
10
|
4
inputs/and.txt
Normal file
4
inputs/and.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
3404000A
|
||||
3405000F
|
||||
00851024
|
||||
00000008
|
1
inputs/andi.ref.txt
Normal file
1
inputs/andi.ref.txt
Normal file
|
@ -0,0 +1 @@
|
|||
5
|
5
inputs/andi.txt
Normal file
5
inputs/andi.txt
Normal file
|
@ -0,0 +1,5 @@
|
|||
34040005
|
||||
3082000f
|
||||
00000008
|
||||
00000000
|
||||
00000000
|
|
@ -45,7 +45,7 @@ module mips_cpu_memory(
|
|||
|
||||
//Synchronous write path
|
||||
always_ff @(posedge clk) begin
|
||||
$display("Instruction Read: %h", instr_readdata);
|
||||
//$display("Instruction Read: %h", instr_readdata);
|
||||
//$display("RAM : INFO : data_read=%h, data_address = %h, mem=%h", data_read, data_address, memory[data_address]);
|
||||
if (!data_read & data_write) begin //cannot read and write to memory in the same cycle
|
||||
if (instr_address != data_address) begin //cannot modify the instruction being read
|
||||
|
|
Loading…
Reference in a new issue