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

Subversion Repositories line_codes

[/] [line_codes/] [trunk/] [rtl/] [vhdl/] [ami_enc.vhd] - Rev 8

Compare with Previous | Blame | View Log

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

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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