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

Last change on this file since 238 was 228, checked in by meunier, 12 years ago

Added support for memspaces and const.
Added an interrupt masking to the "giet_context_switch" syscall
Corrected two bugs in boot/boot_init.c (one minor and one regarding barriers initialization)
Reformatted the code in all files.

File size: 1.7 KB
RevLine 
[159]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 {
[228]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
[159]25} mwmr_channel_t;
26
27//////////////////////////////////////////////////////////////////////////////
28//  MWMR access functions
29//////////////////////////////////////////////////////////////////////////////
30
[228]31void mwmr_write(mwmr_channel_t * mwmr, unsigned int * buffer, unsigned int nitems);
32void mwmr_read(mwmr_channel_t * mwmr, unsigned int * buffer, unsigned int nitems);
[159]33
34#endif
35
[228]36// Local Variables:
37// tab-width: 4
38// c-basic-offset: 4
39// c-file-offsets:((innamespace . 0)(inline-open . 0))
40// indent-tabs-mode: nil
41// End:
42// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
43
Note: See TracBrowser for help on using the repository browser.