Logo SoCRocket

Transaction-Level Modeling Framework for Space Applications

Files | Classes | Macros | Functions
Apbuart

Files

file  apbuart.cpp
 
file  apbuart.h
 
file  io_if.h
 
file  reportio.cpp
 
file  reportio.h
 
file  tcpio.cpp
 
file  tcpio.h
 

Classes

class  APBUART
 This class is a TLM 2.0 Model of the Aeroflex Gaisler GRLIB APBUART. Further informations to the original VHDL Modle are available in the GRLIB IP Core User's Manual Section 16. More...
 
class  io_if
 
class  ReportIO
 
class  TcpIO
 
struct  ConnectionThread
 

Macros

#define SR_HAS_UARTBACKEND_GENERATOR(type, factory, isinstance)
 
#define SR_HAS_UARTBACKEND(type)
 

Functions

 SR_HAS_MODULE (APBUART)
 
 SR_HAS_UARTBACKEND (ReportIO)
 
 SR_HAS_UARTBACKEND (TcpIO)
 
 APBUART::APBUART (ModuleName name, std::string uart_backend="ReporterIO", uint16_t pindex=0, uint16_t paddr=0, uint16_t pmask=4095, int pirq=0, bool console=false, bool powmon=false)
 
 APBUART::~APBUART ()
 Free all counter and unregister all callbacks. More...
 
void APBUART::init_generics ()
 
void APBUART::init_registers ()
 
void APBUART::data_read ()
 
void APBUART::data_write ()
 
void APBUART::status_read ()
 
void APBUART::control_write ()
 
void APBUART::control_read ()
 
void APBUART::send_irq ()
 
void APBUART::uart_ticks ()
 
void APBUART::update_level_int ()
 
void APBUART::inc_fifo_level (uint32_t *counter)
 
virtual void APBUART::dorst ()
 
void APBUART::before_end_of_elaboration ()
 
void ReportIO::makeConnection ()
 Creates a connection. More...
 
 ReportIO::ReportIO (sc_core::sc_module_name nm)
 Opens a new socket connection on the specified port. More...
 
uint32_t ReportIO::receivedChars ()
 
void ReportIO::getReceivedChar (char *toRecv)
 
void ReportIO::sendChar (char toSend)
 Sends a character on the communication channel. More...
 
void TcpIO::makeConnection ()
 Creates a connection. More...
 
 TcpIO::TcpIO (ModuleName mn, unsigned int port=2000, bool test=false)
 Opens a new socket connection on the specified port. More...
 
 TcpIO::~TcpIO ()
 
uint32_t TcpIO::receivedChars ()
 
void TcpIO::getReceivedChar (char *toRecv)
 
void TcpIO::sendChar (char toSend)
 Sends a character on the communication channel. More...
 

Detailed Description

Macro Definition Documentation

#define SR_HAS_UARTBACKEND (   type)
Value:
sc_core::sc_object *create_##type(sc_core::sc_module_name mn) { \
return new type(mn); \
} \
bool isinstance_of_##type(sc_core::sc_object *obj) { \
return dynamic_cast<type *>(obj) != NULL; \
} \
SR_HAS_UARTBACKEND_GENERATOR(type, create_##type, isinstance_of_##type);
#define SR_HAS_UARTBACKEND_GENERATOR(type, factory, isinstance)
Definition: io_if.h:22
#define SR_HAS_UARTBACKEND_GENERATOR (   type,
  factory,
  isinstance 
)
Value:
static SrModuleRegistry __sr_module_registry_##type##__("UARTBackend", #type, &factory, &isinstance, __FILE__); \
volatile SrModuleRegistry *__sr_module_registry_##type = &__sr_module_registry_##type##__;
Definition: sr_registry.h:28

Function Documentation

APBUART::APBUART ( ModuleName  name,
std::string  uart_backend = "ReporterIO",
uint16_t  pindex = 0,
uint16_t  paddr = 0,
uint16_t  pmask = 4095,
int  pirq = 0,
bool  console = false,
bool  powmon = false 
)
void APBUART::before_end_of_elaboration ( )

References SrModuleRegistry::create_object_by_name(), APBUART::g_backend, APBUART::m_backend, and srError.

Here is the call graph for this function:

void APBUART::control_read ( )

Referenced by APBUART::init_registers().

void APBUART::control_write ( )

Referenced by APBUART::init_registers().

void APBUART::data_read ( )

References CLKDevice::clock_cycle, APBUART::CONTROL, APBUART::DATA, APBUART::e_irq, APBUART::inc_fifo_level(), APBSlave::r, APBUART::recv_buffer, APBUART::recv_buffer_end, and APBUART::recv_buffer_level.

Referenced by APBUART::init_registers().

Here is the call graph for this function:

void APBUART::data_write ( )

References APBUART::CONTROL, APBUART::DATA, APBUART::fifosize, APBUART::m_backend, APBUART::overrun, APBSlave::r, APBUART::send_buffer, io_if::sendChar(), and APBUART::update_level_int().

Referenced by APBUART::init_registers().

Here is the call graph for this function:

void APBUART::dorst ( )
virtual

Reimplemented from CLKDevice.

void ReportIO::getReceivedChar ( char toRecv)
virtual

Receives a character; returns true if read the character is valid, false in case the character is not valid (such as if we are communicating on a socket and there are no available characters)

Implements io_if.

void TcpIO::getReceivedChar ( char toRecv)
virtual

Receives a character; returns true if read the character is valid, false in case the character is not valid (such as if we are communicating on a socket and there are no available characters)

Implements io_if.

References error_code, and srError.

void APBUART::inc_fifo_level ( uint32_t counter)
void APBUART::init_generics ( )
virtual

Reimplemented from BaseModule< DefaultBase >.

References sr_param_base::add_properties(), and APBUART::g_console.

Here is the call graph for this function:

void APBUART::init_registers ( )
virtual
void ReportIO::makeConnection ( )

Creates a connection.

void TcpIO::makeConnection ( )

Creates a connection.

References srError, and srInfo.

Referenced by ConnectionThread::operator()(), and TcpIO::TcpIO().

uint32_t ReportIO::receivedChars ( )
virtual

Receives a character; returns true if read the character is valid, false in case the character is not valid (such as if we are communicating on a socket and there are no available characters)

Implements io_if.

uint32_t TcpIO::receivedChars ( )
virtual

Receives a character; returns true if read the character is valid, false in case the character is not valid (such as if we are communicating on a socket and there are no available characters)

Implements io_if.

ReportIO::ReportIO ( sc_core::sc_module_name  nm)

Opens a new socket connection on the specified port.

void APBUART::send_irq ( )

References CLKDevice::clock_cycle, APBUART::e_irq, APBUART::g_pirq, APBUART::irq, APBUART::level_int, and pysc::api::systemc::wait().

Referenced by APBUART::APBUART().

Here is the call graph for this function:

void ReportIO::sendChar ( char  toSend)
virtual

Sends a character on the communication channel.

Implements io_if.

References ReportIO::g_lines, and srInfo.

void TcpIO::sendChar ( char  toSend)
virtual

Sends a character on the communication channel.

Implements io_if.

References error_code, and pysc::api::cci::write().

Here is the call graph for this function:

SR_HAS_MODULE ( APBUART  )
SR_HAS_UARTBACKEND ( ReportIO  )
SR_HAS_UARTBACKEND ( TcpIO  )
void APBUART::status_read ( )
TcpIO::TcpIO ( ModuleName  mn,
unsigned int  port = 2000,
bool  test = false 
)

Opens a new socket connection on the specified port.

References TcpIO::makeConnection().

Here is the call graph for this function:

void APBUART::uart_ticks ( )
void APBUART::update_level_int ( )
APBUART::~APBUART ( )

Free all counter and unregister all callbacks.

TcpIO::~TcpIO ( )