feat: add rtl/fault_filter.vhd
This commit is contained in:
15
rtl/fault_filter.vhd
Normal file
15
rtl/fault_filter.vhd
Normal file
@@ -0,0 +1,15 @@
|
||||
library ieee;
|
||||
use ieee.std_logic_1164.all;
|
||||
|
||||
entity fault_filter is
|
||||
port (valid : in std_logic;
|
||||
mask_in : in std_logic_vector(2 downto 0);
|
||||
mask_out : out std_logic_vector(2 downto 0);
|
||||
any_fault : out std_logic);
|
||||
end entity;
|
||||
|
||||
architecture rtl of fault_filter is
|
||||
begin
|
||||
mask_out <= mask_in when valid = '1' else (others => '0');
|
||||
any_fault <= (mask_in(0) or mask_in(1) or mask_in(2)) and valid;
|
||||
end architecture;
|
||||
Reference in New Issue
Block a user