Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to write a clock in testbench?

Status
Not open for further replies.

carrot

Full Member level 3
Joined
Feb 23, 2004
Messages
182
Helped
9
Reputation
18
Reaction score
4
Trophy points
1,298
Location
Bangalore, India
Activity points
1,532
Clock in testbench

Hi,

Suppose if i want a clock in my module so that it will go to entire design, how will it be written in testbench?
 

Clock in testbench

always #10 clk = ~clk;
 

Clock in testbench

initial
begin
clk = 1'b0;
#5 forever #10 clk = ~clk;
end
 

Re: Clock in testbench

hai
clock decleration with out initializing

always #25 clk=~clk

if you want to initialize , then
initial
begin
clk=0;
always #25 clk=~clk
end

The other way of declaration the clock

forever #25 clk=~clk


this is how we declare clock
bye
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top