导航: 老古网老古论坛XMOS公共讨论区XMOS开源项目区单片机程序设计嵌入式系统广告区域
→[原创]关于textio测试程序的编译问题[hellobb]

 *第31960篇: [原创]关于textio测试程序的编译问题

  
楼 主:hellobb 2005年6月3日11:12
 [原创]关于textio测试程序的编译问题
下面这个程序是书上的例子,但编译总出错,说是:“std_logic_textio" must in the library.但要是我去掉第三行,
则后面的read()都不可以访问编译,不知道怎么回事,高人请点拨一下好吗?我弄了2天了,也找不到原因。谢谢了!
library ieee;
use ieee.std_logic_1164.all;
use std.textio.all;
use ieee.std_logic_textio.all;
use work.cutpkg.all;
entity testcunt is 
end testcunt;
architecture test2 of testcunt is 
file intest:text is in "test.in";
signal clk ,rest:std_logic;
signal cnt:std_logic_vector(2 downto 0);
begin 
U1:count port map(clk=>  clk,rest=>  rest,cunt=>  cnt);
process
variable li:line;
variable errors:boolean:=false;
variable clki,resti:std_logic;
variable cunti:std_logic_vector(2 downto 0);
begin
readline (intest,li);
read(li,clki);
read(li,resti);
read(li,cunti);
clk  <=clki;
rest  <=resti;
wait for 20 ns;
if cnt/=cunti then 
assert false report"Count is wrong value";
errors:=true;
end if;
if endfile (intest) then
assert errors report"test passed." severity note;
assert (not errors) report "Test Failed." severity note;
wait;
end if;
end process; 

>>>>>>对该主题发表你的看法

本主题贴数1,分页: [第1页]


[上一篇主题]:紧急求助

[下一篇主题]:在读研究生寻找兼职实习机会