Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Public Member Functions | Public Attributes | Protected Attributes | List of all members
AHBSlave< BASE > Class Template Referenceabstract

#include <ahbslave.h>

Inheritance diagram for AHBSlave< BASE >:
Collaboration diagram for AHBSlave< BASE >:

Public Member Functions

 SC_HAS_PROCESS (AHBSlave)
 
 AHBSlave (ModuleName mn, uint8_t hindex, uint8_t vendor, uint8_t device, uint8_t version, uint8_t irq, AbstractionLayer ambaLayer, BAR bar0=BAR(), BAR bar1=BAR(), BAR bar2=BAR(), BAR bar3=BAR())
 
 ~AHBSlave ()
 
virtual uint32_t exec_func (tlm::tlm_generic_payload &gp, sc_time &delay, bool debug=false)=0
 Interface to functional part of the model. More...
 
virtual sc_core::sc_time get_clock ()=0
 Returns clock cycle time from child. More...
 
virtual void b_transport (tlm::tlm_generic_payload &gp, sc_time &delay)
 TLM blocking transport functions. More...
 
virtual uint32_t transport_dbg (tlm::tlm_generic_payload &gp)
 TLM debug transport function. More...
 
virtual tlm::tlm_sync_enum nb_transport_fw (tlm::tlm_generic_payload &trans, tlm::tlm_phase &phase, sc_core::sc_time &delay)
 TLM non-blocking transport function. More...
 
void requestThread ()
 Accept new transaction (busy or not) More...
 
void responseThread ()
 Thread for interfacing functional part of the model in AT mode. More...
 
virtual void transport_statistics (tlm::tlm_generic_payload &gp) throw ()
 Collect common transport statistics. More...
 
virtual void print_transport_statistics (const char *name) const throw ()
 Print common transport statistics. More...
 
- Public Member Functions inherited from AHBDevice< BASE >
 AHBDevice (ModuleName mn, uint32_t hindex, uint8_t vendorid, uint16_t deviceid, uint8_t version, uint8_t irq, BAR bar0, BAR bar1=BAR(), BAR bar2=BAR(), BAR bar3=BAR())
 
 AHBDevice (ModuleName mn)
 
void init (uint32_t hindex, uint8_t vendorid, uint16_t deviceid, uint8_t version, uint8_t irq, BAR bar0, BAR bar1=BAR(), BAR bar2=BAR(), BAR bar3=BAR())
 
void init_ahb_generics ()
 
virtual ~AHBDevice ()
 Empty destructor. More...
 
virtual const uint16_t get_ahb_device_id () const throw ()
 Returns the device id. More...
 
virtual const uint8_t get_ahb_vendor_id () const throw ()
 Returns the vendor id. More...
 
virtual const uint32_tget_ahb_device_info () throw ()
 
virtual const uint32_t get_ahb_base_addr_ () const throw ()
 
virtual sc_dt::uint64 get_ahb_base_addr () throw ()
 
virtual const uint32_t get_ahb_size_ () const throw ()
 
virtual sc_dt::uint64 get_ahb_size () throw ()
 
virtual const AMBADeviceType get_ahb_bar_type (uint32_t bar) const throw ()
 
virtual const uint32_t get_ahb_bar_base (uint32_t bar) const throw ()
 
virtual const uint32_t get_ahb_bar_mask (uint32_t bar) const throw ()
 
virtual const uint32_t get_ahb_bar_addr (uint32_t bar) const throw ()
 
virtual const uint32_t get_ahb_bar_size (uint32_t bar) const throw ()
 
virtual const uint32_t get_ahb_bar_relative_addr (uint32_t bar, uint32_t addr) const throw ()
 
const bool get_ahb_bar_prefetchable (uint32_t bar) const throw ()
 
const bool get_ahb_bar_cachable (uint32_t bar) const throw ()
 
virtual const uint32_t get_ahb_hindex () const throw ()
 Returns the bus id of the module (hindex) More...
 
virtual void print_ahb_device_info (char *name) const
 Prints the device info of the device. More...
 
- Public Member Functions inherited from AHBDeviceBase
virtual ~AHBDeviceBase ()
 Empty destructor. More...
 

Public Attributes

::amba::amba_slave_socket< 32 > ahb
 
tlm_utils::peq_with_get
< tlm::tlm_generic_payload > 
m_RequestPEQ
 Event queues for AT mode. More...
 
tlm_utils::peq_with_get
< tlm::tlm_generic_payload > 
m_ResponsePEQ
 

Protected Attributes

sr_param< uint64_tm_reads
 Stores the number of Bytes read from the device. More...
 
sr_param< uint64_tm_writes
 Stores the number of Bytes written from the device. More...
 
- Protected Attributes inherited from AHBDevice< BASE >
uint32_t m_register [8]
 Impementation of the device register file. More...
 
ParameterArray g_bars
 
ParameterArray g_bar0
 
ParameterArray g_bar1
 
ParameterArray g_bar2
 
ParameterArray g_bar3
 
sr_param< uint32_tg_hindex
 
sr_param< uint8_tg_hvendorid
 
sr_param< uint16_tg_hdeviceid
 
sr_param< uint8_tg_hversion
 
sr_param< uint8_tg_hirq
 
sr_param< uint32_tg_bar0haddr
 
sr_param< uint32_tg_bar0hmask
 
sr_param< uint32_tg_bar0htype
 
sr_param< boolg_bar0hcacheable
 
sr_param< boolg_bar0hprefetchable
 
sr_param< uint32_tg_bar1haddr
 
sr_param< uint32_tg_bar1hmask
 
sr_param< uint32_tg_bar1htype
 
sr_param< boolg_bar1hcacheable
 
sr_param< boolg_bar1hprefetchable
 
sr_param< uint32_tg_bar2haddr
 
sr_param< uint32_tg_bar2hmask
 
sr_param< uint32_tg_bar2htype
 
sr_param< boolg_bar2hcacheable
 
sr_param< boolg_bar2hprefetchable
 
sr_param< uint32_tg_bar3haddr
 
sr_param< uint32_tg_bar3hmask
 
sr_param< uint32_tg_bar3htype
 
sr_param< boolg_bar3hcacheable
 
sr_param< boolg_bar3hprefetchable
 

Detailed Description

template<class BASE = BaseModule<DefaultBase>>
class AHBSlave< BASE >

Almost all models implementing an AHB slave interface (except busses) are derived from class AHBSlave. AHBSlave is a convenience class providing an AHB slave socket and callback functions for hooking up with the behaviour of user models. AHBSlave inherits AHBDevice and can be configured for loosely timed (LT) or approximately timed (AT) level of abstraction.

An overview about how to build own components based on AHBSlave is given in Extending the Library.

Constructor & Destructor Documentation

template<class BASE = BaseModule<DefaultBase>>
AHBSlave< BASE >::AHBSlave ( ModuleName  mn,
uint8_t  hindex,
uint8_t  vendor,
uint8_t  device,
uint8_t  version,
uint8_t  irq,
AbstractionLayer  ambaLayer,
BAR  bar0 = BAR(),
BAR  bar1 = BAR(),
BAR  bar2 = BAR(),
BAR  bar3 = BAR() 
)
template<class BASE = BaseModule<DefaultBase>>
AHBSlave< BASE >::~AHBSlave ( )

Member Function Documentation

template<class BASE = BaseModule<DefaultBase>>
virtual void AHBSlave< BASE >::b_transport ( tlm::tlm_generic_payload &  gp,
sc_time &  delay 
)
virtual

TLM blocking transport functions.

template<class BASE = BaseModule<DefaultBase>>
virtual uint32_t AHBSlave< BASE >::exec_func ( tlm::tlm_generic_payload &  gp,
sc_time &  delay,
bool  debug = false 
)
pure virtual

Interface to functional part of the model.

Implemented in AHBMem, AHBProf, and AHBOut.

template<class BASE = BaseModule<DefaultBase>>
virtual sc_core::sc_time AHBSlave< BASE >::get_clock ( )
pure virtual

Returns clock cycle time from child.

Implemented in Mctrl, AHBMem, AHBProf, APBCtrl, and AHBOut.

template<class BASE = BaseModule<DefaultBase>>
virtual tlm::tlm_sync_enum AHBSlave< BASE >::nb_transport_fw ( tlm::tlm_generic_payload &  trans,
tlm::tlm_phase &  phase,
sc_core::sc_time &  delay 
)
virtual

TLM non-blocking transport function.

template<class BASE = BaseModule<DefaultBase>>
virtual void AHBSlave< BASE >::print_transport_statistics ( const char name) const
throw (
)
virtual

Print common transport statistics.

template<class BASE = BaseModule<DefaultBase>>
void AHBSlave< BASE >::requestThread ( )

Accept new transaction (busy or not)

template<class BASE = BaseModule<DefaultBase>>
void AHBSlave< BASE >::responseThread ( )

Thread for interfacing functional part of the model in AT mode.

template<class BASE = BaseModule<DefaultBase>>
AHBSlave< BASE >::SC_HAS_PROCESS ( AHBSlave< BASE )
template<class BASE = BaseModule<DefaultBase>>
virtual uint32_t AHBSlave< BASE >::transport_dbg ( tlm::tlm_generic_payload &  gp)
virtual

TLM debug transport function.

template<class BASE = BaseModule<DefaultBase>>
virtual void AHBSlave< BASE >::transport_statistics ( tlm::tlm_generic_payload &  gp)
throw (
)
virtual

Collect common transport statistics.

Reimplemented from AHBDevice< BASE >.

Member Data Documentation

template<class BASE = BaseModule<DefaultBase>>
::amba::amba_slave_socket<32> AHBSlave< BASE >::ahb

AHB Slave Socket

Receives instructions (mem access) from CPU

Referenced by AMBABasePlatform::AMBABasePlatform(), and sc_main().

template<class BASE = BaseModule<DefaultBase>>
sr_param<uint64_t> AHBSlave< BASE >::m_reads
protected

Stores the number of Bytes read from the device.

template<class BASE = BaseModule<DefaultBase>>
tlm_utils::peq_with_get<tlm::tlm_generic_payload> AHBSlave< BASE >::m_RequestPEQ

Event queues for AT mode.

template<class BASE = BaseModule<DefaultBase>>
tlm_utils::peq_with_get<tlm::tlm_generic_payload> AHBSlave< BASE >::m_ResponsePEQ
template<class BASE = BaseModule<DefaultBase>>
sr_param<uint64_t> AHBSlave< BASE >::m_writes
protected

Stores the number of Bytes written from the device.


The documentation for this class was generated from the following file: