From: Michael Neuling Date: Thu, 14 Jul 2022 00:29:11 +0000 (+1000) Subject: Metavalue cleanup for helpers.vhdl X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7656abd7650cb8185b6f67b7ad6162bd37526684;p=microwatt.git Metavalue cleanup for helpers.vhdl Signed-off-by: Michael Neuling --- diff --git a/helpers.vhdl b/helpers.vhdl index bb69927..92c10dc 100644 --- a/helpers.vhdl +++ b/helpers.vhdl @@ -162,7 +162,9 @@ package body helpers is function ra_or_zero(ra: std_ulogic_vector(63 downto 0); reg: std_ulogic_vector(4 downto 0)) return std_ulogic_vector is begin - if to_integer(unsigned(reg)) = 0 then + if is_X(reg) then + return x"XXXXXXXXXXXXXXXX"; + elsif to_integer(unsigned(reg)) = 0 then return x"0000000000000000"; else return ra;