我知道基本的`include“filename.v”命令。但是,我试图包含另一个文件夹中的模块。现在,该模块还包括同一文件夹中存在的其他模块。但是,当我尝试在最顶层运行该模块时,出现错误。
C:\Users\Dell\Desktop\MIPS>iverilog mips.v
./IF/stage_if.v:2: Include file instruction_memory_if.v not found
No top level modules, and no -s option.
在这里,我试图制作一个 MIPS 处理器,它包含在文件“mips.v”中。该文件的第一条语句是“`include“IF/stage_if.v”。并且,在 IF 文件夹中,存在许多我已包含在 stage_if.v 中的文件,其中一个是“instruction_memory_if.v”。下面是目录层次图。
-IF
instruction_memory_if.v
stage_if.v
+ID
+EX
+MEM
+WB
mips.v
你需要告诉iverilog
使用以下命令查看哪里-I
flag.
In top.v
:
`include "foo.v"
program top;
initial begin
foo();
end
endprogram
In foo/foo.v
:
task foo;
$display("This was printed in the foo module");
endtask
可以使用以下命令运行:
iverilog -g2012 top.v -I foo/
vvp a.out
>>> This was printed in the foo module
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)