|
quartus ii 11.0 调用modelsim 输出一直高阻
[复制链接]
module clkdiv(clk,rst,clkout);
input clk,rst;
output clkout;
reg clkout;
always@(posedge clk or negedge rst)
begin
if(!rst) clkout<=1'b0;
else clkout<=~clkout;
end
endmodule
testbench如下:
`timescale 1ns/1ps
module clkdiv_vlg_tst();
reg clk;
reg rst;
wire clkout;
clkdiv i1(
.clk(clk),
.clkout(clkout),
.rst(rst)
);
always begin
#10 clk = 0;
#10 clk = 1;
end
initial begin
rst = 0;
#20;
rst = 1;
#5000;
$stop;
end
endmodule
输出一直高阻,咋回事?
|
|