Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加开关、按键等事件的日志 #24

Open
caterpillar-1 opened this issue Sep 22, 2023 · 2 comments
Open

添加开关、按键等事件的日志 #24

caterpillar-1 opened this issue Sep 22, 2023 · 2 comments

Comments

@caterpillar-1
Copy link

在开发 NVDL 时,hwr 想到,如果链接了 nvboard 的二进制文件能够输出按键等信息到日志,那么可以自动生成简单的 testbench (延时问题可以另外写程序解决)。
hwr 提议

@sashimi-yzh
Copy link
Contributor

很好的想法, 你们可以先根据开发需要添加日志, 然后提个PR.

@scratch-er
Copy link

Good idea. But I think it is better to have this feature turned off by default, and it has to be explicitly turned on. Or NVBoard users can be made crazy with the console output messed up and struggle to find a way to turn off log.

There is also an out of box and drop-in method of logging the events: You can specify $dumpfile$ and $dumpvars$ in the verilog files to be simulated, and invoke verilog with --trace (or specify TRACE in verilate if you are using CMake). Then the generated executable will produce a VCD waveform. There's no need to change most of the source code. And VCD files can be easily parsed, they are just plain text files. The main drawback of this method is that the VCD files can be huge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants