| AMBA-PV Extensions to OSCI TLM 2.0 Reference Manual |
The amba_pv_protocol_checker model is used for confirming that your model complies with the AMBA-PV protocol.
You can instantiate the protocol checker between any pair of AMBA-PV master and slave sockets. The transactions that pass through are checked against the AMBA-PV protocol and errors reported using the SystemC reporting mechanism. All errors are reported with a message type of "amba_pv_protocol_checker" and with a severity of SC_ERROR. Recommendations are reported with a severity of SC_WARNING.
You can configure the the protocol checker to specifically test your model against one of the AXI, AHB or APB protocols.
The AMBA-PV protocol checker model might have an effect on performance.
| BUSWIDTH | bus width in bits as one of 8, 16, 32, 64, 128, 256, 512, or 1024. Defaults to 64. |
Public Member Functions | |
| amba_pv_protocol_checker (const sc_core::sc_module_name &, bool=true) | |
| Constructor. | |
| virtual | ~amba_pv_protocol_checker () |
| Destructor. | |
| virtual const char * | kind () const |
| Returns the kind string of this protocol checker. | |
| void | recommend_on (bool=true) |
| Enables or disables reporting of protocol recommendations. | |
| void | check_protocol (amba_pv_protocol_t=AMBA_PV_AXI) |
| Selects the AMBA 3 protocol checks to perform. | |
Data Fields | |
| amba_pv_slave_socket< BUSWIDTH > | amba_pv_s |
| Slave socket. | |
| amba_pv_master_socket< BUSWIDTH > | amba_pv_m |
| Master socket. | |
Protected Member Functions | |
| virtual void | b_transport (int, amba_pv_transaction &, sc_core::sc_time &) |
| Blocking transport. | |
| virtual unsigned int | transport_dbg (int, amba_pv_transaction &) |
| Debug access to a target. | |
| virtual bool | get_direct_mem_ptr (int, amba_pv_transaction &, tlm::tlm_dmi &) |
| Requests a DMI access based on the specified transaction. | |
| virtual void | invalidate_direct_mem_ptr (int, sc_dt::uint64, sc_dt::uint64) |
| Invalidates DMI pointers previously established for the specified DMI region. | |
| amba_pv::amba_pv_protocol_checker< BUSWIDTH >::amba_pv_protocol_checker | ( | const sc_core::sc_module_name & | name, | |
| bool | recommend_on = true | |||
| ) | [inline, explicit] |
Constructor.
Constructs a new amba_pv_protocol_checker with parameter for configuring recommended rules.
| name | protocol checker name. | |
| recommend_on | true to enable reporting of protocol recommendations, false otherwise. |
| amba_pv::amba_pv_protocol_checker< BUSWIDTH >::~amba_pv_protocol_checker | ( | ) | [inline, virtual] |
Destructor.
| const char * amba_pv::amba_pv_protocol_checker< BUSWIDTH >::kind | ( | ) | const [inline, virtual] |
Returns the kind string of this protocol checker.
| void amba_pv::amba_pv_protocol_checker< BUSWIDTH >::recommend_on | ( | bool | recommend_on = true | ) | [inline] |
Enables or disables reporting of protocol recommendations.
If recommend_on is set to false, no recommendations are reported and the following warning is issued:
Warning: amba_pv_protocol_checker: All AMBA-PV recommended rules have been disabled by recommend_on()
| recommend_on | true to enable reporting of recommendations (default), false otherwise. |
| void amba_pv::amba_pv_protocol_checker< BUSWIDTH >::check_protocol | ( | amba_pv_protocol_t | protocol = AMBA_PV_AXI | ) | [inline] |
Selects the AMBA 3 protocol checks to perform.
The protocol checker tests your model against the selected AMBA 3 protocol.
If protocol is set to AMBA_PV_AHB, transactions are checked against the AHB protocol and the following warning is issued:
Warning: amba_pv_protocol_checker: AHB protocol rules have been selected by check_protocol()
If protocol is set to AMBA_PV_APB, transactions are checked against the APB protocol and the following warning is issued:
Warning: amba_pv_protocol_checker: APB protocol rules have been selected by check_protocol()
| protocol | selected AMBA 3 protocol checks as one of AMBA_PV_AXI, AMBA_PV_AHB, or AMBA_PV_APB. Defaults to AMBA_PV_AXI. |
| void amba_pv::amba_pv_protocol_checker< BUSWIDTH >::b_transport | ( | int | socket_id, | |
| amba_pv_transaction & | trans, | |||
| sc_core::sc_time & | t | |||
| ) | [inline, protected, virtual] |
Blocking transport.
This version of the method completes the transaction and checks it complies with the AMBA 3 buses protocols.
Implements amba_pv::amba_pv_fw_transport_if.
| unsigned int amba_pv::amba_pv_protocol_checker< BUSWIDTH >::transport_dbg | ( | int | socket_id, | |
| amba_pv_transaction & | trans | |||
| ) | [inline, protected, virtual] |
Debug access to a target.
This version of the method forwards this debug access to the slave and checks it complies with the AMBA 3 buses protocols.
Implements amba_pv::amba_pv_fw_transport_if.
| bool amba_pv::amba_pv_protocol_checker< BUSWIDTH >::get_direct_mem_ptr | ( | int | socket_id, | |
| amba_pv_transaction & | trans, | |||
| tlm::tlm_dmi & | dmi_data | |||
| ) | [inline, protected, virtual] |
Requests a DMI access based on the specified transaction.
This version of the method forwards this DMI access request to the slave and checks it complies with the AMBA 3 buses protocols.
Implements amba_pv::amba_pv_fw_transport_if.
| void amba_pv::amba_pv_protocol_checker< BUSWIDTH >::invalidate_direct_mem_ptr | ( | int | socket_id, | |
| sc_dt::uint64 | start_range, | |||
| sc_dt::uint64 | end_range | |||
| ) | [inline, protected, virtual] |
Invalidates DMI pointers previously established for the specified DMI region.
This version of the method forwards this DMI call to the master.
Implements amba_pv::amba_pv_bw_transport_if.
| amba_pv_slave_socket<BUSWIDTH> amba_pv::amba_pv_protocol_checker< BUSWIDTH >::amba_pv_s |
Slave socket.
| amba_pv_master_socket<BUSWIDTH> amba_pv::amba_pv_protocol_checker< BUSWIDTH >::amba_pv_m |
Master socket.