Vhdl 两个有符号信号的比较
我想比较两个信号。但当我编译代码时,我得到了非法的并发语句错误。如何比较两个信号Vhdl 两个有符号信号的比较,vhdl,Vhdl,我想比较两个信号。但当我编译代码时,我得到了非法的并发语句错误。如何比较两个信号 Library IEEE; use IEEE.Std_Logic_1164.all; use IEEE.numeric_std.all; entity compare is end entity; architecture RTL of compare is signal a : signed (7 downto 0); signal b : signed (7 downto 0); signal
Library IEEE;
use IEEE.Std_Logic_1164.all;
use IEEE.numeric_std.all;
entity compare is
end entity;
architecture RTL of compare is
signal a : signed (7 downto 0);
signal b : signed (7 downto 0);
signal c : std_logic;
begin
if a>b then
c <= '1';
end if;
end RTL;
如果。。然后,顺序条件语句仅在VHDL中的进程内有效
如果需要并发语句,可以使用条件信号赋值:
可能重复的
c <= '1' when a > b else '0';