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

Subversion Repositories line_codes

[/] [line_codes/] [trunk/] [rtl/] [vhdl/] [hdb1_dec.vhd] - Blame information for rev 8

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 ribamar
 
2
-- implementation of the HDB1 decoder. 
3
 
4
entity hdb1_dec is
5
        port (
6
        clr_bar,
7
        clk, e0, e1 : in    bit; -- inputs.
8
        s           : out   bit  -- output.
9
        );
10
end hdb1_dec;
11
 
12
architecture behaviour of hdb1_dec is
13
     signal q0, q1: bit;  -- two flipflops.
14
begin
15
     process (clk, clr_bar) begin
16
                if clr_bar = '0' then
17
                        q0 <= '0';
18
                        q1 <= '0';
19
                        s  <= '0';
20
                elsif clk'event and clk = '1' then
21
                        s  <= ( q0 and (not e0) ) or ( q1 and (not e1) );
22
                        q0 <= (not q0) and e0;
23
                        q1 <= (not q1) and e1;
24
                end if;
25
     end process;
26
end behaviour;

powered by: WebSVN 2.1.0

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