您好,欢迎来到叨叨游戏网。
搜索
您的当前位置:首页vhdl巴克码“01110010”

vhdl巴克码“01110010”

来源:叨叨游戏网


巴克码发生器“01110010”

library ieee;

use ieee.std_logic_11.all;

use ieee.std_logic_unsigned.all;

entity bak1 is

port( clk,reset: in std_logic;

dout:out std_logic);

end bak1;

architecture a of bak1 is

signal count :std_logic_vector(2 downto 0);

signal tmp1:std_logic;

begin

dout<=tmp1;

process(clk,reset)

begin

if reset='0' then

count<=(others=>'0');

elsif rising_edge(clk) then

count<=count+1;

case count is

when \"000\"=>tmp1<='0' ;

when \"001\"=>tmp1<='1' ;

when \"010\"=>tmp1<='1' ;

when \"011\"=>tmp1<='1' ;

when \"100\"=>tmp1<='0' ;

when \"101\"=>tmp1<='0' ;

when \"110\"=>tmp1<='1' ;

when \"111\"=>tmp1<='0' ;

when others=>tmp1<='0';

end case;

end if;

end process;

end a;

巴克码检测器“01110010”

library ieee;

use ieee.std_logic_11.all;

entity JianMaQi is

port(data,clk,reset:in std_logic;

dout:out std_logic);

end;

architecture a of JianMaQi is

signal q0,q1,q2,q3,q4,q5,q6,q7: std_logic;

begin

process(clk,data,reset)

begin

if(clk'event and clk='1') then

q0<=data;

q1<=q0;

q2<=q1;

q3<=q2;

q4<=q3;

q5<=q4;

q6<=q5;

q7<=q6;

end if;

end process;

process(clk)

variable q:std_logic;

begin

q:=(not q7)and q6 and q5 and q4 and (not q3) and (not q2) and q1 and (not q0);

dout<=q and reset;

end process;

end;

因篇幅问题不能全部显示,请点此查看更多更全内容

Copyright © 2019- gamedaodao.net 版权所有 湘ICP备2024080961号-6

违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com

本站由北京市万商天勤律师事务所王兴未律师提供法律服务