1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-11 23:43:15 +00:00

Metavalue cleanup for helpers.vhdl

Signed-off-by: Michael Neuling <mikey@neuling.org>
This commit is contained in:
Michael Neuling 2022-07-14 10:29:11 +10:00
parent caf458be37
commit 7656abd765

View File

@ -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;