【问题标题】:The input and output signals are not shown in objects windows in Modelsim10.1cModelsim10.1c 的对象窗口中不显示输入和输出信号
【发布时间】:2017-06-23 08:54:47
【问题描述】:

我是在modelsim中使用verilog设计电路的初学者。我使用示例代码和教程来了解 modelsim 的工作原理。代码和测试台编译没有任何问题,甚至测试台模拟没有任何错误,但输入和输出信号没有显示在对象窗口中,它们不在实例菜单下。请为我描述如何找到它们并模拟波形。 这是我的代码和测试台。 D触发器的定义

// module D_FF with synchronous reset
module D_FF(q, d, clk, reset);
output q;
input d, clk, reset;
reg q;
// Lots of new constructs. Ignore the functionality of the
// constructs.
// Concentrate on how the design block is built in a top-down fashion.
always @(negedge clk or posedge reset)
if (reset)
q <= 1'b0;
else
q <= d;
endmodule

从 D 定义一个 T 触发器

module T_FF(q, clk, reset);
output q;
input clk, reset;
wire d;
D_FF dff0(q, d, clk, reset);
not n1(d, q);
endmodule

计数器代码:

module rcc4(q, clk, reset);
output [3:0] q;
input clk, reset;
//4 instances of the module T_FF are created.
T_FF tff0(q[0],clk, reset);
T_FF tff1(q[1],q[0], reset);
T_FF tff2(q[2],q[1], reset);
T_FF tff3(q[3],q[2], reset);
endmodule

测试台代码:

module stimulus();
reg clk;
reg reset;
wire[3:0] q;
// instantiate the design block
rcc4 r1(q, clk, reset);
// Control the clk signal that drives the design block. Cycle time = 10
initial
clk = 1'b0; //set clk to 0
always
#5 clk = ~clk; //toggle clk every 5 time units
// Control the reset signal that drives the design block
// reset is asserted from 0 to 20 and from 200 to 220.
initial
begin
reset = 1'b1;
#15 reset = 1'b0;
#180 reset = 1'b1;
#10 reset = 1'b0;
#20 $finish; //terminate the simulation
end
// Monitor the outputs
initial
$monitor($time, " Output q = %d", q);
endmodule

我在 Windows 10 上使用 modelsim 10.1c。 The following picture is from my project and it shows my object and instance window.

【问题讨论】:

  • 我找到了答案。当我单击开始仿真时,会打开一个窗口,在此窗口中单击优化选项并将设计对象可见性更改为“对所有模块应用完全可见性”,问题已解决。
  • 谢谢,上述步骤对我有帮助。

标签: verilog simulation modelsim


【解决方案1】:

开关-voptargs=+acc 将解决您的问题。

vsim -voptargs=+acc modulename

【讨论】:

  • 对我不起作用。我有同样的问题
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-12-31
  • 1970-01-01
  • 2020-07-07
  • 2021-09-26
  • 1970-01-01
相关资源
最近更新 更多