各位大侠:
你们好!
最近我从网上下载的VHDL程序100例。其中一例“比较程序”代码如下:
entity bit_rtl_lt_nc is
port ( in1: bit_vector;
in2: bit_vector;
pout : out bit);
end bit_rtl_lt_nc;
architecture func of bit_rtl_lt_nc is
begin
process(in1,in2)
variable left : integer;
variable right: integer;
begin
left := bit_to_int(in1);
right := bit_to_int(in2);
if ( left < right ) then
pout <= '1' after 1 ns;
else
pout <= '0' after 1 ns;
end if;
end process;
end func;
编译时总是提示:
Error (10482): VHDL error at bit_rtl_lt_nc.vhd(15): object "bit_to_int" is used but not declared
好象是"bit_to_int"没有声明,但是怎样更改才能使程序通过编译呢?
谢谢指教!



最新回复
nd9525 (2008-10-04 14:06:41)
mytex (2008-10-05 17:42:37)
请教楼上这个函数怎么写啊?能帮忙写写吗?
谢谢!