AMBA-PV Extensions to OSCI TLM 2.0 Reference Manual

amba_pv::amba_pv_memory< BUSWIDTH > Class Template Reference

Inherits amba_pv::amba_pv_memory_base< BUSWIDTH >.


Detailed Description

template<unsigned int BUSWIDTH = 64>
class amba_pv::amba_pv_memory< BUSWIDTH >

AMBA-PV advanced memory model.

The amba_pv_memory class models an AMBA compatible memory at the PV level and features:

Parameters:
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.

Constructor & Destructor Documentation

template<unsigned int BUSWIDTH>
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.

Parameters:
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.

Parameters:
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.
Note:
This constructor is deprecated. Use the other constructor instead.


Member Function Documentation

template<unsigned int BUSWIDTH>
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]

void amba_pv::amba_pv_memory< BUSWIDTH >::set_fill_pattern (unsigned char fill_char1,
unsigned char fill_char2 
) [inline]

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_controlctrl,
sc_core::sc_time & t 
) [inline, virtual]

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_controlctrl,
unsigned char * strb,
sc_core::sc_time & t 
) [inline, virtual]

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_controlctrl,
tlm::tlm_dmi & dmi_data 
) [inline, virtual]

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_controlctrl 
) [inline, virtual]

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_controlctrl 
) [inline, virtual]

void amba_pv::amba_pv_memory< BUSWIDTH >::save (const std::string & file )  [inline]

Saves the contents of this memory to the specified file.

Parameters:
file name of file to save memory contents to.

void amba_pv::amba_pv_memory< BUSWIDTH >::save (std::ostream & os )  [inline]

void amba_pv::amba_pv_memory< BUSWIDTH >::restore (const std::string & file )  [inline]

Restore the contents of this memory from the specified file.

Parameters:
file name of file to restore this memory contents from.

void amba_pv::amba_pv_memory< BUSWIDTH >::restore (std::istream & is )  [inline]


Field Documentation

template<unsigned int BUSWIDTH = 64>
amba_pv_slave_socket<BUSWIDTH> amba_pv::amba_pv_memory< BUSWIDTH >::amba_pv_s

Slave socket.

Copyright © 2009 ARM Limited. All rights reserved. ARM DUI 0522A
Non-Confidential