1
0
SEm-Labos/06-07-08-09-SystemOnChip/SystemOnChip_test/hdl/beamerTest_pck_pkg_body.vhd
github-classroom[bot] d212040c30
Initial commit
2024-02-23 13:01:05 +00:00

17 lines
411 B
VHDL

PACKAGE BODY beamerTest_pck IS
function trim_X (arg : signed) return signed is
variable returnVal : signed(arg'range);
begin
for i in arg'range loop
case arg(i) is
when '0' | 'L' => returnVal(i) := '0';
when '1' | 'H' => returnVal(i) := '1';
when others => returnVal(i) := '0';
end case;
end loop;
return returnVal;
end trim_X;
END beamerTest_pck;