【发布时间】:2018-11-05 07:49:56
【问题描述】:
这是我第一次使用 Verilog 编码,也是我的第一次 StackExchange 查询!请提前原谅我在这篇文章中没有遵守的任何礼仪。
我在此处已经发布了一些类似的问题,但我无法弄清楚如何将解决方案应用于我自己的代码......
我不确定为什么在尝试运行模拟时收到上述错误,也不确定如何修复它。请指教?:)
我在下面附上了我的源代码,以及测试平台模块和我在尝试运行模拟时收到的错误。
非常感谢任何反馈!
module test1();
reg O, P, W;
wire LowRate, StandardRate, PeakRate;
outputs LowRate,StandardRate,PeakRate
CircuitStructure
testboi(LowRate,StandardRate,PeakRate,O,P,W);
initial
begin
O=0; P=0; W=0;
#10 O=0; P=0; W=0;
#10 O=0; P=0; W=1;
#10 O=0; P=1; W=0;
#10 O=0; P=1; W=1;
#10 O=1; P=0; W=0;
#10 O=1; P=0; W=1;
#10 O=1; P=1; W=0;
#10 O=1; P=1; W=1;
#10
$finish();
end
endmodule
module CircuitStructure(O, P, W, LowRate,
StandardRate, PeakRate);
input O, P, W;
output LowRate, StandardRate, PeakRate;
not
UA1(NotP,P),
UA2(NotO,O),
UA3(NotW,W);
nand
UB1(Nand1,NotP,NotO),
UB2(Nand2,NotW,P),
UB3(PeakRate,Nand1,Nand2);
and
UC1(StandardRate,P,W);
buf
UD1(LowRate,O);
endmodule
模拟错误:
Loading work.test1
# Loading work.CircuitStructure
# ** Error (suppressible): (vsim-3053)
C:/Modeltech_pe_edu_10.4a/ECE171_Project1/TestBench - Copy.v(10): Illegal
output or inout port connection for port 'LowRate'.
# Time: 0 ns Iteration: 0 Instance: /test1/testboi File:
C:/Modeltech_pe_edu_10.4a/ECE171_Project1/TestBench - Copy.v
# ** Error (suppressible): (vsim-3053)
C:/Modeltech_pe_edu_10.4a/ECE171_Project1/TestBench - Copy.v(10): Illegal
output or inout port connection for port 'StandardRate'.
# Time: 0 ns Iteration: 0 Instance: /test1/testboi File:
C:/Modeltech_pe_edu_10.4a/ECE171_Project1/TestBench - Copy.v
# ** Error (suppressible): (vsim-3053)
C:/Modeltech_pe_edu_10.4a/ECE171_Project1/TestBench - Copy.v(10): Illegal
output or inout port connection for port 'PeakRate'.
# Time: 0 ns Iteration: 0 Instance: /test1/testboi File:
C:/Modeltech_pe_edu_10.4a/ECE171_Project1/TestBench - Copy.v
# Error loading design
【问题讨论】: