From: Michael Neuling Date: Thu, 14 Jul 2022 00:31:32 +0000 (+1000) Subject: Metavalue cleanup for fetch1.vhdl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e134f2e2fabfd881427029ccad1d345287bc4f8;p=microwatt.git Metavalue cleanup for fetch1.vhdl Signed-off-by: Michael Neuling --- diff --git a/fetch1.vhdl b/fetch1.vhdl index af1dd6b..c6d26d7 100644 --- a/fetch1.vhdl +++ b/fetch1.vhdl @@ -123,15 +123,22 @@ begin raddr := unsigned(r.nia(BTC_ADDR_BITS + 1 downto 2)) + to_unsigned(2, BTC_ADDR_BITS); if advance_nia = '1' then - btc_rd_data <= btc_memory(to_integer(raddr)); - btc_rd_valid <= btc_valids(to_integer(raddr)); + if is_X(raddr) then + btc_rd_data <= (others => 'X'); + btc_rd_valid <= 'X'; + else + btc_rd_data <= btc_memory(to_integer(raddr)); + btc_rd_valid <= btc_valids(to_integer(raddr)); + end if; end if; if btc_wr = '1' then + assert not is_X(btc_wr_addr) report "Writing to unknown address" severity FAILURE; btc_memory(to_integer(unsigned(btc_wr_addr))) <= btc_wr_data; end if; if inval_btc = '1' or rst = '1' then btc_valids <= (others => '0'); elsif btc_wr = '1' then + assert not is_X(btc_wr_addr) report "Writing to unknown address" severity FAILURE; btc_valids(to_integer(unsigned(btc_wr_addr))) <= '1'; end if; end if;