Pass blez test

This commit is contained in:
2024-07-11 00:14:59 +08:00
parent 7e0cbc33e6
commit 15e6ea796b
3 changed files with 17 additions and 10 deletions

View File

@@ -7,15 +7,22 @@ module InstructionMemory (
always @(*) begin
case (address[31:2])
20'd0: instruction <= 32'h20110001; // addi $s1, $zero, 1
20'd6: instruction <= 32'h16320009; // bne $s1, $s2, bne_target
20'd11: instruction <= 32'h20130001; // addi $s3, $zero, 1
// bne_target:
20'd16: instruction <= 32'h20120001; // addi $s2, $zero, 1
20'd21: instruction <= 32'h16320009; // bne $s1, $s2, bne_target2
20'd26: instruction <= 32'h20130002; // addi $s3, $zero, 2
// bne_target2:
20'd31: instruction <= 32'h0810001e; // j bne_target2
20'd0: instruction <= 32'h2010fffe; // addi $s0, $zero, -2
20'd1: instruction <= 32'h00000000;
20'd2: instruction <= 32'h00000000;
20'd3: instruction <= 32'h00000000;
20'd4: instruction <= 32'h00000000; // start:
20'd5: instruction <= 32'h22100001; // addi $s0, $s0, 1
20'd6: instruction <= 32'h00000000;
20'd7: instruction <= 32'h00000000;
20'd8: instruction <= 32'h00000000;
20'd9: instruction <= 32'h00000000;
20'd10: instruction <= 32'h1a00fffa; // blez $s0, start
20'd11: instruction <= 32'h00000000;
20'd12: instruction <= 32'h00000000;
20'd13: instruction <= 32'h00000000;
20'd14: instruction <= 32'h00000000; // end:
20'd15: instruction <= 32'h0810000f; // j end
default: instruction <= 32'h00000000;
endcase
end

View File

@@ -60,7 +60,7 @@
<Option Name="IPStaticSourceDir" Val="$PIPUSERFILESDIR/ipstatic"/>
<Option Name="EnableBDX" Val="FALSE"/>
<Option Name="FeatureSet" Val="FeatureSet_Classic"/>
<Option Name="WTXSimLaunchSim" Val="192"/>
<Option Name="WTXSimLaunchSim" Val="194"/>
<Option Name="WTModelSimLaunchSim" Val="0"/>
<Option Name="WTQuestaLaunchSim" Val="0"/>
<Option Name="WTIesLaunchSim" Val="0"/>