| |||
| Home > Peripheral and Interface Components > AMBA-PV Components > SystemC classes | |||
This section describes SystemC classes used in the AMBAPV protocol behaviors, and which are part of the AMBA TLM PV library for OSCI TLM 2.0.
The amba_pv::amba_pv_control class
provides support for AMBA protocol additional control information.
The additional control information supported by the AMBA protocol
and modeled by this class includes:
protection units
exclusive access and locked access mechanisms
system-level caches.
The class provides the API:
class amba_pv_control {
/* Construction */
public:
amba_pv_control();
/* Accessors */
/* Transaction ID */
void set_id(unsigned int);
unsigned int get_id() const;
/* Protection unit support */
void set_privileged(bool /* privileged */ = true);
bool is_privileged() const;
void set_non_secure(bool /* non_secure */ = true);
bool is_non_secure() const;
void set_instruction(bool /* instruction */ = true);
bool is_instruction() const;
/* Atomic access support */
void set_exclusive(bool /* exclusive */ = true);
bool is_exclusive() const;
void set_locked(bool /* locked */ = true);
bool is_locked() const;
/* Cache support */
void set_bufferable(bool /* bufferable */ = true);
bool is_bufferable() const;
void set_cacheable(bool /* cacheable */ = true);
bool is_cacheable() const;
void set_read_allocate(bool /* read_allocate */ = true);
bool is_read_allocate() const;
void set_write_allocate(bool /* write_allocate */ = true);
bool is_write_allocate() const;
};
The amba_pv::amba_pv_resp_t type defines
the AMBA-PV protocol response type. Defined values are:
AMBA_PV_OKAY
AMBA_PV_EXOKAY
AMBA_PV_SLVERR
AMBA_PV_DECERR.
This is the type definition (in the amba_pv namespace)
for the AMBA-PV protocol transaction type. The amba_pv_types.h file
contains:
struct amba_pv_protocol_types {
typedef tlm::tlm_generic_payload tlm_payload_type;
typedef tlm::tlm_phase tlm_phase_type;
};
typedef amba_pv_protocol_types::tlm_payload_type amba_pv_transaction