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.

clocking block in test bench

Status
Not open for further replies.

srish

Newbie level 6
Joined
Dec 13, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,375
why we define clocking block normally in interface in a test bench???? is there any significance of this??
and one more thing that if we do not define any clocking block in a test bench then also it works fine how???? is there any default input skews and output sync time ???
 

meir

Junior Member level 3
Joined
Jan 16, 2013
Messages
26
Helped
5
Reputation
10
Reaction score
5
Trophy points
1,283
Activity points
1,431
clocking block is useful for verification environments where you have
one task driving the signals and another sampling them.
If a clocking block isn't used and the signals are driven and sampled on the same clk edge
the signals could be sampled before they are driven (depends on how the simulator schedules the tasks)
You can write a simple test bench with 2 tasks :drive() sample() both of them :
Code:
forever begin
      @(posedge clk)
  ......
end
fork them in the initial begin block
and see what happens
 
Last edited:
  • Like
Reactions: srish

    srish

    Points: 2
    Helpful Answer Positive Rating

dave_59

Advanced Member level 3
Joined
Dec 15, 2011
Messages
824
Helped
363
Reputation
730
Reaction score
358
Trophy points
1,353
Location
Fremont, CA, USA
Activity points
6,793
If you do not use a clocking block, then you need to synchronize and provide skews as if your testbench was another piece of RTL connected to your DUT. This is easy to understand if you do both design and verification. For the engineer just doing verification, some of the idiosyncrasies of Verilog's wires versus variables semantics can be confusing. The clocking block abstracts some of that away from the testbench writer.

See my DVCon12 paper that discusses this: **broken link removed**
 
  • Like
Reactions: srish

    srish

    Points: 2
    Helpful Answer Positive Rating

srish

Newbie level 6
Joined
Dec 13, 2011
Messages
14
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,375
hey thank you ...i read out the paper i.e. how approach to verification enhanced from traditional approach regarding the interconnection between design and test bench..i will try and follow ur advice ......currently i am doing designing in a project .......vl try to co-relate the things together...
If you do not use a clocking block, then you need to synchronize and provide skews as if your testbench was another piece of RTL connected to your DUT. This is easy to understand if you do both design and verification. For the engineer just doing verification, some of the idiosyncrasies of Verilog's wires versus variables semantics can be confusing. The clocking block abstracts some of that away from the testbench writer.

See my DVCon12 paper that discusses this: **broken link removed**
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top