33 std::ostream&
operator<<(std::ostream& os, tlm::tlm_generic_payload
const& t);
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);
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 };
75 inline bool apb_extension::is_privileged()
const {
return ext_prot & PRIV; }
77 inline void apb_extension::set_privileged(
bool priv) {
84 inline bool apb_extension::is_non_secure()
const {
return ext_prot & NON_SEC; }
86 inline void apb_extension::set_non_secure(
bool priv) {
93 inline bool apb_extension::is_instruction()
const {
return ext_prot & INSTR; }
95 inline void apb_extension::set_instruction(
bool instr) {
102 inline uint8_t apb_extension::get_protection()
const {
return ext_prot & 0x7; }
103 inline void apb_extension::set_protection(uint8_t prot) { ext_prot = (ext_prot & 0x8) | (prot & 0x7); }
105 inline bool apb_extension::is_nse()
const {
return ext_prot & NSE; }
107 inline 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