2.2.1 Class definition

This section describes the class definition.

The amba_pv_control base class includes attributes that relate to system-level caches, protection units, atomic accesses, QoS, multiple regions, cache coherency, barrier transactions, and DVM. The amba_pv_control class is used as an argument to the user layer interface methods.

namespace amba_pv {
enum amba_pv_domain_t {
    AMBA_PV_NON_SHAREABLE   = 0x0,
    AMBA_PV_INNER_SHAREABLE = 0x1,
    AMBA_PV_OUTER_SHAREABLE = 0x2,
    AMBA_PV_SYSTEM          = 0x3
};
std::string amba_pv_domain_string(amba_pv_domain_t);
enum amba_pv_bar_t {
    AMBA_PV_RESPECT_BARRIER         = 0x0,
    AMBA_PV_MEMORY_BARRIER          = 0x1,
    AMBA_PV_IGNORE_BARRIER          = 0x2,
    AMBA_PV_SYNCHRONISATION_BARRIER = 0x3
};
std::string amba_pv_bar_string(amba_pv_bar_t);
enum amba_pv_snoop_t {
    AMBA_PV_READ_NO_SNOOP          = 0x0,
    AMBA_PV_READ_ONCE              = 0x0,
    AMBA_PV_READ_CLEAN             = 0x2,
    AMBA_PV_READ_NOT_SHARED_DIRTY  = 0x3,
    AMBA_PV_READ_SHARED            = 0x1,
    AMBA_PV_READ_UNIQUE            = 0x7,
    AMBA_PV_CLEAN_UNIQUE           = 0xB,
    AMBA_PV_CLEAN_SHARED           = 0x8,
    AMBA_PV_CLEAN_INVALID          = 0x9,
    AMBA_PV_MAKE_UNIQUE            = 0xC,
    AMBA_PV_MAKE_INVALID           = 0xD,
    AMBA_PV_WRITE_NO_SNOOP         = 0x0,
    AMBA_PV_WRITE_UNIQUE           = 0x0,
    AMBA_PV_WRITE_LINE_UNIQUE      = 0x1,
    AMBA_PV_WRITE_BACK             = 0x3,
    AMBA_PV_WRITE_CLEAN            = 0x2,
    AMBA_PV_EVICT                  = 0x4,
    AMBA_PV_BARRIER                = 0x0,
    AMBA_PV_DVM_COMPLETE           = 0xE,
    AMBA_PV_DVM_MESSAGE            = 0xF
};
std::string amba_pv_snoop_read_string(amba_pv_snoop_t,amba_pv_domain_t,amba_pv_bar_t);
std::string amba_pv_snoop_write_string(amba_pv_snoop_t,amba_pv_domain_t,amba_pv_bar_t);
class amba_pv_control {
    public:
        amba_pv_control();
        void set_id(unsigned int);
        unsigned int get_id() const;
        void set_privileged(bool = true);
        bool is_privileged() const;
        void set_non_secure(bool = true);
        bool is_non_secure() const;
        void set_instruction(bool = true);
        bool is_instruction() const;
        void set_exclusive(bool = true);
        bool is_exclusive() const;
        void set_locked(bool = true);
        bool is_locked() const;
        void set_bufferable(bool = true);
        bool is_bufferable() const;
        void set_cacheable(bool = true);
        bool is_cacheable() const;
        void set_read_allocate(bool = true);
        bool is_read_allocate() const;
        void set_write_allocate(bool = true);
        bool is_write_allocate() const;
        void set_modifiable(bool = true);
        bool is_modifiable() const;
        void set_read_other_allocate(bool = true);
        bool is_read_other_allocate() const;
        void set_write_other_allocate(bool = true);
        bool is_write_other_allocate() const;
        void set_qos(unsigned int);
        unsigned int get_qos() const;
        void set_region(unsigned int);
        unsigned int get_region() const;
        void set_snoop(amba_pv_snoop_t);
        amba_pv_snoop_t get_snoop() const;
        void set_domain(amba_pv_domain_t);
        amba_pv_domain_t get_domain() const;
        void set_bar(amba_pv_bar_t);
        amba_pv_bar_t get_bar() const;
        void set_user(unsigned int);
        unsigned int get_user() const;
};
enum amba_pv_resp_t {
    AMBA_PV_OKAY    = 0x0,
    AMBA_PV_EXOKAY  = 0x1,
    AMBA_PV_SLVERR  = 0x2,
    AMBA_PV_DECERR  = 0x3,
};
std::string amba_pv_resp_string(amba_pv_resp_t);
amba_pv_resp_t amba_pv_resp_from_tlm(tlm::tlm_response_status);
tlm::tlm_response_status amba_pv_resp_to_tlm(amba_pv_resp_t);
class amba_pv_response {
    public:
        amba_pv_response();
        amba_pv_response(amba_pv_resp_t);
        void set_resp(amba_pv_resp_t);
        amba_pv_resp_t get_resp() const;
        bool is_okay() const;
        void set_okay();
        bool is_exokay() const;
        void set_exokay();
        bool is_slverr() const;
        void set_slverr();
        bool is_decerr() const;
        void set_decerr();
        bool is_pass_dirty() const;
        void set_pass_dirty(bool=true);
        bool is_shared() const;
        void set_shared(bool=true);
        bool is_snoop_data_transfer() const;
        void set_snoop_data_transfer(bool=true);
        bool is_snoop_error() const;
        void set_snoop_error(bool=true);
        bool is_snoop_was_unique() const;
        void set_snoop_was_unique(bool=true);
        void reset();
};
enum amba_pv_dvm_message_t {
    AMBA_PV_TLB_INVALIDATE                        = 0x0,
    AMBA_PV_BRANCH_PREDICTOR_INVALIDATE           = 0x1,
    AMBA_PV_PHYSICAL_INSTRUCTION_CACHE_INVALIDATE = 0x2,
    AMBA_PV_VIRTUAL_INSTRUCTION_CACHE_INVALIDATE  = 0x3,
    AMBA_PV_SYNC                                  = 0x4,
    AMBA_PV_HINT                                  = 0x6
};
std::string amba_pv_dvm_message_string(amba_pv_dvm_message_t);
enum amba_pv_dvm_os_t {
    AMBA_PV_HYPERVISOR_OR_GUEST = 0x0,
    AMBA_PV_GUEST               = 0x2,
    AMBA_PV_HYPERVISOR          = 0x3
};
std::string amba_pv_dvm_os_string(amba_pv_dvm_os_t);
enum amba_pv_dvm_security_t {
    AMBA_PV_SECURE_AND_NON_SECURE = 0x0,
    AMBA_PV_SECURE_ONLY           = 0x2,
    AMBA_PV_NON_SECURE_ONLY       = 0x3
};
std::string amba_pv_dvm_security_string(amba_pv_dvm_security_t);
class amba_pv_dvm {
    public:
        amba_pv_dvm();
        void set_dvm_transaction(unsigned int);
        unsigned int get_dvm_transaction() const;
        void set_dvm_additional_address(sc_dt::uint64);
        bool is_dvm_additional_address_set() const;
        sc_dt::uint64 get_dvm_additional_address() const;
        void set_dvm_vmid(unsigned int);
        bool is_dvm_vmid_set() const;
        unsigned int get_dvm_vmid() const;
        void set_dvm_asid(unsigned int);
        bool is_dvm_asid_set() const;
        unsigned int get_dvm_asid() const;
        void set_dvm_virtual_index(unsigned int);
        bool is_dvm_virtual_index_set() const;
        unsigned int get_dvm_virtual_index() const;
        void set_dvm_completion(bool /* completion */ = true);
        bool is_dvm_completion_set() const;
        void set_dvm_message_type(amba_pv_dvm_message_t);
        amba_pv_dvm_message_t get_dvm_message_type() const;
        void set_dvm_os(amba_pv_dvm_os_t);
        amba_pv_dvm_os_t get_dvm_os() const;
        void set_dvm_security(amba_pv_dvm_security_t);
        amba_pv_dvm_security_t get_dvm_security() const;
        void reset();
};
enum amba_pv_burst_t {
    AMBA_PV_FIXED = 0,
    AMBA_PV_INCR,
    AMBA_PV_WRAP
};
std::string amba_pv_burst_string(amba_pv_burst_t);
class amba_pv_extension:
    public tlm::tlm_extension<amba_pv_extension>,
    public amba_pv_control
    public amba_pv_dvm {
    public:
        amba_pv_extension();
        amba_pv_extension(size_t, const amba_pv_control *);
        amba_pv_extension(size_t,
                          size_t,
                          const amba_pv_control *,
                          amba_pv_burst_t);
        virtual tlm::tlm_extension_base * clone() const;
        virtual void copy_from(tlm::tlm_extension_base const &);
        void set_length(unsigned int);
        unsigned int get_length() const;
        void set_size(unsigned int);
        unsigned int get_size() const;
        void set_burst(amba_pv_burst_t);
        amba_pv_burst_t get_burst() const;
        void set_resp(amba_pv_resp_t);
        amba_pv_resp_t get_resp() const;
        bool is_okay() const;
        void set_okay();
        bool is_exokay() const;
        void set_exokay();
        bool is_slverr() const;
        void set_slverr();
        bool is_decerr() const;
        void set_decerr();
        bool is_pass_dirty() const;
        void set_pass_dirty(bool);
        bool is_shared() const;
        void set_shared(bool);
        bool is_snoop_data_transfer() const;
        void set_snoop_data_transfer(bool=true);
        bool is_snoop_error() const;
        void set_snoop_error(bool=true);
        bool is_snoop_was_unique() const;
        void set_snoop_was_unique(bool=true);
        void set_response_array_ptr(amba_pv_response*);
        amba_pv_response* get_response_array_ptr();
        void set_response_array_complete(bool=true);
        bool is_response_array_complete();
        void reset();
        void reset(unsigned int,
                          const amba_pv_control *);
        void reset(unsigned int,
                          unsigned int,
                          const amba_pv_control *,
                          amba_pv_burst_t);
};
sc_dt::uint64 amba_pv_address(const sc_dt::uint64 &,
                              unsigned int,
                              unsigned int,
                              amba_pv_burst_t,
                              unsigned int);
}
Non-ConfidentialPDF file icon PDF version100962_0200_03_en
Copyright © 2014–2018 Arm Limited (or its affiliates). All rights reserved.