test.vhd
来自「用VHDL编写的数字时钟,可变宽度脉冲产生器」· VHDL 代码 · 共 25 行
VHD
25 行
library ieee;
use ieee.std_logic_1164.all;
entity test is port(a,b:in bit_vector(1 downto 0);a_less_than_b:out bit);
end;
architecture behave of test is
begin
process(a)
variable i:integer;
begin
a_less_than_b<='0';
for i in 1 downto 0 loop
if(a(i)='1'and b(i)='0')then
a_less_than_b<='0';
exit;
elsif(a(i)='0'and b(i)='1')then
a_less_than_b<='1';
exit;
else
next;
end if;
el:end loop;
end process;
end;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?