这个有什么错吗?
时间:10-02
整理:3721RD
点击:
module initial_ex;
reg clk,nrst,x,y;
initial
clk=0;
initial
begin
nrst=1;
#20 nrst=0;
#50 nrst=1;
end
initial
begin
x=0;
y=1;
#20 x=1;
#50 y=0;
@(posedge clk)
begin
x=0;
y=1;
end
end
always #5 clk=~clk;
endmodule
为什么我再Moldsim中编译什么结果都没有
reg clk,nrst,x,y;
initial
clk=0;
initial
begin
nrst=1;
#20 nrst=0;
#50 nrst=1;
end
initial
begin
x=0;
y=1;
#20 x=1;
#50 y=0;
@(posedge clk)
begin
x=0;
y=1;
end
end
always #5 clk=~clk;
endmodule
为什么我再Moldsim中编译什么结果都没有
You need to Add a Simulation item which selects the module as the top level instance.
Double click the Simulation item you just added and push the Run button. The simulation will process until you stop it.
However, since you did not put any $display inside your code, the TCL window would not have any output.
