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 14

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 arif_endro
-- $Id: ser2par8bit.vhdl,v 1.1.1.1 2005-11-15 01:52:31 arif_endro Exp $
2
-------------------------------------------------------------------------------
3
-- Title       : Serial to paralel 8bit
4
-- Project     : 
5
-------------------------------------------------------------------------------
6
-- File        : ser2par8bit.vhdl
7
-- Author      : "Arif E. Nugroho" <arif_endro@yahoo.com>
8
-- Created     : 2005/11/01
9
-- Last update : 
10
-- Simulators  :
11
-- Synthesizers: 
12
-- Target      : 
13
-------------------------------------------------------------------------------
14
-- Description : Conversion from serial input to paralel output
15
-------------------------------------------------------------------------------
16 14 arif_endro
-- Copyright (C) 2005 Arif Endro Nugroho
17 2 arif_endro
-------------------------------------------------------------------------------
18
-- 
19
--      THIS SOURCE FILE MAY BE USED AND DISTRIBUTED WITHOUT RESTRICTION
20
-- PROVIDED THAT THIS COPYRIGHT STATEMENT IS NOT REMOVED FROM THE FILE AND THAT
21
-- ANY DERIVATIVE WORK CONTAINS THE ORIGINAL COPYRIGHT NOTICE AND THE
22
-- ASSOCIATED DISCLAIMER.
23
-- 
24
-------------------------------------------------------------------------------
25
-- 
26
--      THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
27
-- IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
28
-- MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
29
-- EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
30
-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31
-- PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32
-- OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33
-- WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34
-- OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35
-- ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36
-- 
37
-------------------------------------------------------------------------------
38
 
39
library IEEE;
40
use IEEE.std_logic_1164.ALL;
41
 
42
entity ser2par8bit is
43
   port (
44
     clock : in  bit;
45
     clear : in  bit;
46
     start : in  bit;
47
     rxin  : in  bit_vector (07 downto 00);
48
     y0    : out bit_vector (07 downto 00);
49
     y1    : out bit_vector (07 downto 00);
50
     y2    : out bit_vector (07 downto 00);
51
     y3    : out bit_vector (07 downto 00);
52
     r0    : out bit_vector (07 downto 00);
53
     r1    : out bit_vector (07 downto 00);
54
     c0    : out bit_vector (07 downto 00);
55
     c1    : out bit_vector (07 downto 00)
56
     );
57
end ser2par8bit;
58
 
59
architecture data_flow of ser2par8bit is
60
 
61
subtype type_word is bit_vector (07 downto 00);
62
type type_fifo is array (09 downto 00) of type_word;
63
signal fifo8bx7 : type_fifo;
64
 
65
begin
66
 
67
process (clock, clear)
68
begin
69
    if (clear = '1') then
70
        fifo8bx7 (00) <= (others => '0');
71
        fifo8bx7 (01) <= (others => '0');
72
        fifo8bx7 (02) <= (others => '0');
73
        fifo8bx7 (03) <= (others => '0');
74
        fifo8bx7 (04) <= (others => '0');
75
        fifo8bx7 (05) <= (others => '0');
76
        fifo8bx7 (06) <= (others => '0');
77
        fifo8bx7 (07) <= (others => '0');
78
        fifo8bx7 (08) <= (others => '0');
79
        fifo8bx7 (09) <= (others => '0');
80
    elsif ((clock = '0') and clock'event) then
81
        fifo8bx7 (00) <= rxin (07 downto 00);
82
        fifo8bx7 (09 downto 01) <= fifo8bx7 (08 downto 00);
83
    end if;
84
end process;
85
 
86
process (start)
87
begin
88
    if (start = '0' and start'event) then
89
        y0 <= fifo8bx7 (08);
90
        y1 <= fifo8bx7 (07);
91
        y2 <= fifo8bx7 (06);
92
        y3 <= fifo8bx7 (05);
93
        r0 <= fifo8bx7 (04);
94
        r1 <= fifo8bx7 (03);
95
        c0 <= fifo8bx7 (02);
96
        c1 <= fifo8bx7 (01);
97
   end if;
98
end process;
99
 
100
end data_flow;

powered by: WebSVN 2.1.0

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