source: trunk/softs/giet_tsar/drivers.h @ 158

Last change on this file since 158 was 158, checked in by alain, 12 years ago

Introducing the three sub-directories in the softs directory:

  • giet_tsar
  • soft_filter_giet
  • soft_transpose_giet
File size: 2.8 KB
Line 
1/****************************************************************************************
2    File : drivers.h
3    Written by Alain Greiner & Nicolas Pouillon
4    Date : september 2009
5
6    These system calls are used by the MIPS GIET, that is running
7    on the MIPS32 processor architecture.
8
9    The supported peripherals are:
10    - the SoClib vci_multi_tty
11    - the SocLib vci_multi_timer
12    - the SocLib vci_dma
13    - The SoCLib vci_icu
14    - The SoCLib vci_gcd
15    - The SoCLib vci_frame_buffer
16    - The SoCLib vci_block_device
17****************************************************************************************/
18
19#ifndef _DRIVERS_H_
20#define _DRIVERS_H_
21
22#include "tty.h"
23#include "dma.h"
24#include "gcd.h"
25#include "timer.h"
26#include "icu.h"
27#include "block_device.h"
28
29typedef unsigned int    size_t;
30
31// global variables defined in giet.s
32
33extern  unsigned int    _task_context_array[];
34extern  unsigned int    _current_task_array[];
35extern  unsigned int    _task_number_array[];
36
37// function defined in giet.s
38
39void _ctx_switch();
40
41// global variables defined in drivers.c
42
43extern  int volatile    _dma_status[];
44extern  int volatile    _dma_busy[];
45
46extern  int volatile    _ioc_lock;
47extern  int volatile    _ioc_done;
48extern  int volatile    _ioc_status;
49
50extern  char volatile   _tty_get_buf[];
51extern  int volatile    _tty_get_full[];
52
53extern  char volatile   _tty_put_buf[];
54extern  int volatile    _tty_put_full[];
55
56// functions defined in drivers.c
57
58unsigned int    _procid();
59unsigned int    _proctime();
60unsigned int    _procnumber();
61
62unsigned int    _segment_increment();
63
64void _itoa_dec(unsigned int val, char* buf);
65void _itoa_hex(int val, char* buf);
66
67int _exit();
68
69int _timer_write(size_t timer_index, size_t register_index, int value);
70int _timer_read(size_t timer_index, size_t register_index, int* buffer);
71
72int _tty_write(char* buffer, int length);
73int _tty_read(char* buffer, int length);
74
75int _io_write(size_t lba, void* buffer, size_t count);
76int _io_read(size_t lba, void* buffer, size_t count);
77int _io_completed();
78
79int _icu_write(size_t register_index, int  value);
80int _icu_read(size_t register_index, int*  buffer);
81
82int _gcd_write(size_t register_index, int  value);
83int _gcd_read(size_t register_index, int*  buffer);
84
85int _locks_write(size_t lock_index);
86int _locks_read(size_t lock_index);
87
88int _fb_sync_write(size_t offset, void* buffer, size_t length);
89int _fb_sync_read(size_t offset, void* buffer, size_t length);
90
91int _fb_write(size_t offset, void* buffer, size_t length);
92int _fb_read(size_t offset, void* buffer, size_t length);
93int _fb_completed();
94
95int _barrier_init(size_t index, size_t count);
96int _barrier_wait(size_t index);
97
98#endif
99
100// Local Variables:
101// tab-width: 4;
102// c-basic-offset: 4;
103// c-file-offsets:((innamespace . 0)(inline-open . 0));
104// indent-tabs-mode: nil;
105// End:
106//
107// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=4:softtabstop=4
108
Note: See TracBrowser for help on using the repository browser.