作业帮 > 综合 > 作业

一个vhdl的语句,一直报错显示width mismatch in relational operator,

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/07/13 18:27:21
一个vhdl的语句,一直报错显示width mismatch in relational operator,
LIBRARY IEEE;
USE IEEE.STD_LOGIC_1164.ALL;
USE IEEE.STD_LOGIC_unsigned.ALL;
ENTITY tlc IS
PORT (clk,emerge:IN STD_LOGIC;
ra,rb,ya,yb,ga,gb:out std_logic);
END;
ARCHITECTURE bhv OF tlc IS
type state is (rg,ry,gr,yr,rr);
constant timemax:integer :=45;
constant time_rg:integer :=30;
constant time_ry:integer :=5;
constant time_gr:integer :=45;
constant time_yr:integer :=5;
signal state_next:state;
signal state_curr:state;
signal times :integer range 0 to timemax;
BEGIN
p1:\x05process(clk,emerge)
variable cnt:integer range 0 to timemax;
begin
\x05\x05if (emerge='1')then
state_curr
我将上述描述在Quartus II 8.0下编译后没有出现报错,只有几个警告.