OpenCores
URL https://opencores.org/ocsvn/product_code_iterative_decoder/product_code_iterative_decoder/trunk

Subversion Repositories product_code_iterative_decoder

[/] [product_code_iterative_decoder/] [trunk/] [source/] [ser2par8bit.vhdl] - Blame information for rev 18

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 arif_endro
-- ------------------------------------------------------------------------
2 14 arif_endro
-- Copyright (C) 2005 Arif Endro Nugroho
3 18 arif_endro
-- All rights reserved.
4 2 arif_endro
-- 
5 18 arif_endro
-- Redistribution and use in source and binary forms, with or without
6
-- modification, are permitted provided that the following conditions
7
-- are met:
8 2 arif_endro
-- 
9 18 arif_endro
-- 1. Redistributions of source code must retain the above copyright
10
--    notice, this list of conditions and the following disclaimer.
11
-- 2. Redistributions in binary form must reproduce the above copyright
12
--    notice, this list of conditions and the following disclaimer in the
13
--    documentation and/or other materials provided with the distribution.
14 2 arif_endro
-- 
15 18 arif_endro
-- THIS SOFTWARE IS PROVIDED BY ARIF ENDRO NUGROHO "AS IS" AND ANY EXPRESS
16
-- OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17
-- WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18
-- DISCLAIMED. IN NO EVENT SHALL ARIF ENDRO NUGROHO BE LIABLE FOR ANY
19
-- DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20
-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21
-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22
-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
23
-- STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
24
-- ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25
-- POSSIBILITY OF SUCH DAMAGE.
26 2 arif_endro
-- 
27 18 arif_endro
-- End Of License.
28
-- ------------------------------------------------------------------------
29 2 arif_endro
 
30
library IEEE;
31
use IEEE.std_logic_1164.ALL;
32
 
33
entity ser2par8bit is
34
   port (
35
     clock : in  bit;
36
     clear : in  bit;
37
     start : in  bit;
38
     rxin  : in  bit_vector (07 downto 00);
39
     y0    : out bit_vector (07 downto 00);
40
     y1    : out bit_vector (07 downto 00);
41
     y2    : out bit_vector (07 downto 00);
42
     y3    : out bit_vector (07 downto 00);
43
     r0    : out bit_vector (07 downto 00);
44
     r1    : out bit_vector (07 downto 00);
45
     c0    : out bit_vector (07 downto 00);
46
     c1    : out bit_vector (07 downto 00)
47
     );
48
end ser2par8bit;
49
 
50
architecture data_flow of ser2par8bit is
51
 
52
subtype type_word is bit_vector (07 downto 00);
53
type type_fifo is array (09 downto 00) of type_word;
54
signal fifo8bx7 : type_fifo;
55
 
56
begin
57
 
58
process (clock, clear)
59
begin
60
    if (clear = '1') then
61
        fifo8bx7 (00) <= (others => '0');
62
        fifo8bx7 (01) <= (others => '0');
63
        fifo8bx7 (02) <= (others => '0');
64
        fifo8bx7 (03) <= (others => '0');
65
        fifo8bx7 (04) <= (others => '0');
66
        fifo8bx7 (05) <= (others => '0');
67
        fifo8bx7 (06) <= (others => '0');
68
        fifo8bx7 (07) <= (others => '0');
69
        fifo8bx7 (08) <= (others => '0');
70
        fifo8bx7 (09) <= (others => '0');
71
    elsif ((clock = '0') and clock'event) then
72
        fifo8bx7 (00) <= rxin (07 downto 00);
73
        fifo8bx7 (09 downto 01) <= fifo8bx7 (08 downto 00);
74
    end if;
75
end process;
76
 
77
process (start)
78
begin
79
    if (start = '0' and start'event) then
80
        y0 <= fifo8bx7 (08);
81
        y1 <= fifo8bx7 (07);
82
        y2 <= fifo8bx7 (06);
83
        y3 <= fifo8bx7 (05);
84
        r0 <= fifo8bx7 (04);
85
        r1 <= fifo8bx7 (03);
86
        c0 <= fifo8bx7 (02);
87
        c1 <= fifo8bx7 (01);
88
   end if;
89
end process;
90
 
91
end data_flow;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.