Professional Documents
Culture Documents
The TLM-2.0 Standard: John Aynsley, Doulos
The TLM-2.0 Standard: John Aynsley, Doulos
0 Standard
CONTENTS
• Review of TLM-2.0
Behavioral
RTL
Model
write(address,data)
RTL Behavioral
Model
Fast
RTL
Hardware verification
Transaction
+ timing
CONTENTS
• Review of TLM-2.0
• TLM-1.0 • TLM-2.0
• put, get and • Pass-by-reference • TLM-2.0.1
transport
• Unified interfaces • LRM
• Request-response
model • Generic payload
Software Software
Bridge
TLM-2.0
Memory Custom
I/O RAM DMA D/A
interface peripheral
Use cases
Software Software Architectural Hardware
development performance analysis verification
Loosely-timed
Approximately-timed
Command
BEGIN_REQ
Address Either write bytes
Data
END_REQ
Byte enables
Streaming
BEGIN_RESP
Response status or read bytes
Extensions END_RESP
Coding Style
Loosely- or Approximately-timed
• Productivity
• Shortened learning curve
• Consistent coding style
Copyright © 2010 by Doulos. All rights reserved. 14
The TLM-2.0 Standard
CONTENTS
• Review of TLM-2.0
Initiator
The End!
Resources:
Bus
Initiator
Memory
Peripherals
Initiator
Initiator
Sync Resources:
Bus
Initiator
Memory
Peripherals
Initiator
Initiator
Resources:
Bus
Initiator
Memory
Peripherals
Initiator
Quantum
AT CA
BEGIN_REQ
END_REQ
BEGIN_RESP
END_RESP
• Obey all the rules of the base protocol. The LRM is your rule book
• Recommendation: keep close to the base protocol. The LRM is your guidebook
int m_attribute1;
Any number of attributes
string m_attribute2;
};
Initiator Target
tlm_generic_payload* trans; virtual void b_transport( ... )
... {
my_extension* ext;
my_extension* ext = new my_extension; trans.get_extension(ext);
ext->m_attribute1 = 1; if (ext) {
ext->m_attribute2 = "foo"; ... = ext->m_attribute1;
trans->set_auto_extension( ext ); ... = ext->m_attribute2;
...
socket->b_transport( *trans, delay ); }
Have the initiator add the extension Target can test for an extension
How do I do that?"
• An initiator ID or transaction ID
• A flag to lock the interconnect (initiator might rely on have exclusive access)
# refs
Allocate transaction object 3
2
1
0
acquire()
Call nb_transport_fw
acquire() nb_transport_fw
acquire()
release()
free()
Copyright © 2010 by Doulos. All rights reserved. 32
Memory Management Methods
class tlm_generic_payload {
public:
tlm_generic_payload () ;
tlm_generic_payload(tlm_mm_interface* mm) ;
virtual ~tlm_generic_payload ();
tlm_generic_payload* trans;
trans = m_mm.allocate(); Get transaction object from mm
trans->acquire(); Increment reference count
Target
Initiator
Multi-sockets
Target
Bus
Initiator Interconnect
Target
Thread
Target
Initiator Controller
Thread Target
deep_copy_from()
update_original_from()
Extension Extension
Extension Extension
new_trans->set_data_ptr( &data_buffer );
new_trans->deep_copy_from ( original_trans );
new_trans->b_transport(...);
original_trans->update_original_from( new_trans ); Copies back data array on read
new_trans->set_data_ptr( 0 );
new_trans->deep_copy_from ( original_trans );
new_trans->set_data_ptr( original_trans->get_data_ptr() );
new_trans->b_transport(...);
original_trans->update_original_from( new_trans ); Does not touch data array
A. You can model precise timing with the AT coding style, but why not use RTL?
• IEEE 1666
standards.ieee.org/getieee/1666/index.html
www.doulos.com/knowhow/systemc/tlm2