1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-04-05 04:35:00 +00:00

Metavalue cleanup for mmu.vhdl

Signed-off-by: Michael Neuling <mikey@neuling.org>
This commit is contained in:
Michael Neuling
2022-07-14 10:32:16 +10:00
parent 738702f2e2
commit 5a03de4c90

View File

@@ -163,11 +163,15 @@ begin
begin
-- mask_count has to be >= 5
m := x"001f";
for i in 5 to 15 loop
if i < to_integer(r.mask_size) then
m(i) := '1';
end if;
end loop;
if is_X(r.mask_size) then
m := (others => 'X');
else
for i in 5 to 15 loop
if i < to_integer(r.mask_size) then
m(i) := '1';
end if;
end loop;
end if;
mask <= m;
end process;
@@ -178,7 +182,9 @@ begin
begin
m := (others => '0');
for i in 0 to 43 loop
if i < to_integer(r.shift) then
if is_X(r.shift) then
m(i) := 'X';
elsif i < to_integer(r.shift) then
m(i) := '1';
end if;
end loop;