设计与验证verilog hdl

源代码在线查看: clock_edge_tb.v

软件大小: 1828 K
上传用户: NJ_WK
关键词: verilog hdl
下载地址: 免注册下载 普通下载 VIP

相关代码

				module clock_edge_tb ( );
				
				reg        clk_50M_temp, clk_100M, rst_;
				wire       clk_50M;
				wire [3:0] cnt1, cnt2;
				
				   initial
				      begin
				        clk_50M_temp = 0;
				        clk_100M = 0;
				        rst_ = 0;
				        # 100 ;
				        rst_ = 1;
				        # 1000 ;
				        $stop;    
				      end
				clock_edge clock_edge_inst (.clk_50M(clk_50M), 
				                            .clk_100M(clk_100M), 
				                            .rst_(rst_), 
				                            .cnt1(cnt1), 
				                            .cnt2(cnt2)
				                            );
				
				  always # 10 clk_50M_temp = ~clk_50M_temp;
				  assign # 5 clk_50M =  clk_50M_temp;
				  always # 5 clk_100M = ~clk_100M;
				
				endmodule			

相关资源