|
Transaction level modelling in AVM
|
Transaction level Modeling in AVM
- Initiator puts/gets transaction to/from a target
- Initiator port requires an interface
- Target export provides the implementation of the interface
- Completion Model can be
- blocking or nonblocking
- Blocking methods may be tasks
- Nonblocking must be functions
TLM Directions :
Unidirectional Dataflow Choose put, get or peek to move data between Verification Components P.put(req) ; p.get(rsp); p.peek(rsp); Bidirectional Dataflow layered on top of unidirectional put + get for pipelined buses transport for non pipelined p.put( req ); OR p.transport( req , rsp ); p.get( rsp ); TLM also has equivalent non blocking APIs for speed
TLM Example :
// Example
Class producer;
put_if put_port;
task run;
int ranval;
for (int i=0; i<10; i++)
begin
randval = $random % 100;
$display(“Producer : sending %d”, randval);
put_port.put(randval);
end
Endtask
endclass : producer
Class put_if;
virtual task put ( int val ) ;
endtask
Endclass : put_if
Class consumer extends put_if;
virtual task put ( int val ) ;
$display(“Consumer : received : %d”, val);
endtask
endclass : consumer
|
|
This Articles is written/submitted by puneet (Puneet Aggarwal). You can also contribute to Asicguru.com. Click here to start
|
Prev << Analysis Port export
|
Next >> Analysis Port
|