TLM Convenience Socket Parvinder Pal Singh Girish Verma


















- Slides: 18
TLM Convenience Socket Parvinder Pal Singh Girish Verma
Presentation Topics • Brief note on OSCI TLM 2. 0 • Challenges in TLM 2. 0 • Features provided by Convenience Layer • Convenience Socket Modeling
Brief ON OSCI TLM 2. 0 1. Core Interfaces and TLM 2 Sockets nb_transport_bw (TRANS, phase, time) Initiator Target b_transport (TRANS, time) nb_transport_fw (TRANS, phase, time) 2. Generic payload Command Address Data Byte enables Response status Extensions
Brief ON OSCI TLM 2. 0 Loosely – Timed Modeling Call Approximately-Timed Modeling BEGIN_REQ b_transportns) END_REQ Return MASTER BEGIN_RESP END_RESP SLAVE MASTER SLAVE
Extending Base TLM 2. 0 • To get more timing information BEGIN_REQ END_REQ GENERIC PAYLOAD BEGIN_DATA END_DATA BEGIN_RESP END_RESP Protocol Specific Extensions Payload With Extensions • To Extend Generic structure to protocol specific
Challenges in TLM 2. 0 • Implementing State Machine • Writing FSM for every IP makes it difficult for IP developer • Managing TRANS becomes complex • Managing TRANS field settings gets tough • Compile time Fixing of BUSWIDTH • Addition and Deletion of Protocol Specific Extensions to GP • Managing the extensions that already have been added to GP
Features of Conv’ Layer • various abstraction levels supported • Memory management for TRANS and its extensions • Support to VCD TRACE for trans and its extensions • Support to Statistics Collection • Bus protocol independent APIs and callbacks • One time information for GP extension Phase • Bus-Width Configuration
Abstraction Levels • Support various Abstraction Level • For e. g. OCP-IP define 4 level • TL 4, TL 3, TL 2, TL 1 • Run-time configuration of abstraction level of a transaction Simulation in progress b_transport Abstraction Level Change request Slave also configures itself for abstraction level communicated through master
Memory Management • No NEED for extensions managing TRANS and its • Configures memory manager to provide data and byte enable pointers • Configures the number of transactions that are outstanding at any given time by restricting TRANS Pool For Data array Pool For be array Pool For Extension Memory Manager Master Process Transaction
VCD Trace and Statistics • Tracing at all abstraction levels • Tracing of GP fields, extensions and phases • Contains information like • Number of phases sent • Number of transaction types sent • Number of bytes sent, etc. • Provides statistics for a SOCKET
Protocol Independent APIs Register API for Invalidating DMI API to set trace file MASTER Reset Debug Register to get write handler Dmi Register to get read handler Read write blocking Register debug Read write Non blocking Register DMI get trans b/nb Register Reset Invalidate DMI SLAVE
Callbacks • Provides the option whether or not to have callbacks • Provides the timing information Status read_data(fn_ptr resume_txn, trans, offset, size, request_level) MASTER Status write_data(fn_ptr resume_txn, trans, offset, size, request_level) Status write_status(fn_ptr resume_txn, trans) Status accept_command(fn_ptr accepted, trans) Status read_data(fn_ptr resume_txn, trans, offset, size, request_level) Status write_status(fn_ptr resume_txn, trans) SLAVE
TL 4 Abstraction Level Transaction Queue read_nb() b_transport() get_read_handler() write_nb() accept_command() read_nb() read_data() b_transport read_data() MASTER Master Convenience Slave Convenience SLAVE
TL 1 Abstraction Level write_b() BEGIN_REQ get_write_handler() accept_command() END_REQ phase 1 Write_data phase 2 Write_data BEGIN_RESP Write_Resp END_RESP MASTER M Conven. S Conven SLAVE
Bus-Width Configuration • TLM 2 checks bus-width at compile time • Convenience layer allows the bus-width configuration until BEOE phase • Configure a new Bus-width pair without any re-compilation of the application convenience_initiator_socket<0> m_socket; convenience_target_socket<0> s_socket Elaboration and beoe phase Buswidth Configuration b_transport EOE phase Return if BW matches Mismatch Stop Simulation
TLM 2. 0 Structure Abstract API for FSM IMPLEMENTATION Memory Manager Configurable Param TLM 2. 0 Core Interfaces and Generic Payload Protocol Specific Implementation API to Add Phases And Extension Convenience Layer Generic API and Callbacks USER IP MODEL
Pseudo-Code struct bus_protocol_type { typedef memory_manager typedef fsm_factory typedef extension typedef convenience_config_param }; mm; factory_class; extension_class; config_param; template <uint 32_t BUSWIDTH = 0, typename TYPES = bus_protocol_type> class convenience_initiator_socket : public transport_initiator_socket <BUSWIDTH, typename TYPES: : mm, typename TYPES: : extension_class>, public TYPES: : config_param
Thank You!!