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

Last change on this file since 255 was 253, checked in by alain, 11 years ago

1/ introducing support to display images on the frame buffer
with the vci_chbuf_dma (in stdio.c and drivers.c)
2/ introducing support for mem_cache configuration segment
as the memory cache is considered as another addressable peripheral type
(in drivers.c)
3/ Introducing the new "increment" parameter in the mapping header.
This parameter define the virtual address increment for the vsegs
associated to the replicated peripherals (ICU, XICU, MDMA, TIMER, MMC).
This parameter is mandatory, and all map.xml files the "mappings"
directory have been updated.

File size: 1.7 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{
19    unsigned int ptr;        // index of the first valid data word
20    unsigned int ptw;        // index of the first empty slot
21    unsigned int sts;        // number of words available
22    unsigned int lock;       // exclusive access lock
23    unsigned int depth;      // max number of words in the channel
24    unsigned int width;      // number of words in an item     
25    unsigned int data[1018]; // circular buffer
26} mwmr_channel_t;
27
28//////////////////////////////////////////////////////////////////////////////
29//  MWMR access functions
30//////////////////////////////////////////////////////////////////////////////
31
32void mwmr_write(mwmr_channel_t * mwmr, unsigned int * buffer, unsigned int nitems);
33void mwmr_read(mwmr_channel_t * mwmr, unsigned int * buffer, unsigned int nitems);
34
35#endif
36
37// Local Variables:
38// tab-width: 4
39// c-basic-offset: 4
40// c-file-offsets:((innamespace . 0)(inline-open . 0))
41// indent-tabs-mode: nil
42// End:
43// vim: filetype=c:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
44
Note: See TracBrowser for help on using the repository browser.