Verilog Vpi Call Back cbValueChange

V

vibhor mittal

Guest
Hi ,
I had a doubt about VPI call back cbValueChange
what does this exactly mean and how does it work .
Suppose I want to perform a function at the posedge of signal
X (about 2000 cycles)
shall i use call back cbValueChange
or call the code from the test bench

always @posedge(X)
begin
$pli
end
Which would be more efficient

thanks
 
The idea behind using a callback is that once the PLI task or function is invoked, it will take care of the subsequent events transparently under the hood. To put a gross example, would you call a VCD dumping task everytime a signal changes or just once and then take care of the rest without any additional hassle? Callbacks are great for various other reasons as well as long as you clearly document the callee and the caller mapping - if not on paper, at least in your mind.

--
Swapnajit Mitra
"Principles of Verilog PLI": Available from all online and trditional bookstores.
http://www.project-veripage.com
 

Welcome to EDABoard.com

Sponsor

Back
Top