1 -------------------------------------------------------------------------------
3 -- File : deserializer_3x1.vhd
6 -- Author(s) : stephane Domas (sdomas@univ-fcomte.fr)
8 -- Creation Date : 2017/10/16
10 -- Description : This IP does a deserialization of 3 element into
16 -------------------------------------------------------------------------------
19 use IEEE.std_logic_1164.all;
20 use IEEE.numeric_std.all;
22 entity deserializer_3x1 is
24 in_width : natural := 8
29 data_in : in std_logic_vector(in_width-1 downto 0);
30 data_in_enb : in std_logic;
31 data1_out : out std_logic_vector(in_width-1 downto 0);
32 data1_out_enb : out std_logic;
33 data2_out : out std_logic_vector(in_width-1 downto 0);
34 data2_out_enb : out std_logic;
35 data3_out : out std_logic_vector(in_width-1 downto 0);
36 data3_out_enb : out std_logic
42 architecture rtl of deserializer_3x1 is
45 signal do_out : std_logic;
46 signal data1_reg : std_logic_vector(in_width-1 downto 0);
47 signal data2_reg : std_logic_vector(in_width-1 downto 0);
49 signal count : unsigned(1 downto 0);
53 deser_process : process (clk, reset)
56 count <= to_unsigned(0, 2);
57 data1_reg <= (others => '0');
58 data2_reg <= (others => '0');
59 data1_out <= (others => '0');
60 data2_out <= (others => '0');
61 data3_out <= (others => '0');
64 elsif rising_edge(clk) then
67 data1_out <= (others => '0');
68 data2_out <= (others => '0');
69 data3_out <= (others => '0');
71 if data_in_enb = '1' then
80 data1_out <= data1_reg;
81 data2_out <= data2_reg;
84 count <= to_unsigned(0, 2);
89 end process deser_process;
91 data1_out_enb <= do_out;
92 data2_out_enb <= do_out;
93 data3_out_enb <= do_out;