SoCRocket
Transaction-Level Modeling Framework for Space Applications
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) |
| #define SR_HAS_UARTBACKEND | ( | type | ) |
| #define SR_HAS_UARTBACKEND_GENERATOR | ( | type, | |
| factory, | |||
| isinstance | |||
| ) |
| 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 |
||
| ) |
References APBSlave::apb, APBSlaveSocket< BUSWIDTH, ADDR_TYPE, DATA_TYPE >::get_base_addr(), APBSlaveSocket< BUSWIDTH, ADDR_TYPE, DATA_TYPE >::get_size(), v::info, APBUART::init_registers(), APBUART::level_int, setup::name, APBUART::overrun, APBUART::recv_buffer_end, APBUART::recv_buffer_level, APBUART::recv_buffer_start, APBUART::send_buffer, APBUART::send_irq(), and APBUART::uart_ticks().
| void APBUART::before_end_of_elaboration | ( | ) |
References SrModuleRegistry::create_object_by_name(), APBUART::g_backend, APBUART::m_backend, and srError.
| 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().
| 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().
|
virtual |
Reimplemented from CLKDevice.
|
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.
|
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 | ) |
References APBUART::fifosize.
Referenced by APBUART::data_read(), and APBUART::uart_ticks().
|
virtual |
Reimplemented from BaseModule< DefaultBase >.
References sr_param_base::add_properties(), and APBUART::g_console.
|
virtual |
Reimplemented from BaseModule< DefaultBase >.
References sr_register< DATA_TYPE >::callback(), APBUART::CONTROL, APBUART::CONTROL_DEFAULT, APBUART::CONTROL_MASK, APBUART::control_read(), APBUART::control_write(), sr_register_bank< ADDR_TYPE, DATA_TYPE >::create_register(), APBUART::DATA, APBUART::DATA_DEFAULT, APBUART::DATA_MASK, APBUART::data_read(), APBUART::data_write(), APBSlave::r, APBUART::SCALER, APBUART::SCALER_DEFAULT, APBUART::SCALER_MASK, SR_POST_WRITE, SR_PRE_READ, APBUART::STATUS, APBUART::STATUS_DEFAULT, APBUART::STATUS_MASK, and APBUART::status_read().
Referenced by APBUART::APBUART().
| void ReportIO::makeConnection | ( | ) |
Creates a connection.
| void TcpIO::makeConnection | ( | ) |
Creates a connection.
References srError, and srInfo.
Referenced by ConnectionThread::operator()(), and TcpIO::TcpIO().
|
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.
|
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().
|
virtual |
Sends a character on the communication channel.
Implements io_if.
References ReportIO::g_lines, and srInfo.
|
virtual |
Sends a character on the communication channel.
Implements io_if.
References error_code, and pysc::api::cci::write().
| SR_HAS_MODULE | ( | APBUART | ) |
| SR_HAS_UARTBACKEND | ( | ReportIO | ) |
| SR_HAS_UARTBACKEND | ( | TcpIO | ) |
| void APBUART::status_read | ( | ) |
References APBUART::fifosize, APBUART::overrun, APBSlave::r, APBUART::recv_buffer_level, APBUART::send_buffer, and APBUART::STATUS.
Referenced by APBUART::init_registers().
| TcpIO::TcpIO | ( | ModuleName | mn, |
| unsigned int | port = 2000, |
||
| bool | test = false |
||
| ) |
Opens a new socket connection on the specified port.
References TcpIO::makeConnection().
| void APBUART::uart_ticks | ( | ) |
References CLKDevice::clock_cycle, APBUART::CONTROL, APBUART::e_irq, APBUART::fifosize, io_if::getReceivedChar(), APBUART::inc_fifo_level(), APBUART::m_backend, APBSlave::r, io_if::receivedChars(), APBUART::recv_buffer, APBUART::recv_buffer_end, APBUART::recv_buffer_level, APBUART::SCALER, APBUART::send_buffer, APBUART::update_level_int(), and pysc::api::systemc::wait().
Referenced by APBUART::APBUART().
| void APBUART::update_level_int | ( | ) |
References APBUART::CONTROL, APBUART::fifosize, APBUART::g_pirq, APBUART::irq, APBUART::level_int, APBSlave::r, and APBUART::send_buffer.
Referenced by APBUART::data_write(), and APBUART::uart_ticks().
| APBUART::~APBUART | ( | ) |
Free all counter and unregister all callbacks.
| TcpIO::~TcpIO | ( | ) |