Commit c7ce30f9 authored by Tristan Gingold's avatar Tristan Gingold

Fix crash in simulation due to out of bounds error.

parent 575d2ac2
...@@ -310,7 +310,7 @@ begin ...@@ -310,7 +310,7 @@ begin
process (clk_i) process (clk_i)
begin begin
if rising_edge(clk_i) then if rising_edge(clk_i) then
s_cr_data <= s_cr_rom(to_integer(s_addr)); s_cr_data <= s_cr_rom(to_integer(s_addr) mod 1024);
end if; end if;
end process; end process;
...@@ -488,7 +488,7 @@ begin ...@@ -488,7 +488,7 @@ begin
s_cram_we <= we_i and s_cram_access; s_cram_we <= we_i and s_cram_access;
s_cram_waddr <= s_addr - c_BEG_CRAM; s_cram_waddr <= s_addr - c_BEG_CRAM;
s_cram_data <= s_cram(to_integer(s_cram_raddr)); s_cram_data <= s_cram(to_integer(s_cram_raddr) mod c_CRAM_SIZE);
process (clk_i) begin process (clk_i) begin
if rising_edge(clk_i) then if rising_edge(clk_i) then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment