AMBA-PV Extensions to OSCI TLM 2.0 Reference Manual

amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES > Class Template Reference

Inherits amba_pv::amba_pv_fw_transport_if, and amba_pv::amba_pv_bw_transport_if.


Detailed Description

template<unsigned int BUSWIDTH = 64, int NUMMASTERS = 1, int NUMSLAVES = 1>
class amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >

AMBA-PV bus decoder model.

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.

Note:
amba_pv_decoder does not currently support locked transactions (see amba_pv_control::set_locked()).

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.

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

Constructor & Destructor Documentation

template<unsigned int BUSWIDTH, int NUMMASTERS, int NUMSLAVES>
amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::amba_pv_decoder(const sc_core::sc_module_name & name )  [inline, explicit]

Constructor.

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


Member Function Documentation

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

Parameters:
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.
See also:
operator()()

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.

Parameters:
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.
See also:
bind()

void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::b_transport (int socket_id,
amba_pv_transactiontrans,
sc_core::sc_time & t 
) [inline, virtual]

unsigned int amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::transport_dbg (int socket_id,
amba_pv_transactiontrans 
) [inline, virtual]

bool amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::get_direct_mem_ptr (int socket_id,
amba_pv_transactiontrans,
tlm::tlm_dmi & dmi_data 
) [inline, virtual]

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]

std::string amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::get_map_file ( )  const [inline]

void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::set_map_file (const std::string & file )  [inline]

amba_pv_address_mapamba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::get_address_map ( )  const [inline]

void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::set_address_map (const amba_pv_address_mapmap )  [inline]

void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::load_address_map (const std::string & file )  [inline]

void amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::load_address_map (std::istream & is )  [inline]

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.

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

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

Parameters:
verbose true (default) to turn on the display of warning messages, false otherwise.


Field Documentation

template<unsigned int BUSWIDTH = 64, int NUMMASTERS = 1, int NUMSLAVES = 1>
amba_pv_socket_array<slave_socket_type> amba_pv::amba_pv_decoder< BUSWIDTH, NUMMASTERS, NUMSLAVES >::amba_pv_s

Slaves socket array.

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