Changes between Version 42 and Version 43 of Writing Rules/Tlmt


Ignore:
Timestamp:
Feb 19, 2008, 9:41:08 PM (16 years ago)
Author:
fpecheux
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Writing Rules/Tlmt

    v42 v43  
    4040To send a VCI command packet, the '''execLoop()''' method must use the '''send()''' method, that is a member function of the '''p_vci''' port. The prototype is the following:
    4141{{{
    42 void send(vci_cmd_t     *cmd,   // VCI command packet   
    43           uint32_t time);       // initiator local time
     42void send(vci_cmd_packet<vci_param> *cmd,       // VCI command packet   
     43          tlmt_core::tlmt_time time);           // initiator local time
    4444}}}
    4545
    4646The informations transported by a VCI command packet are defined below:
    4747{{{
    48 class vci_cmd_t {
    49 vci_param::vci_command_t  cmd;  // VCI transaction type
    50 vci_param::vci_address_t  *address;  // pointer to an array of addresses on the target side
    51 uint32_t  be;  // byte_enable value (same value for all packet words)
    52 bool   contig;    // contiguous addresses (when true)
    53 vci_param::vci_data_t  *buf;  // pointer to the local buffer on the initiator
    54 uint32_t  length;  // number of words in the packet
    55 uint32_t  srcid;  // VCI Source ID
    56 uint32_t  trdid;  // VCI Thread ID
    57 uint32_t  pktid;  // VCI Packet ID
    58 }
    59 }}}
    60 
    61 The possible values for the '''cmd''' fied are  `vci_param::CMD_READ`, `vci_param::CMD_WRITE`, `vci_param::CMD_READ_LOCKED`,
     48template<typename vci_param>
     49class vci_cmd_packet
     50{
     51public:
     52        typename vci_param::cmd_t cmd;        // VCI transaction type
     53        typename vci_param::addr_t *address;  // pointer to an array of addresses on the target side
     54        unsigned int be;                      // byte_enable value (same value for all packet words)
     55        bool contig;                          // contiguous addresses (when true)
     56        typename vci_param::data_t *buf;      // pointer to the local buffer on the initiator
     57        size_t length;                        // number of words in the packet
     58        uint32_t srcid;                       // VCI Source ID
     59        uint32_t trdid;                       // VCI Thread ID
     60        uint32_t pktid;                       // VCI Packet ID
     61};
     62}}}
     63
     64The possible values for the '''cmd''' filed are  `vci_param::CMD_READ`, `vci_param::CMD_WRITE`, `vci_param::CMD_READ_LOCKED`,
    6265and `vci_param::CMD_STORE_COND`.
    6366The '''contig''' field can be used for optimisation.
    6467
    65 The '''send()''' function is non-blocking. To implement a blocking transaction (such as a cache line read, where the processor is ''frozen'' during the VCI transaction), the model designer must use the '''wait()''' primitive : the '''execLoop()''' thread is suspended, and will be activated when the response packet is received.
     68The '''send()''' function is non-blocking. To implement a blocking transaction (such as a cache line read, where the processor is ''frozen'' during the VCI transaction), the model designer must use the SystemC '''sc_core::wait(x)''' primitive ('''x''' being of type '''sc_core::sc_event''') : the '''execLoop()''' thread is then suspended, and will be reactivated when the response packet is actually received.
    6669
    6770== C.2) Receiving a VCI response packet ==