1 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
2 <block_impl ref_name="demux.xml" ref_md5="">
4 <author firstname="stephane" lastname="Domas" mail="sdomas@univ-fcomte.fr" />
5 <date creation="2015-04-27" />
6 <related_files list=""/>
8 This component is a synchronous demultiplixer with variable number of outputs
17 <package name="std_logic_1164" use="all"/>
18 <package name="numeric_std" use="all"/>
24 signal sel_s : unsigned(@eval{@val{sel_width}-1} downto 0);
25 signal val_i_dly : std_logic_vector(@eval{@val{val_width}-1} downto 0};
28 signal @{val_o}_enb : std_logic;
35 delay_input : process(@{clk}, @{rst})
38 val_i_dly <= (others => '0');
39 elsif(rising_edge(@{clk})) then
40 val_i_dly <= @{val_i};
42 end process delay_input;
45 demux : process(@{clk}, @{rst})
50 @{val_o}_enb <= '0';
53 elsif(rising_edge(@{clk})) then
56 @{val_o}_enb <= '0';
59 @caseeach{val_o,sel_s,@#:1}
60 @{val_o}_enb <= '1';
67 @{val_o} <= val_i_dly when (@{val_o}_enb = '1') else (others => '0');