| AMBA-PV Extensions to OSCI TLM 2.0 Reference Manual |
Each master is bound to an amba_pv_s[...] slave socket of the decoder, and each of the amba_pv_m[...] master sockets belonging to the decoder is bound to a socket belonging to a different slave. Each master-to-slave socket connection is point-to-point. The numbers of slave and master sockets of the decoder are specified using template arguments.
This decoder routes transactions through to the appropriate slave depending on the transaction address, translating the address to local address for each slave as it does so. The same address translation applies also to DMI and debug transactions.
The names of the master sockets follows the scheme "amba_pv_m%d", and the name for the slave sockets follows the scheme "amba_pv_s%d", where d is the socket index.
| BUSWIDTH | bus width in bits as one of 8, 16, 32, 64, 128, 256, 512, or 1024. Defaults to 64. | |
| NUMMASTERS | number of masters connected to this decoder. Defaults to 1. | |
| NUMSLAVES | number of slaves connected to this decoder. Defaults to 1. |
Public Member Functions | |
| amba_pv_decoder (const sc_core::sc_module_name &) | |
| Constructor. | |
| amba_pv_decoder (const sc_core::sc_module_name &, const std::string &) | |
| Parameterized constructor. | |
| virtual const char * | kind () const |
| Returns the kind string of this decoder. | |
| void | bind (int, base_slave_socket_type &, const sc_dt::uint64 &, const sc_dt::uint64 &) |
| Binds the specified slave socket to the master socket of this decoder at the specified index. | |
| void | operator() (int, base_slave_socket_type &, const sc_dt::uint64 &, const sc_dt::uint64 &) |
| Binds the specified slave socket to the master socket of this decoder at the specified index. | |
| 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. | |
| std::string | get_map_file () const |
| Returns the address map file. | |
| void | set_map_file (const std::string &) |
| Sets the address map file. | |
| amba_pv_address_map | get_address_map () const |
| Returns the address map of this decoder. | |
| void | set_address_map (const amba_pv_address_map &) |
| Sets the address map of this decoder. | |
| void | load_address_map (const std::string &) |
| Loads the address map of this decoder from the specified file. | |
| void | load_address_map (std::istream &) |
| Loads the address map of this decoder from the specified stream. | |
| void | print_address_map (const std::string &) const |
| Prints the address map of this decoder. | |
| void | print_address_map (std::ostream &) const |
| Prints the address map of this decoder. | |
| void | set_verbose (bool=true) |
| Sets the verbosity of this decoder. | |
Data Fields | |
| amba_pv_socket_array < slave_socket_type > | amba_pv_s |
| Slaves socket array. | |
| amba_pv_socket_array < master_socket_type > | amba_pv_m |
| Masters socket array. | |
| amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::amba_pv_decoder | ( | const sc_core::sc_module_name & | name | ) | [inline, explicit] |
Constructor.
| name | module name. |
| amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::amba_pv_decoder | ( | const sc_core::sc_module_name & | name, | |
| const std::string & | file | |||
| ) | [inline] |
Parameterized constructor.
| name | module name. | |
| file | file from which the address map of this decoder is loaded. |
sc_core::sc_find_object() method to find the slave sockets bound to the master sockets of this decoder. OSCI TLM 2.0, 9 Jun 2008, contains bugs in the convenience sockets, as their names are computed by sc_core::sc_gen_unique_name(). It is recommended to use the bind() methods rather than such map file if binding to OSCI TLM 2.0 convenience sockets. The OSCI TLM 2.0.1 release, 15 Jul 2009, fixes this.| const char * amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::kind | ( | ) | const [inline, virtual] |
Returns the kind string of this decoder.
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::bind | ( | int | index, | |
| base_slave_socket_type & | s, | |||
| const sc_dt::uint64 & | start, | |||
| const sc_dt::uint64 & | end | |||
| ) | [inline] |
Binds the specified slave socket to the master socket of this decoder at the specified index.
| index | master socket index. | |
| s | slave socket to bind to the master socket. | |
| start | start address of the memory region associated to the slave socket s. | |
| end | end address of this region. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::operator() | ( | int | index, | |
| base_slave_socket_type & | s, | |||
| const sc_dt::uint64 & | start, | |||
| const sc_dt::uint64 & | end | |||
| ) | [inline] |
Binds the specified slave socket to the master socket of this decoder at the specified index.
| index | master socket index. | |
| s | slave socket to bind to the master socket. | |
| start | start address of the memory region associated to the slave socket s. | |
| end | end address of this region. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::b_transport | ( | int | socket_id, | |
| amba_pv_transaction & | trans, | |||
| sc_core::sc_time & | t | |||
| ) | [inline, virtual] |
Blocking transport.
This version of the method decodes the address of the specified transaction and forwards it through the corresponding master socket to the addressed slave.
Implements amba_pv::amba_pv_fw_transport_if.
| unsigned int amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::transport_dbg | ( | int | socket_id, | |
| amba_pv_transaction & | trans | |||
| ) | [inline, virtual] |
Debug access to a target.
This version of the method decodes the address of the specified transaction and forwards it through the corresponding master socket to the addressed slave.
Implements amba_pv::amba_pv_fw_transport_if.
| bool amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::get_direct_mem_ptr | ( | int | socket_id, | |
| amba_pv_transaction & | trans, | |||
| tlm::tlm_dmi & | dmi_data | |||
| ) | [inline, virtual] |
Requests a DMI access based on the specified transaction.
This version of the method decodes the address of the specified transaction and forwards it through the corresponding master socket to the addressed slave. On return, the address range of the DMI descriptor is adjusted to the slave mapped range.
Implements amba_pv::amba_pv_fw_transport_if.
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::invalidate_direct_mem_ptr | ( | int | socket_id, | |
| sc_dt::uint64 | start_range, | |||
| sc_dt::uint64 | end_range | |||
| ) | [inline, virtual] |
Invalidates DMI pointers previously established for the specified DMI region.
This version of the method adjusts the address range of the DMI descriptor to the slave mapped range and broadcasts the invalidate_direct_mem_ptr() call through the slave sockets to all masters.
Implements amba_pv::amba_pv_bw_transport_if.
| std::string amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::get_map_file | ( | ) | const [inline] |
Returns the address map file.
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::set_map_file | ( | const std::string & | file | ) | [inline] |
Sets the address map file.
| file | file from which the address map of this decoder is loaded. |
sc_core::sc_find_object() method to find the slave sockets bound to the master sockets of this decoder. OSCI TLM 2.0, 9 Jun 2008, contains bugs in the convenience sockets, as their names are computed by sc_core::sc_gen_unique_name(). It is recommended to use the bind() methods rather than such map file if binding to OSCI TLM 2.0 convenience sockets. The OSCI TLM 2.0.1 release, 15 Jul 2009, fixes this.| amba_pv_address_mapamba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::get_address_map | ( | ) | const [inline] |
Returns the address map of this decoder.
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::set_address_map | ( | const amba_pv_address_map & | map | ) | [inline] |
Sets the address map of this decoder.
| map | new address map. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::load_address_map | ( | const std::string & | file | ) | [inline] |
Loads the address map of this decoder from the specified file.
| file | file from which the address map of this decoder is loaded. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::load_address_map | ( | std::istream & | is | ) | [inline] |
Loads the address map of this decoder from the specified stream.
| is | stream from which load the address map of this decoder is loaded. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::print_address_map | ( | const std::string & | file | ) | const [inline] |
Prints the address map of this decoder.
| file | file to which the address map of this decoder is printed. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::print_address_map | ( | std::ostream & | os | ) | const [inline] |
Prints the address map of this decoder.
| os | stream to which the address map of this decoder is printed. |
| void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::set_verbose | ( | bool | verbose = true | ) | [inline] |
Sets the verbosity of this decoder.
The set_verbose() method turns on the display of "decode error at address..." warning messages.
| verbose | true (default) to turn on the display of warning messages, false otherwise. |
| amba_pv_socket_array<slave_socket_type> amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::amba_pv_s |
Slaves socket array.
| amba_pv_socket_array<master_socket_type> amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::amba_pv_m |
Masters socket array.