首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

textio的问题!

textio的问题!

我在result.dat文件中写入1001011010010110,然后定义一个变量input为std_logic_vector(15 downto 0),在作textio时,要将文件中的这串数字传给我的变量,可modelsim总是报error,No feasible entries for subprogram read,这是为什么阿? file input1:text open read_mode is "result.dat"; variable dline:line; variable inputer: std_logic_vector(15 downto 0); BEGIN case presentstate is when "001" => readline(input1,dline); read(dline,inputer); input <=inputer; when others => input<="0000000000000000";
If you have Modelsim, it comes with the source code of all the ieee, std libraries.       
        For example, if you installed Modelsim on your C: drive, the source code can be found at:               
        C:\Modeltech_5.5f\vhdl_src               
                       
        If you don't have modelsim, I can email the package to you.       
                       
        The libraries are very well written.??I personally learned a lot from reading the source code of the textio package.
返回列表