1 <!DOCTYPE threshold_extctl>
2 <block_impl ref_name="threshold_extctl.xml" ref_md5="">
4 <author lastname="" mail="" firstname=""/>
5 <date creation="2018-01-10"/>
6 <related_files list=""/>
7 <description>fez</description>
12 <package name="std_logic_1164" use="all"/>
13 <package name="numeric_std" use="all"/>
18 signal def_val : unsigned(in_width-1 downto 0);
22 def_val <= to_unsigned(default_value, in_width);
24 threshold_process : process (@{clk}, @{reset})
26 if @{reset} = '1' then
28 @{data_out_enb} <= '0';
29 @{data_out} <= (others => '0');
31 elsif rising_edge(@{clk}) then
33 @{data_out_enb} <= '0';
35 if @{data_in_enb} = '1' and @{keep_in_enb} = '1' then
37 if @{keep_in} = '1' then
38 @{data_out} <= @{data_in};
40 @{data_out} <= std_logic_vector(def_val);
42 @{data_out_enb} <= '1';
45 end process threshold_process;
50 <input pattern="1" name="data_in_enb"/>
51 <input pattern="1" name="keep_in_enb"/>
53 <production counter="1">
54 <output pattern="01" name="data_out_enb"/>