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

Subversion Repositories line_codes

[/] [line_codes/] [trunk/] [rtl/] [vhdl/] [ami_enc.vhd] - Diff between revs 5 and 8

Only display areas with differences | Details | Blame | View Log

Rev 5 Rev 8
 
 
-- implementation of the AMI encoder. 
-- implementation of the AMI encoder. 
 
 
entity ami_enc is
entity ami_enc is
        port (
        port (
        clr_bar,
        clr_bar,
        clk         : in    bit; -- clock input.
        clk         : in    bit; -- clock input.
        e           : in    bit; -- input.
        e           : in    bit; -- input.
        s0, s1      : out   bit  -- output.
        s0, s1      : out   bit  -- output.
        );
        );
end ami_enc;
end ami_enc;
 
 
architecture behaviour of ami_enc is
architecture behaviour of ami_enc is
        signal q    : bit;      -- 1 flipflops for 2 states. 
        signal q    : bit;      -- 1 flipflops for 2 states. 
begin
begin
     process (clk, clr_bar) begin
     process (clk, clr_bar) begin
        if clr_bar = '0' then
        if clr_bar = '0' then
                q  <= '0';
                q  <= '0';
                s1 <= '0';
                s1 <= '0';
                s0 <= '0';
                s0 <= '0';
        elsif clk'event and clk = '1' then
        elsif clk'event and clk = '1' then
                q  <= q xor e;
                q  <= q xor e;
                s1 <= q and e;
                s1 <= q and e;
                s0 <= e and (not q);
                s0 <= e and (not q);
        end if;
        end if;
     end process;
     end process;
end behaviour;
end behaviour;
 
 

powered by: WebSVN 2.1.0

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