scc  2022.4.0
SystemC components library
chi Namespace Reference

TLM2.0 components modeling CHI. More...

Classes

class  tlm_id_ext_recording
 
class  chi_ctrl_ext_recording
 
class  chi_data_ext_recording
 
class  chi_snp_ext_recording
 
class  chi_credit_ext_recording
 
struct  enable_for_enum
 
struct  common
 
struct  request
 
struct  snp_request
 
struct  data
 
struct  response
 
struct  credit
 
struct  chi_ctrl_extension
 
struct  chi_snp_extension
 
struct  chi_data_extension
 
struct  chi_credit_extension
 
struct  chi_protocol_types
 The AXI protocol traits class. Since the protocoll defines additional non-ignorable phases a dedicated protocol traits class has to be defined. More...
 
class  bw_blocking_transport_if
 
class  chi_bw_transport_if
 
struct  chi_initiator_socket
 
struct  chi_target_socket
 
struct  enable_for_enum< req_optype_e >
 
struct  enable_for_enum< snp_optype_e >
 
struct  enable_for_enum< dat_optype_e >
 
struct  enable_for_enum< dat_resptype_e >
 
struct  enable_for_enum< rsp_optype_e >
 
struct  enable_for_enum< rsp_resptype_e >
 
struct  enable_for_enum< rsp_resperrtype_e >
 

Typedefs

using chi_payload = tlm::tlm_generic_payload
 aliases for payload and phase types
 
using chi_phase = tlm::tlm_phase
 
template<typename TYPES = chi::chi_protocol_types>
using chi_fw_transport_if = tlm::tlm_fw_transport_if< TYPES >
 alias declaration for the forward interface
 

Enumerations

enum class  req_optype_e : uint8_t {
  ReqLCrdReturn = 0x00 , ReadShared = 0x01 , ReadClean = 0x02 , ReadOnce = 0x03 ,
  ReadNoSnp = 0x04 , PCrdReturn = 0x05 , Reserved = 0x06 , ReadUnique = 0x07 ,
  CleanShared = 0x08 , CleanInvalid = 0x09 , MakeInvalid = 0x0A , CleanUnique = 0x0B ,
  MakeUnique = 0x0C , Evict = 0x0D , EOBarrier = 0x0E , ECBarrier = 0x0F ,
  ReadNoSnpSep = 0x11 , CleanSharedPersistSep = 0x13 , DVMOp = 0x14 , WriteEvictFull = 0x15 ,
  WriteCleanPtl = 0x16 , WriteCleanFull = 0x17 , WriteUniquePtl = 0x18 , WriteUniqueFull = 0x19 ,
  WriteBackPtl = 0x1A , WriteBackFull = 0x1B , WriteNoSnpPtl = 0x1C , WriteNoSnpFull = 0x1D ,
  WriteUniqueFullStash = 0x20 , WriteUniquePtlStash = 0x21 , StashOnceShared = 0x22 , StashOnceUnique = 0x23 ,
  ReadOnceCleanInvalid = 0x24 , ReadOnceMakeInvalid = 0x25 , ReadNotSharedDirty = 0x26 , CleanSharedPersist = 0x27 ,
  AtomicStoreAdd = 0x28 , AtomicStoreClr = 0x29 , AtomicStoreEor = 0x2A , AtomicStoreSet = 0x2B ,
  AtomicStoreSmax = 0x2C , AtomicStoreSmin = 0x2D , AtomicStoreUmax = 0x2E , AtomicStoreUmin = 0x2F ,
  AtomicLoadAdd = 0x30 , AtomicLoadClr = 0x31 , AtomicLoadEor = 0x32 , AtomicLoadSet = 0x33 ,
  AtomicLoadSmax = 0x34 , AtomicLoadSmin = 0x35 , AtomicLoadUmax = 0x36 , AtomicLoadUmin = 0x37 ,
  AtomicSwap = 0x38 , AtomicCompare = 0x39 , PrefetchTgt = 0x3A , MakeReadUnique = 0x41 ,
  WriteEvictOrEvict = 0x42 , WriteUniqueZero = 0x43 , WriteNoSnpZero = 0x44 , StashOnceSepShared = 0x47 ,
  StashOnceSepUnique = 0x48 , ReadPreferUnique = 0x4c , WriteNoSnpFullCleanSh = 0x50 , WriteNoSnpFullCleanInv = 0x51 ,
  WriteNoSnpFullCleanShPerSep = 0x52 , WriteUniqueFullCleanSh = 0x54 , WriteUniqueFullCleanShPerSep = 0x56 , WriteBackFullCleanSh = 0x58 ,
  WriteBackFullCleanInv = 0x59 , WriteBackFullCleanShPerSep = 0x5A , WriteCleanFullCleanSh = 0x5c , WriteCleanFullCleanShPerSep = 0x5e ,
  WriteNoSnpPtlCleanSh = 0x60 , WriteNoSnpPtlCleanInv = 0x61 , WriteNoSnpPtlCleanShPerSep = 0x62 , WriteUniquePtlCleanSh = 0x64 ,
  WriteUniquePtlCleanShPerSep = 0x66 , ILLEGAL = 0xFF
}
 
enum class  snp_optype_e : uint8_t {
  SnpLCrdReturn = 0x00 , SnpShared = 0x01 , SnpClean = 0x02 , SnpOnce = 0x03 ,
  SnpNotSharedDirty = 0x04 , SnpUniqueStash = 0x05 , SnpMakeInvalidStash = 0x06 , SnpUnique = 0x07 ,
  SnpCleanShared = 0x08 , SnpCleanInvalid = 0x09 , SnpMakeInvalid = 0x0A , SnpStashUnique = 0x0B ,
  SnpStashShared = 0x0c , SnpDVMOp = 0x0D , SnpQuery = 0x10 , SnpSharedFwd = 0x11 ,
  SnpCleanFwd = 0x12 , SnpOnceFwd = 0x13 , SnpNotSharedDirtyFwd = 0x14 , SnpPreferUnique = 0x15 ,
  SnpPreferUniqueFwd = 0x16 , SnpUniqueFwd = 0x17 , ILLEGAL = 0x20
}
 
enum class  dat_optype_e : uint8_t {
  DataLCrdReturn = 0x0 , SnpRespData = 0x1 , CopyBackWrData = 0x2 , NonCopyBackWrData = 0x3 ,
  CompData = 0x4 , SnpRespDataPtl = 0x5 , SnpRespDataFwded = 0x6 , WriteDataCancel = 0x7 ,
  DataSepResp = 0xB , NCBWrDataCompAck = 0xC , SnpRespData_I = 0x1 , SnpRespData_UC = 0x1 ,
  SnpRespData_UD = 0x1 , SnpRespData_SC = 0x1 , SnpRespData_SD = 0x1 , SnpRespData_I_PD = 0x1 ,
  SnpRespData_UC_PD = 0x1 , SnpRespData_SC_PD = 0x1 , SnpRespDataPtl_I_PD = 0x5 , SnpRespDataPtl_UD = 0x5 ,
  SnpRespData_I_Fwded_SC = 0x6 , SnpRespData_I_Fwded_SD_PD = 0x6 , SnpRespData_SC_Fwded_SC = 0x6 , SnpRespData_SC_Fwded_SD_PD = 0x6 ,
  SnpRespData_SD_Fwded_SC = 0x6 , SnpRespData_I_PD_Fwded_I = 0x6 , SnpRespData_I_PD_Fwded_SC = 0x6 , SnpRespData_SC_PD_Fwded_I = 0x6 ,
  SnpRespData_SC_PD_Fwded_SC = 0x6
}
 
enum class  dat_resptype_e : uint8_t {
  CompData_I = 0b000 , CompData_SC = 0b001 , CompData_UC = 0b010 , CompData_UD_PD = 0b110 ,
  CompData_SD_PD = 0b111 , DataSepResp_I = 0b000 , DataSepResp_SC = 0b001 , DataSepResp_UC = 0b010 ,
  RespSepData_I = 0b000 , RespSepData_SC = 0b001 , RespSepData_UC = 0b010 , SnpRespData_I = 0b000 ,
  SnpRespData_UC = 0b010 , SnpRespData_UD = 0b010 , SnpRespData_SC = 0b001 , SnpRespData_SD = 0b011 ,
  SnpRespData_I_PD = 0b100 , SnpRespData_UC_PD = 0b110 , SnpRespData_SC_PD = 0b101 , SnpRespDataPtl_I_PD = 0b100 ,
  SnpRespDataPtl_UD = 0b010 , Comp_I = 0b000 , Comp_UC = 0b010 , Comp_SC = 0b001 ,
  CopyBackWrData_I = 0b000 , CopyBackWrData_UC = 0b010 , CopyBackWrData_SC = 0b001 , CopyBackWrData_UD_PD = 0b110 ,
  CopyBackWrData_SD_PD = 0b111 , NonCopyBackWrData = 0b000 , NCBWrDataCompAck = 0b000
}
 
enum class  rsp_optype_e : uint8_t {
  RespLCrdReturn = 0x0 , SnpResp = 0x1 , CompAck = 0x2 , RetryAck = 0x3 ,
  Comp = 0x4 , CompDBIDResp = 0x5 , DBIDResp = 0x6 , PCrdGrant = 0x7 ,
  ReadReceipt = 0x8 , SnpRespFwded = 0x9 , TagMatch = 0xA , RespSepData = 0xB ,
  Persist =0xC , CompPersist = 0xD , DBIDRespOrd = 0xE , StashDone = 0x10 ,
  CompStashDone = 0x11 , CompCMO = 0x14 , INVALID = 0x20
}
 
enum class  rsp_resptype_e : uint8_t {
  SnpResp_I = 0b000 , SnpResp_SC = 0b001 , SnpResp_UC = 0b010 , SnpResp_UD = 0b010 ,
  SnpResp_SD = 0b011 , Comp_I = 0b000 , Comp_UC = 0b010 , Comp_SC = 0b001 ,
  Comp_UD_PD = 0b110 , SnpRespData_I = 0b000 , SnpRespData_UC = 0b010 , SnpRespData_UD = 0b010 ,
  SnpRespData_SC = 0b001 , SnpRespData_SD = 0b011 , SnpRespData_I_PD = 0b100 , SnpRespData_UC_PD = 0b110 ,
  SnpRespData_SC_PD = 0b101 , SnpRespDataPtl_I_PD = 0b100 , SnpRespDataPtl_UD = 0b010
}
 
enum class  rsp_resperrtype_e : uint8_t { OK = 0b00 , EXOK = 0b01 , DERR = 0b10 , NDERR = 0b11 }
 
enum class  credit_type_e : uint8_t { LINK , REQ , RESP , DATA }
 
enum class  dvm_e {
  DVMOpSize = 0x3 , PacketNumShift = 3 , TLBI = 0x0 , BranchPredictorInvalidate = 0x1 ,
  PICI = 0x2 , VICI = 0x3 , Sync = 0x4 , AddressBits = 37 ,
  DVMOpMask = 0x7 , DVMOpShift = 11 , DVMVAValidMask = 0x1 , DVMVAValidShift = 4
}
 

Functions

template<>
const char * to_char< req_optype_e > (req_optype_e v)
 
template<>
const char * to_char< dat_optype_e > (dat_optype_e v)
 
template<>
const char * to_char< rsp_optype_e > (rsp_optype_e v)
 
template<>
const char * to_char< snp_optype_e > (snp_optype_e v)
 
template<>
const char * to_char< dat_resptype_e > (dat_resptype_e v)
 
template<>
const char * to_char< rsp_resptype_e > (rsp_resptype_e v)
 
template<>
const char * to_char< rsp_resperrtype_e > (rsp_resperrtype_e v)
 
template<>
const char * to_char< credit_type_e > (credit_type_e v)
 
template<>
bool is_valid< chi::chi_ctrl_extension > (chi_ctrl_extension *ext)
 
template<typename E >
into (typename std::underlying_type< E >::type t)
 
template<typename E , typename ULT = typename std::underlying_type<E>::type, typename X = typename std::enable_if<std::is_enum<E>::value && !std::is_convertible<E, ULT>::value, bool>::type>
constexpr ULT to_int (E t)
 
template<typename E >
const char * to_char (E t)
 
template<typename E , typename std::enable_if< enable_for_enum< E >::value, bool >::type >
std::ostream & operator<< (std::ostream &os, E e)
 
 DECLARE_EXTENDED_PHASE (BEGIN_PARTIAL_DATA)
 
 DECLARE_EXTENDED_PHASE (END_PARTIAL_DATA)
 
 DECLARE_EXTENDED_PHASE (BEGIN_DATA)
 
 DECLARE_EXTENDED_PHASE (END_DATA)
 
 DECLARE_EXTENDED_PHASE (ACK)
 
template<typename EXT >
bool is_valid (EXT &ext)
 
template<typename EXT >
bool is_valid (EXT *ext)
 
bool is_dataless (const chi::chi_ctrl_extension *req_e)
 
bool is_atomic (const chi::chi_ctrl_extension *req_e)
 
bool is_request_order (const chi::chi_ctrl_extension *req_e)
 
template<>
req_optype_e into< req_optype_e > (typename std::underlying_type< req_optype_e >::type t)
 
template<>
snp_optype_e into< snp_optype_e > (typename std::underlying_type< snp_optype_e >::type t)
 
template<>
dat_optype_e into< dat_optype_e > (typename std::underlying_type< dat_optype_e >::type t)
 
template<>
dat_resptype_e into< dat_resptype_e > (typename std::underlying_type< dat_resptype_e >::type t)
 
template<>
rsp_optype_e into< rsp_optype_e > (typename std::underlying_type< rsp_optype_e >::type t)
 
template<>
rsp_resptype_e into< rsp_resptype_e > (typename std::underlying_type< rsp_resptype_e >::type t)
 
template<>
rsp_resperrtype_e into< rsp_resperrtype_e > (typename std::underlying_type< rsp_resperrtype_e >::type t)
 

Variables

std::array< char const *, 103 > opc2str
 

Detailed Description

TLM2.0 components modeling CHI.

SCV components for CHI.

LWTR components for CHI.

Function Documentation

◆ DECLARE_EXTENDED_PHASE()

chi::DECLARE_EXTENDED_PHASE ( BEGIN_PARTIAL_DATA  )

definition of the additional protocol phases

◆ into()

template<typename E >
E chi::into ( typename std::underlying_type< E >::type  t)
inline

helper function to convert integer into class enums

Parameters
t
Returns

◆ operator<<()

template<typename E , typename std::enable_if< enable_for_enum< E >::value, bool >::type >
std::ostream& chi::operator<< ( std::ostream &  os,
e 
)
inline
Parameters
os
e
Returns

Definition at line 60 of file chi_tlm.h.

◆ to_char()

template<typename E >
const char* chi::to_char ( t)

helper function to convert class enums into char string

Parameters
t
Returns

◆ to_int()

template<typename E , typename ULT = typename std::underlying_type<E>::type, typename X = typename std::enable_if<std::is_enum<E>::value && !std::is_convertible<E, ULT>::value, bool>::type>
constexpr ULT chi::to_int ( t)
inlineconstexpr

helper function to convert class enums into integer

Parameters
t
Returns

Definition at line 44 of file chi_tlm.h.