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

Subversion Repositories line_codes

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 5 ribamar
 
2
-- implementation of the AMI encoder. 
3
 
4
entity ami_enc is
5
        port (
6
        clr_bar,
7
        clk         : in    bit; -- clock input.
8
        e           : in    bit; -- input.
9
        s0, s1      : out   bit  -- output.
10
        );
11
end ami_enc;
12
 
13
architecture behaviour of ami_enc is
14
        signal q    : bit;      -- 1 flipflops for 2 states. 
15
begin
16
     process (clk, clr_bar) begin
17
        if clr_bar = '0' then
18
                q  <= '0';
19
                s1 <= '0';
20
                s0 <= '0';
21
        elsif clk'event and clk = '1' then
22
                q  <= q xor e;
23
                s1 <= q and e;
24
                s0 <= e and (not q);
25
        end if;
26
     end process;
27
end behaviour;

powered by: WebSVN 2.1.0

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