0
点赞
收藏
分享

微信扫一扫

verilog 实战 反向器


在这里我用的是iverilog 编译代码,用gtk来显示波形,纯linux开发

​​代码在git​​

inveter.v

//反相起器设计
`timescale 1ns/10ps
module inv(
A,
Y
);
input A;
output Y;


assign Y=~A;

endmodule

stimulus_tb.v

//-------testbench of inv------------

module int_tb;

reg aa;
wire yy;
inv inv (
.A(aa),
.Y(yy)
);

initial begin
$dumpfile("test.vcd");
$dumpvars(0,int_tb);
aa<=0;
#10 aa<=1;
#10 aa<=0;
#10 aa<=1;
#10 $stop;
end
endmodule

bash compile.sh

verilog 实战 反向器_git


举报

相关推荐

0 条评论