source: soft/giet_vm/libs/mwmr_channel.h @ 201

Last change on this file since 201 was 200, checked in by karaoui, 12 years ago

+ removing some bugs from:

  • xml_parser.c: check that strcmp == 0 for coproc direction
  • mwmr_channel.c: mwmr->ptr to ptr.
  • utils.h double definition of memcpy fonction.

+ mapping_info.h : naming the enums
+ boot_init.c: changing the order of initialisation in order

to initialise the coproc with the mwmr channel values( depth, width...).
Note that the vobjs are now physically initialised.

+ mwmr_channel.h: changing the order argument definition to suit vci_mwmr_channel Soclib componnent.
+ hwr_mapping.h: adding the register description of the vci_mwmr_controller .

File size: 1.5 KB
Line 
1//////////////////////////////////////////////////////////////////////////////////
2// File     : mwmr_channel.h         
3// Date     : 01/04/2012
4// Author   : alain greiner
5// Copyright (c) UPMC-LIP6
6///////////////////////////////////////////////////////////////////////////////////
7
8#ifndef _MWMR_CHANNEL_H_
9#define _MWMR_CHANNEL_H_
10
11///////////////////////////////////////////////////////////////////////////////////
12//  MWMR channel structure
13// The data array size is defined to obtain sizeof(mwmr_channel_t) = 4096 bytes.
14// The actual size can be redefined in the mapping info data structure.
15///////////////////////////////////////////////////////////////////////////////////
16
17typedef struct mwmr_channel_s {
18    unsigned int        ptr;                    // index of the first valid data word
19    unsigned int        ptw;                    // index of the first empty slot
20    unsigned int        sts;                    // number of words available
21    unsigned int        lock;                   // exclusive access lock
22    unsigned int        depth;                  // max number of words in the channel
23    unsigned int        width;                  // number of words in an item   
24    unsigned int        data[1018];             // circular buffer
25} mwmr_channel_t;
26
27//////////////////////////////////////////////////////////////////////////////
28//  MWMR access functions
29//////////////////////////////////////////////////////////////////////////////
30
31void mwmr_write( mwmr_channel_t*        mwmr, 
32                 unsigned int*          buffer,
33                 unsigned int           nitems );
34
35void mwmr_read( mwmr_channel_t*         mwmr, 
36                unsigned int*           buffer,
37                unsigned int            nitems );
38#endif
39
Note: See TracBrowser for help on using the repository browser.