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

Subversion Repositories dirac

[/] [dirac/] [tags/] [dirac_0_0_1_0/] [src/] [encoder/] [OUTPUT_UNIT.vhd] - Blame information for rev 14

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

Line No. Rev Author Line
1 2 petebleack
library IEEE;
2
use IEEE.STD_LOGIC_1164.ALL;
3
use IEEE.STD_LOGIC_ARITH.ALL;
4
use IEEE.STD_LOGIC_UNSIGNED.ALL;
5
 
6
--  Uncomment the following lines to use the declarations that are
7
--  provided for instantiating Xilinx primitive components.
8
--library UNISIM;
9
--use UNISIM.VComponents.all;
10
 
11
entity OUTPUT_UNIT is
12
    Port ( ENABLE : in std_logic;
13
           DATA : in std_logic;
14
           FOLLOW : in std_logic;
15
                          RESET :       in std_logic;
16
           CLOCK : in std_logic;
17
           SENDING : out std_logic;
18
                          DATA_OUT : out std_logic;
19
           FOLLOW_COUNTER_TEST : out std_logic;
20
           SHIFT : out std_logic);
21
end OUTPUT_UNIT;
22
 
23
architecture RTL of OUTPUT_UNIT is
24
        component D_TYPE
25
        port(D,CLOCK:   in std_logic;
26
         Q:     out std_logic);
27
        end component D_TYPE;
28
        signal OUTVALUE:        std_logic;
29
        signal DELAYED: std_logic;
30
        signal NOFOLLOW:        std_logic;
31
        signal ACTIVE:  std_logic;
32
        signal FEEDBACK : std_logic;
33
begin
34
 
35
-- combinatorial logic
36
 
37
        ACTIVE <= ENABLE and not (FEEDBACK or RESET);
38
        OUTVALUE <= DATA xor FOLLOW;
39
        NOFOLLOW <= not FOLLOW;
40
        DATA_OUT <= ACTIVE and OUTVALUE;
41
        FOLLOW_COUNTER_TEST <= DELAYED;
42
        FEEDBACK <= DELAYED and NOFOLLOW;
43
        SHIFT <= FEEDBACK;
44
        SENDING <= ACTIVE;
45
 
46
-- sequential logic
47
 
48
FLIP_FLOP: D_TYPE
49
        port map(D => ACTIVE,
50
        CLOCK => CLOCK,
51
        Q => DELAYED);
52
 
53
 
54
end RTL;

powered by: WebSVN 2.1.0

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