| AMBA-PV Extensions to OSCI TLM 2.0 Reference Manual |
The amba_pv_memory class models an AMBA compatible memory at the PV level and features:
| 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_memory (const sc_core::sc_module_name &, sc_dt::uint64, unsigned int=4096) | |
| Constructor. | |
| amba_pv_memory (const sc_core::sc_module_name &, sc_dt::uint64, unsigned char, unsigned int=4096) | |
| Constructor. | |
| ~amba_pv_memory () | |
| Destructor. | |
| virtual const char * | kind () const |
| Returns the kind string of this memory. | |
| unsigned int | get_page_size () const |
| Returns the page size of this memory. | |
| void | set_fill_pattern (unsigned char, unsigned char) |
| Sets the fill pattern used for uninitialized memory. | |
| virtual amba_pv_resp_t | read (int, const sc_dt::uint64 &, unsigned char *, unsigned int, const amba_pv_control *, sc_core::sc_time &) |
| Completes a read transaction. | |
| virtual amba_pv_resp_t | write (int, const sc_dt::uint64 &, unsigned char *, unsigned int, const amba_pv_control *, unsigned char *, sc_core::sc_time &) |
| Completes a write transaction. | |
| virtual bool | get_direct_mem_ptr (int, tlm::tlm_command, const sc_dt::uint64 &, const amba_pv_control *, tlm::tlm_dmi &) |
| Requests DMI access to the specified address and returns a reference to a DMI descriptor. | |
| virtual unsigned int | debug_read (int, const sc_dt::uint64 &, unsigned char *, unsigned int, const amba_pv_control *) |
| Non-intrusive debug read transaction. | |
| virtual unsigned int | debug_write (int, const sc_dt::uint64 &, unsigned char *, unsigned int, const amba_pv_control *) |
| Non-intrusive debug write transaction. | |
| void | save (const std::string &) |
| Saves the contents of this memory to the specified file. | |
| void | save (std::ostream &) |
| Saves the contents of this memory to the specified stream. | |
| void | restore (const std::string &) |
| Restore the contents of this memory from the specified file. | |
| void | restore (std::istream &) |
| Restore the contents of this memory from the specified stream. | |
Data Fields | |
| amba_pv_slave_socket< BUSWIDTH > | amba_pv_s |
| Slave socket. | |
| amba_pv::amba_pv_memory< BUSWIDTH >::amba_pv_memory | ( | const sc_core::sc_module_name & | name, | |
| sc_dt::uint64 | size, | |||
| unsigned int | page_size = 4096 | |||
| ) | [inline] |
Constructor.
| name | memory name. | |
| size | memory size in bytes. size is rounded up to the next multiple of 4096. | |
| page_size | memory page size in bytes. Defaults to 4096. page_size is rounded up to the next multiple of 4096. |
| amba_pv::amba_pv_memory< BUSWIDTH >::amba_pv_memory | ( | const sc_core::sc_module_name & | name, | |
| sc_dt::uint64 | size, | |||
| unsigned char | fill_char, | |||
| unsigned int | page_size = 4096 | |||
| ) | [inline] |
Constructor.
| name | memory name. | |
| size | memory size in bytes. size is rounded up to the next multiple of 4096. | |
| fill_char | fill character used for uninitialized memory. | |
| page_size | memory page size in bytes. Defaults to 4096. page_size is rounded up to the next multiple of 4096. |
| amba_pv::amba_pv_memory< BUSWIDTH >::~amba_pv_memory | ( | ) | [inline] |
Destructor.
| const char * amba_pv::amba_pv_memory< BUSWIDTH >::kind | ( | ) | const [inline, virtual] |
Returns the kind string of this memory.
| unsigned int amba_pv::amba_pv_memory< BUSWIDTH >::get_page_size | ( | ) | const [inline] |
Returns the page size of this memory.
| void amba_pv::amba_pv_memory< BUSWIDTH >::set_fill_pattern | ( | unsigned char | fill_char1, | |
| unsigned char | fill_char2 | |||
| ) | [inline] |
Sets the fill pattern used for uninitialized memory.
This does not affect any pages that have already been allocated, so ideally this must be called before the first write transaction to this memory.
| fill_char1 | first character to use for uninitialized memory. | |
| fill_char2 | second character to use for uninitialized memory. |
| amba_pv_resp_tamba_pv::amba_pv_memory< BUSWIDTH >::read | ( | int | socket_id, | |
| const sc_dt::uint64 & | addr, | |||
| unsigned char * | data, | |||
| unsigned int | size, | |||
| const amba_pv_control * | ctrl, | |||
| sc_core::sc_time & | t | |||
| ) | [inline, virtual] |
Completes a read transaction.
Reimplemented from amba_pv::amba_pv_slave_base< BUSWIDTH >.
| amba_pv_resp_tamba_pv::amba_pv_memory< BUSWIDTH >::write | ( | int | socket_id, | |
| const sc_dt::uint64 & | addr, | |||
| unsigned char * | data, | |||
| unsigned int | size, | |||
| const amba_pv_control * | ctrl, | |||
| unsigned char * | strb, | |||
| sc_core::sc_time & | t | |||
| ) | [inline, virtual] |
Completes a write transaction.
Reimplemented from amba_pv::amba_pv_slave_base< BUSWIDTH >.
| bool amba_pv::amba_pv_memory< BUSWIDTH >::get_direct_mem_ptr | ( | int | socket_id, | |
| tlm::tlm_command | command, | |||
| const sc_dt::uint64 & | addr, | |||
| const amba_pv_control * | ctrl, | |||
| tlm::tlm_dmi & | dmi_data | |||
| ) | [inline, virtual] |
Requests DMI access to the specified address and returns a reference to a DMI descriptor.
Reimplemented from amba_pv::amba_pv_slave_base< BUSWIDTH >.
| unsigned int amba_pv::amba_pv_memory< BUSWIDTH >::debug_read | ( | int | socket_id, | |
| const sc_dt::uint64 & | addr, | |||
| unsigned char * | data, | |||
| unsigned int | length, | |||
| const amba_pv_control * | ctrl | |||
| ) | [inline, virtual] |
Non-intrusive debug read transaction.
Reimplemented from amba_pv::amba_pv_slave_base< BUSWIDTH >.
| unsigned int amba_pv::amba_pv_memory< BUSWIDTH >::debug_write | ( | int | socket_id, | |
| const sc_dt::uint64 & | addr, | |||
| unsigned char * | data, | |||
| unsigned int | length, | |||
| const amba_pv_control * | ctrl | |||
| ) | [inline, virtual] |
Non-intrusive debug write transaction.
Reimplemented from amba_pv::amba_pv_slave_base< BUSWIDTH >.
| void amba_pv::amba_pv_memory< BUSWIDTH >::save | ( | const std::string & | file | ) | [inline] |
Saves the contents of this memory to the specified file.
| file | name of file to save memory contents to. |
| void amba_pv::amba_pv_memory< BUSWIDTH >::save | ( | std::ostream & | os | ) | [inline] |
Saves the contents of this memory to the specified stream.
| os | stream to save memory contents to. |
| void amba_pv::amba_pv_memory< BUSWIDTH >::restore | ( | const std::string & | file | ) | [inline] |
Restore the contents of this memory from the specified file.
| file | name of file to restore this memory contents from. |
| void amba_pv::amba_pv_memory< BUSWIDTH >::restore | ( | std::istream & | is | ) | [inline] |
Restore the contents of this memory from the specified stream.
| is | stream to restore this memory contents from. |
| amba_pv_slave_socket<BUSWIDTH> amba_pv::amba_pv_memory< BUSWIDTH >::amba_pv_s |
Slave socket.