| | 1 | [wiki:Component SocLib Components General Index] |
| | 2 | |
| | 3 | = !VciLogConsole = |
| | 4 | |
| | 5 | == 1) Functional Description == |
| | 6 | |
| | 7 | This VCI spy is a component reading everything that goes through a VCI port and dumps every |
| | 8 | command and its associated response. Moreover, this component assert VCI protocol rules. |
| | 9 | |
| | 10 | It uses a special !VciMonitor port type, which is all-input. |
| | 11 | |
| | 12 | == 2) Component definition & usage == |
| | 13 | |
| | 14 | source:trunk/soclib/soclib/module/test_control_component/vci_logger/caba/metadata/vci_logger.sd |
| | 15 | |
| | 16 | See [wiki:SoclibCc/VciParameters SoclibCc/VciParameters] |
| | 17 | {{{ |
| | 18 | Uses( 'caba:vci_logger', **vci_parameters ) |
| | 19 | }}} |
| | 20 | |
| | 21 | |
| | 22 | It can be connected anywhere on a VCI signal: |
| | 23 | |
| | 24 | {{{ |
| | 25 | caba::VciSignals<vci_param> signal_vci_m[4]; |
| | 26 | |
| | 27 | ... |
| | 28 | |
| | 29 | soclib::caba::VciLogger<vci_param> logger("logger", maptab); |
| | 30 | logger.p_clk(signal_clk); |
| | 31 | logger.p_resetn(signal_resetn); |
| | 32 | logger.p_vci(signal_vci_m[0]); |
| | 33 | }}} |
| | 34 | |
| | 35 | Sample output: |
| | 36 | {{{ |
| | 37 | logger WRITE 1 cells @0x716000cc plen = 1 const = 0 (r)srcid = 0 be = 1 |
| | 38 | 716000cc: 00XXXXXX |
| | 39 | Response: OK 1 cells |
| | 40 | |
| | 41 | logger READ 1 cells @0x601094e0 plen = 32 const = 0 (r)srcid = 0 be = 15 |
| | 42 | Response: OK 8 cells |
| | 43 | 601094e0: 00004490 21180501 0100a524 fbffc514 000064a0 0800e003 21104001 1a250408 |
| | 44 | }}} |
| | 45 | |
| | 46 | == 3) CABA Implementation == |
| | 47 | |
| | 48 | === CABA sources === |
| | 49 | |
| | 50 | * interface : source:/trunk/soclib/soclib/module/test_control_component/vci_logger/caba/source/include/vci_logger.h |
| | 51 | * implementation : source:/trunk/soclib/soclib/module/test_control_component/vci_logger/caba/source/src/vci_logger.cpp |
| | 52 | |
| | 53 | === CABA Constructor parameters === |
| | 54 | |
| | 55 | {{{ |
| | 56 | VciLogConsole( |
| | 57 | sc_module_name name, // Instance name |
| | 58 | const soclib::common::MappingTable &mt) // Mapping Table |
| | 59 | }}} |
| | 60 | |
| | 61 | Example instanciation: |
| | 62 | {{{ |
| | 63 | VciLogger logger("logger", mapping_table ); |
| | 64 | }}} |
| | 65 | |
| | 66 | === CABA Ports === |
| | 67 | |
| | 68 | * sc_in<bool> '''p_resetn''' : Global system reset |
| | 69 | * sc_in<bool> '''p_clk''' : Global system clock |
| | 70 | * soclib::common::!VciMonitor<vci_param> '''p_vci''' : The VCI port |