Changes between Initial Version and Version 1 of Component/Vci Mwmr Controller


Ignore:
Timestamp:
Jan 27, 2008, 2:10:47 PM (16 years ago)
Author:
Nicolas Pouillon
Comment:

Mwmr Controller

Legend:

Unmodified
Added
Removed
Modified
  • Component/Vci Mwmr Controller

    v1 v1  
     1[wiki:Component SocLib Components General Index]
     2
     3= !VciMwmrController Functional Description =
     4
     5This VCI component is both a target and an initiator.
     6 * Addressing as a target allows to configure it for a transfer.
     7 * Initiator will do the transfer
     8
     9This component may handle interfaces to a Fifo-accessed coprocessor. There
     10may be any number of fifos from/to the coprocessor.
     11
     12In conjunction with the fifos, there are multiple unidirectionnal 32-bits signals
     13going from/to the coprocessor.
     14 * from the coprocessor, they are ''status'' registers
     15 * to the coprocessor, they are ''config'' registers
     16
     17This hardware component cheks for segmentation violation, and can be used
     18as a default target.
     19
     20= Memory region layout =
     21
     22 * Registers 0 to `MWMR_IOREG_MAX`
     23When read from, they reflects status registers, when written to, they reflects the control registers.
     24
     25 * `MWMR_RESET`
     26When written to, this register resets the current state of the controller, flushing all fifos and configuration.
     27
     28 * `MWMR_CONFIG_FIFO_WAY` and `MWMR_CONFIG_FIFO_NO`
     29Used to designate the currently configured fifo. WAY may be `MWMR_TO_COPROC` or `MWMR_FROM_COPROC`, NO may be any of available fifos in the selected way.
     30
     31 * `MWMR_CONFIG_STATE_ADDR`
     32Sets the address of state field for the selected fifo's state block.
     33
     34 * `MWMR_CONFIG_OFFSET_ADDR`
     35Sets the address of read/write pointer field for the selected fifo's state block.
     36
     37 * `MWMR_CONFIG_LOCK_ADDR`
     38Sets the address of lock for the selected fifo's state block.
     39
     40 * `MWMR_CONFIG_DEPTH`
     41Sets the depth of the selected fifo.
     42
     43 * `MWMR_CONFIG_WIDTH`
     44Sets the width of the selected fifo. This will determine the atomic transfer block size. This must be multiple of 4.
     45
     46 * `MWMR_CONFIG_BASE_ADDR`
     47Sets the address of data for the selected fifo.
     48
     49 * `MWMR_CONFIG_RUNNING`
     50A boolean enabling the selected fifo.
     51
     52= Component usage =
     53
     54For extensibility issues, you should access the !MwmrController using globally-defined offsets.
     55
     56You should include file source:trunk/soclib/include/soclib/MwmrController.h from your software, it
     57defines all useful offsets and constants.
     58
     59Sample code:
     60
     61Please see source:trunk/soclib/platforms/mwmr/soft/mwmr.h and source:trunk/soclib/platforms/mwmr/soft/mwmr.c for reference implementation.
     62
     63(add -I/path/to/soclib/include to your compilation command-line)
     64
     65= Component definition =
     66
     67Available in source:trunk/soclib/desc/soclib/vci_mwmr_controller.sd
     68
     69== Usage ==
     70
     71!VciMwmrController has two template parameters: VCI ones, and internal fifo maximum depth. It may be used like others, see [wiki:SoclibCc/VciParameters SoclibCc/VciParameters]
     72{{{
     73Uses( 'vci_MwmrController', fifo_depth = 32, **vci_parameters )
     74}}}
     75
     76= !VciMwmrController CABA  Implementation =
     77
     78The caba implementation is in
     79 * source:trunk/soclib/systemc/include/caba/target/vci_mwmr_controller.h
     80 * source:trunk/soclib/systemc/src/caba/target/vci_mwmr_controller.cc
     81
     82== Template parameters: ==
     83
     84 * The VCI parameters
     85 * The fifo depth
     86
     87== Constructor parameters ==
     88{{{
     89VciMwmrController(
     90        sc_module_name name,
     91        const IntTab &index,
     92        const MappingTable &mt,
     93        const size_t plaps,        # Default timeout between two access retries to a given MWMR
     94        const size_t n_to_coproc,  # \ Cardinal of fifos
     95        const size_t n_from_coproc,# /   interfacing the coprocessor
     96        const size_t n_config,     # \ Cardinal of registers
     97        const size_t n_status );   # /   (sideband signals)
     98}}}
     99
     100== Ports ==
     101
     102 * sc_in<bool> '''p_resetn''' : Global system reset
     103 * sc_in<bool> '''p_clk''' : Global system clock
     104 * soclib::caba::!VciTarget<vci_param> '''p_vci_target''' : The VCI target port
     105 * soclib::caba::!VciInitiator<vci_param> '''p_vci_initiator''' : The VCI initiator port
     106 * soclib::caba::!FifoOutput<uint32_t> '''p_to_coproc[]''' : Fifos to coprocessor
     107 * soclib::caba::!FifoInput<uint32_t> '''p_from_coproc[]''' : Fifos from coprocessor
     108 * sc_out<uint32_t> '''p_config[]''' : Configuration ports
     109 * sc_in<uint32_t> '''p_status[]''' : Status ports
     110