Skip to content

Commit

Permalink
Fix issue #1 on github, byte address should always be 0
Browse files Browse the repository at this point in the history
  • Loading branch information
atraber committed Apr 26, 2016
1 parent 101ef71 commit df014ec
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions if_stage.sv
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ module riscv_if_stage
.req_i ( req_i ),

.branch_i ( branch_req ),
.addr_i ( fetch_addr_n ),
.addr_i ( {fetch_addr_n[31:1], 1'b0} ),

.hwloop_i ( hwlp_jump ),
.hwloop_target_i ( hwlp_target ),
Expand Down Expand Up @@ -191,7 +191,7 @@ module riscv_if_stage
.req_i ( 1'b1 ),

.branch_i ( branch_req ),
.addr_i ( fetch_addr_n ),
.addr_i ( {fetch_addr_n[31:1], 1'b0} ),

.hwloop_i ( hwlp_jump ),
.hwloop_target_i ( hwlp_target ),
Expand Down Expand Up @@ -382,4 +382,8 @@ module riscv_if_stage
assert property (
@(posedge clk) (instr_gnt_i) |-> (instr_req_o) );

// make sure LSB of fetch_addr_n is always 0
assert property (
@(posedge clk) (req_i) |-> (~fetch_addr_n[0]) );

endmodule

0 comments on commit df014ec

Please sign in to comment.