1 clock

module top_module ( );

    reg clk;

    dut U1(.clk(clk));

    initial begin
clk = 0;
end always begin
#5;
clk = ~clk;
end endmodule

2 Tb/tb1

module top_module ( output reg A, output reg B );//

    // generate input patterns here
initial begin
A = 0;
B = 0;
#10;
A = 1;
#5;
B = 1;
#5;
A = 0;
#20;
B = 0;
end endmodule

3 Tb/and

module top_module();

    reg a,b,out;

    initial begin
a = 0;
b = 0;
#10;
a = 0;
b = 1;
#10;
a = 1;
b = 0;
#10;
a = 1;
b = 1;
end andgate U1({a,b},out); endmodule

4 Tb/tb2

module top_module();

    reg clk;
reg in;
reg [2:0] s;
reg out; q7 U1(.clk(clk), .in(in), .s(s), .out(out)); initial begin
clk = 0;
in = 0;
s = 3'd2;
#10;
in = 0;
s = 3'd6;
#10;
in = 1;
s = 3'd2;
#10;
in = 0;
s = 3'd7;
#10;
in = 1;
s = 3'd0;
#30;
in = 0;
end always begin
#5;
clk = ~clk;
end endmodule

5 Tb/tff

module top_module ();

    reg clk,reset,t,q;

    tff U1(.clk(clk),
.reset(reset),
.t(t),
.q(q)); initial begin
clk = 0;
t = 0;
reset = 0;
end always begin
#5;
clk = ~clk;
end initial begin
reset = 1'b0;
#3;
reset = 1'b1;
#10;
reset = 1'b0;
end always@(posedge clk)begin
if(reset)
t = 1;
else
t = 0;
end endmodule

最新文章

  1. C#对DBF文件的操作
  2. Linux---从start_kernel到init进程启动
  3. KO+bootstrap 模态窗全选绑定
  4. The CompilerVersion constant identifies the internal version number of the Delphi compiler.
  5. NullPointerException异常的原因??
  6. springmvc学习(二)——使用RequestMapper请求映射
  7. ld: 18 duplicate symbols for architecture i386 .linker command failed with exit code 1 (use -v to see invocation)_
  8. MyEclipse添加ibatis DTD文件实现xml的自动提示功能
  9. HBase数据的导入和导出
  10. Ajax 与 Comet
  11. Sublimetext3安装Emmet插件步骤
  12. win10的系统下怎么设置网页的字体变大
  13. (C++)string类杂记
  14. Java8将List转为Map
  15. 网络爬虫之html2md
  16. BZOJ.1109.[POI2007]堆积木Klo(DP LIS)
  17. FatMouse' Trade(杭电ACM---1009)
  18. javascript 运算符优先级
  19. 【VS Hacks】定制VS
  20. 部署kettle7.1

热门文章

  1. 在Yarn集群上跑spark wordcount任务
  2. Rust-函数
  3. 使用ConfigMap配置您的应用程序
  4. 20. 使用Fluentd发送告警邮件
  5. Docker方式安装Jenkins并且插件更改国内源
  6. (WebFlux)004、WebFilter踩坑记录
  7. C++面向对象编程之转换函数、explicit、one-argument
  8. 路径分析—PostgreSQL+GeoServer+Openlayers(二)
  9. python-D2-计算机与编程语言
  10. React + Springboot + Quartz,从0实现Excel报表自动化