Skip to content

Commit

Permalink
verification: ahb_sif: Use legal index value
Browse files Browse the repository at this point in the history
  • Loading branch information
tmichalak committed Dec 23, 2024
1 parent 619b542 commit 341774d
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions testbench/ahb_sif.sv
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ module axi_slv #(

bit [7:0] mem[bit [31:0]];
bit [31:0] write_address;
bit [31:0] read_address;

initial begin
wready = 1;
Expand All @@ -193,15 +194,16 @@ module axi_slv #(

always @(posedge aclk) begin
if (arvalid && arready) begin
read_address = araddr;
rdata <= {
mem[araddr+7],
mem[araddr+6],
mem[araddr+5],
mem[araddr+4],
mem[araddr+3],
mem[araddr+2],
mem[araddr+1],
mem[araddr]
mem[read_address+7],
mem[read_address+6],
mem[read_address+5],
mem[read_address+4],
mem[read_address+3],
mem[read_address+2],
mem[read_address+1],
mem[read_address]
};
arready <= 0;
rvalid <= 1;
Expand Down

0 comments on commit 341774d

Please sign in to comment.