vhdl -vivado -vivado模拟器检索旧文件,而不是新生成的一个

发布于 2025-01-23 12:25:19 字数 1207 浏览 0 评论 0原文

我正在Vivado 2020.2内建立一个VHDL项目,

我的工作目录位于我的OS的本地桌面上,它具有以下结构:

script\
    datasets\
        gentestdata.py
        testdata\
            test_data.txt
src\
  <<source files here>>
tst\
  <<testbenches here>>
vivado\
  <<project directory here>>

我具有以下不纯函数,可以从脚本生成的文件test_data.txt加载数据:文件:

impure function gen_datain(dataset_path: in string) return datain_type is

file text_header: text is in dataset_path;
variable text_line: line;
variable line_i: bit_vector(0 to neuron_rom_width-1);
variable dataset_content: datain_type;

begin
for i in dataset_content'range loop
    if i = 101 then
        readline(text_header, text_line);
        read(text_line, line_i);
    else
        readline(text_header, text_line);
        read(text_line, line_i);
    end if;
    dataset_content(i) := makesfixed(line_i);
end loop;
file_close(text_header);
return dataset_content;
end function;

文件test_data.txt由Python脚本GentestData.py自动生成。每次我运行此脚本时,test_data.txt的内容都会更改,并且在Vivado环境中加载的数据也会有所更改,但是即使旧版本的test_data.txt已被较新版本替换为较新版本,模拟器仍然会加载该模拟器。旧数据。我该如何解决此行为。我试图关闭Vivado并重新启动

我的问题是,您知道这种行为的原因以及如何纠正它吗?

谢谢大家

I am building a vhdl project within vivado 2020.2

My working directory is located at the local Desktop of my O.S. and it has the following structure:

script\
    datasets\
        gentestdata.py
        testdata\
            test_data.txt
src\
  <<source files here>>
tst\
  <<testbenches here>>
vivado\
  <<project directory here>>

I have the following impure function to load the data from a script-generated file test_data.txt :

impure function gen_datain(dataset_path: in string) return datain_type is

file text_header: text is in dataset_path;
variable text_line: line;
variable line_i: bit_vector(0 to neuron_rom_width-1);
variable dataset_content: datain_type;

begin
for i in dataset_content'range loop
    if i = 101 then
        readline(text_header, text_line);
        read(text_line, line_i);
    else
        readline(text_header, text_line);
        read(text_line, line_i);
    end if;
    dataset_content(i) := makesfixed(line_i);
end loop;
file_close(text_header);
return dataset_content;
end function;

The file test_data.txt is generated automatically by the Python script gentestdata.py. Every time I run this script the content of test_data.txt changes and so should the data which is loaded within the vivado environment, but somehow even if the old version of test_data.txt has been replaced by the newer one, the simulator still loads the old data. How can I fix this behaviour. I tried to close vivado and reboot the O.S.

My questions is, do you know the reason of such behavior, and how it can be corrected?

Thanks everyone

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜嗑 2025-01-30 12:25:20

当将文件添加到GUI项目中时,Vivado允许用户“复制文件为project”;对副本说不。涉及一个复选框或广播按钮。 Vivado将尝试将自己的本地副本埋在其层次结构的某个地方。 Vivado可以自由删除并重新添加自己的文件夹,如果您的文件是其中的一部分,它可能会令人困惑。

您可能需要重新开始一个新的GUI项目,以使该项目处于不修改文件的状态。

最终解决方案是在没有GUI的非项目模式下使用Vivado。在基于Linux的脚本驱动环境中,这比Windows更好。在非项目中,Vivado不会弄乱您的文件。
请参阅:
https://docs.xilinx.com/r/ en-us/ug892-vivado-design-flows-overview
有关项目和非项目构建工作流之间权衡的更多信息。

When adding files to the GUI project, Vivado allows the user to 'Copy file to project'; say no to the copy. There is a check box or radio button involved. Vivado will try to have its own local copy buried somewhere it its hierarchy. Vivado is free to remove and re-add its own folders and if your file is part of this it can become confusing.

You may need to start over with a fresh Gui project in order to have the project in a state where it is not modifying your files.

The ultimate solution is to use Vivado in non-project mode without the GUI. This works better in a Linux based script driven environment than in Windows. In non-project Vivado does not mess with your files.
See:
https://docs.xilinx.com/r/en-US/ug892-vivado-design-flows-overview
For more on the trade-offs between project and non-project build work flows.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文