【发布时间】:2010-10-25 16:14:56
【问题描述】:
这里发生了什么?为什么我会收到“运算符参数类型不匹配”,我该如何解决?
--
-- 32-bit counter with enable and async reset
--
architecture synthesis1 of counter_32bit is
signal nextvalue : std_logic_vector ( 31 downto 0 );
begin
--
-- combo
--
nextvalue <= value + 1; -- here
--
-- sequential
--
ff:process( clk, rst )
begin
if( rst = '1' ) then
value <= 0; -- and here...
elsif( clk'event and ( clk ='1' ) ) then
if( ena = '1' ) then
value <= nextvalue;
end if;
end if;
end process ff;
end synthesis1;
谢谢
【问题讨论】:
-
对于
value的初始化,to_stdlogicvector(bit_vector'(X"0"))或X"0"如果模拟器上的-v93开关被轻弹。
标签: vhdl