33std::ostream&
operator<<(std::ostream& os, tlm::tlm_generic_payload
const& t);
35struct apb_extension :
public tlm::tlm_extension<apb_extension> {
37 bool is_privileged()
const;
38 void set_privileged(
bool =
true);
40 void set_non_secure(
bool =
true);
41 bool is_non_secure()
const;
43 bool is_instruction()
const;
44 void set_instruction(
bool =
true);
46 uint8_t get_protection()
const;
47 void set_protection(uint8_t);
50 void set_nse(
bool =
true);
53 apb_extension() =
default;
55 apb_extension(
const apb_extension& o) =
default;
60 tlm::tlm_extension_base*
clone()
const override;
65 void copy_from(tlm::tlm_extension_base
const& ext)
override;
68 enum { PRIV = 1, NON_SEC = 2, INSTR = 4, NSE = 8 };
75inline bool apb_extension::is_privileged()
const {
return ext_prot & PRIV; }
77inline void apb_extension::set_privileged(
bool priv) {
84inline bool apb_extension::is_non_secure()
const {
return ext_prot & NON_SEC; }
86inline void apb_extension::set_non_secure(
bool priv) {
93inline bool apb_extension::is_instruction()
const {
return ext_prot & INSTR; }
95inline void apb_extension::set_instruction(
bool instr) {
102inline uint8_t apb_extension::get_protection()
const {
return ext_prot & 0x7; }
103inline void apb_extension::set_protection(uint8_t prot) { ext_prot = (ext_prot & 0x8) | (prot & 0x7); }
105inline bool apb_extension::is_nse()
const {
return ext_prot & NSE; }
107inline void apb_extension::set_nse(
bool instr) {
117 auto const* ahb_ext =
dynamic_cast<const apb_extension*
>(&ext);
TLM2.0 components modeling APB.
std::ostream & operator<<(std::ostream &os, const tlm::tlm_generic_payload &t)
tlm::tlm_extension_base * clone() const override
the clone function to create deep copies of
void copy_from(tlm::tlm_extension_base const &ext) override
deep copy all values from ext