HOME       UP       PREV       NEXT (TLM in SystemC: TLM 2.0)  

ESL TLM in SystemC: TLM 2.0

Although there was a limited capability in SystemC 1.0 to pass threads along channels, and hence do subroutine calls along what look like wire, this was made much easier SystemC 2.0.

TLM2.0 (July 2008) tidies away the TLM1.0 interface inheritance using convenience sockets and defines the generic payload.

It also defines memory/garbage ownership and transport primitives with timing and backdoor access to RAM models.

// Filling in the fields or a TLM2.0 generic payload:
  trans.set_command(tlm::TLM_WRITE_COMMAND);
  trans.set_address(addr);
  trans.set_data_ptr(reinterpret_cast(&data));
  trans.set_data_length(4);
  trans.set_streaming_width(4);
  trans.set_byte_enable_ptr(0);
  trans.set_response_status( tlm::TLM_INCOMPLETE_RESPONSE );

// Sending the payload through a TLM socket:
  socket->b_transport(trans, delay);

Other standard payloads (e.g. 802.3 frame or audio sample) might be expected ?


22: (C) 2008-17, DJ Greaves, University of Cambridge, Computer Laboratory.