我是在 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
Run Code Online (Sandbox Code Playgroud)
D 的 T 触发器的定义
module T_FF(q, clk, reset);
output q;
input clk, reset; …Run Code Online (Sandbox Code Playgroud)