wiki:Component/VciLogConsole

Version 1 (modified by Nicolas Pouillon, 14 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

See SoclibCc/VciParameters

Uses( 'caba:vci_log_console', **vci_parameters )

3) CABA Implementation

CABA sources

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 );

Note : the name list MUST be terminated by NULL.

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