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

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

   hellobb 
hellobb发表的帖子 

 [原创]关于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; 


发表时间:2005年6月3日11:12:51

  
回复该帖

本主题共有 1 帖,分页:>>>>>该主题的所有内容[1]条

 *树形目录 只列出部分跟帖的标题以及简单的摘要信息 该主题的部分跟帖如下:

[上一篇帖子]:紧急求助大家好    请问谁有十六进制转换成十进制的汇编子程序
[下一篇帖子]:在读研究生寻找兼职实习机会大家好,这是我的简历。请多多帮忙!!!谢谢! /P P 个人情况: B