Merge pull request #316 from antonblanchard/verilator-fix

Rename 'do' signal to avoid verilator System Verilog warning
pull/320/head
Paul Mackerras 3 years ago committed by GitHub
commit 8cdb00652b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,8 +17,8 @@ entity main_bram is
port( port(
clk : in std_logic; clk : in std_logic;
addr : in std_logic_vector(HEIGHT_BITS - 1 downto 0) ; addr : in std_logic_vector(HEIGHT_BITS - 1 downto 0) ;
di : in std_logic_vector(WIDTH-1 downto 0); din : in std_logic_vector(WIDTH-1 downto 0);
do : out std_logic_vector(WIDTH-1 downto 0); dout : out std_logic_vector(WIDTH-1 downto 0);
sel : in std_logic_vector((WIDTH/8)-1 downto 0); sel : in std_logic_vector((WIDTH/8)-1 downto 0);
re : in std_ulogic; re : in std_ulogic;
we : in std_ulogic we : in std_ulogic
@ -68,14 +68,14 @@ begin
for i in 0 to 7 loop for i in 0 to 7 loop
if sel(i) = '1' then if sel(i) = '1' then
memory(to_integer(unsigned(addr)))((i + 1) * 8 - 1 downto i * 8) <= memory(to_integer(unsigned(addr)))((i + 1) * 8 - 1 downto i * 8) <=
di((i + 1) * 8 - 1 downto i * 8); din((i + 1) * 8 - 1 downto i * 8);
end if; end if;
end loop; end loop;
end if; end if;
if re = '1' then if re = '1' then
obuf <= memory(to_integer(unsigned(addr))); obuf <= memory(to_integer(unsigned(addr)));
end if; end if;
do <= obuf; dout <= obuf;
end if; end if;
end process; end process;



@ -21,8 +21,8 @@ entity main_bram is
port( port(
clk : in std_logic; clk : in std_logic;
addr : in std_logic_vector(HEIGHT_BITS - 1 downto 0) ; addr : in std_logic_vector(HEIGHT_BITS - 1 downto 0) ;
di : in std_logic_vector(WIDTH-1 downto 0); din : in std_logic_vector(WIDTH-1 downto 0);
do : out std_logic_vector(WIDTH-1 downto 0); dout : out std_logic_vector(WIDTH-1 downto 0);
sel : in std_logic_vector((WIDTH/8)-1 downto 0); sel : in std_logic_vector((WIDTH/8)-1 downto 0);
re : in std_ulogic; re : in std_ulogic;
we : in std_ulogic we : in std_ulogic
@ -50,9 +50,9 @@ begin
addr64 := (others => '0'); addr64 := (others => '0');
addr64(HEIGHT_BITS + 2 downto 3) := addr; addr64(HEIGHT_BITS + 2 downto 3) := addr;
if we = '1' then if we = '1' then
report "RAM writing " & to_hstring(di) & " to " & report "RAM writing " & to_hstring(din) & " to " &
to_hstring(addr & pad_zeros) & " sel:" & to_hstring(sel); to_hstring(addr & pad_zeros) & " sel:" & to_hstring(sel);
behavioural_write(di, addr64, to_integer(unsigned(sel)), identifier); behavioural_write(din, addr64, to_integer(unsigned(sel)), identifier);
end if; end if;
if re = '1' then if re = '1' then
behavioural_read(ret_dat_v, addr64, to_integer(unsigned(sel)), identifier); behavioural_read(ret_dat_v, addr64, to_integer(unsigned(sel)), identifier);
@ -60,7 +60,7 @@ begin
" returns " & to_hstring(ret_dat_v); " returns " & to_hstring(ret_dat_v);
obuf <= ret_dat_v(obuf'left downto 0); obuf <= ret_dat_v(obuf'left downto 0);
end if; end if;
do <= obuf; dout <= obuf;
end if; end if;
end process; end process;



@ -46,8 +46,8 @@ begin
port map( port map(
clk => clk, clk => clk,
addr => ram_addr, addr => ram_addr,
di => wishbone_in.dat, din => wishbone_in.dat,
do => wishbone_out.dat, dout => wishbone_out.dat,
sel => wishbone_in.sel, sel => wishbone_in.sel,
re => ram_re, re => ram_re,
we => ram_we we => ram_we

Loading…
Cancel
Save