Version 2 (modified by 15 years ago) (diff) | ,
---|
SocLib Components General Index
VciLogConsole
1) Functional Description
This VCI target is a simple log sink, receiving any written character and printing it to the external world.
It only has one mapped register accepting only writes.
A putc implementation could be:
static const volatile void* log_address = 0xc0000000; static inline void putc(const size_t term_no, const char x) { soclib_io_set( tty_address, 0, x ); }
2) Component definition & usage
source:trunk/soclib/soclib/module/connectivity_component/vci_log_console/caba/metadata/vci_log_console.sd
Uses( 'caba:vci_log_console', **vci_parameters )
3) CABA Implementation
CABA sources
- interface : source:trunk/soclib/soclib/module/connectivity_component/vci_log_console/caba/source/include/vci_log_console.h
- implementation : source:trunk/soclib/soclib/module/connectivity_component/vci_log_console/caba/source/src/vci_log_console.cpp
CABA Constructor parameters
VciLogConsole( sc_module_name name, // Instance name const soclib::common::IntTab &index, // Target index const soclib::common::MappingTable &mt) // Mapping Table
Example instanciation:
VciLogConsole tty("logger", IntTab(2,3), mapping_table );
CABA Ports
- sc_in<bool> p_resetn : Global system reset
- sc_in<bool> p_clk : Global system clock
- soclib::common::VciiTarget<vci_param> p_vci : The VCI port