File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,6 @@ module cpu_pipelined(
363363 assign reg_rd = mem_wb_rd_fixed;
364364
365365 // End of Program
366- assign end_program = mem_wb_nop_instruction;
366+ assign end_program = mem_wb_nop_instruction & ~ branch_predicted ;
367367
368368endmodule
Original file line number Diff line number Diff line change @@ -16,10 +16,11 @@ module testbench_pipelined();
1616 reset = 1 ;
1717
1818 // Initialize instruction memory first
19- cpu.imem.memory[0 ] = 32'b00000000000000000000010001100011 ;
20- cpu.imem.memory[1 ] = 32'b00000000001100000000001100010011 ;
21- cpu.imem.memory[2 ] = 32'b00000000010000000000001010010011 ;
22- cpu.imem.memory[3 ] = 32'b00000000000000000000000000000000 ;
19+ cpu.imem.memory[0 ] = 32'b00000000000000000000100001100011 ;
20+ cpu.imem.memory[1 ] = 32'b00000000010000000000001010010011 ;
21+ cpu.imem.memory[2 ] = 32'b00000000010000000000001100010011 ;
22+ cpu.imem.memory[3 ] = 32'b00000000010000000000001110010011 ;
23+ cpu.imem.memory[4 ] = 32'b00000000000000000000000000000000 ;
2324
2425 // promper initialization
2526 #10 reset = 0 ;
You can’t perform that action at this time.
0 commit comments