|HOME |ABOUT |ARTICLES |ACK |FEEDBACK |TOC |LINKS |BLOG |JOBS |


Tutorials



TASK BASED TB

Task And Function Based Tb:

Task based verification is more flexible over all the above approaches. All the operations in are done using takes and functions. The task based BFM is extremely efficient if the device under test performs many calculations. Each task or function focuses on one single functionality. Verification of DUT using the task based testbench is faster. Using tasks makes it possible to describe structural testbenchs. These tasks can be ported without much effort.

EXAMPLE:
task write(input integer data,input integer address); 
begin 
   @(posedge clock); 
   read_write = 1; 
   address = $random; 
   data = $random;  
end 
endtask 

task read(input integer address,output integer data); 
begin 
   @(posedge clock); 
   read_write = 0; 
   address = $random; 
   // Do some operation to get data
end 
endtask 

Now lets see how to develop the senarious. 

1) 10 write operations.

initial 
   repeat(10) 
   write($random,$random); 

2) 10 read operations

initial  
   repeat(10) 
   read($random,data); 

3) Alternate read and write operations.

initial  
   repeat(10) 
   begin 
      write($random,$random); 
      read($random,data); 
   end 

4) Do the write and read the same location.

initial 
    begin 
        write(10,20); 
        read (10,data); 
    end 

Index
Introduction
Linear Tb
File Io Tb
State Machine Based Tb
Task Based Tb
Self Checking Testbench
Verification Flow
Clock Generator
Simulation
Incremental Compilation
Store And Restore
Event Cycle Simulation
Time Scale And Precision
Stimulus Generation
System Function Random A Myth
Race Condition
Checker
Task And Function
Process Control
Disableing The Block
Watchdog
Compilation N Simulation Switchs
Debugging
About Code Coverage
Testing Stratigies
File Handling
Verilog Semaphore
Finding Testsenarious
Handling Testcase Files
Terimination
Error Injuction
Register Verification
Parameterised Macros
White Gray Black Box
Regression
Tips

Report a Bug or Comment on This section - Your input is what keeps Testbench.in improving with time!





<< PREVIOUS PAGE

TOP

NEXT PAGE >>

copyright © 2007-2017 :: all rights reserved www.testbench.in::Disclaimer