1 | /** |
---|
2 | * @file |
---|
3 | * @ingroup lm32_milkymist_pfpu lm32_milkymist_shared |
---|
4 | * @brief Milkymist PFPU driver |
---|
5 | */ |
---|
6 | |
---|
7 | /* milkymist_pfpu.h |
---|
8 | * |
---|
9 | * Milkymist PFPU driver for RTEMS |
---|
10 | * |
---|
11 | * The license and distribution terms for this file may be |
---|
12 | * found in the file LICENSE in this distribution or at |
---|
13 | * http://www.rtems.org/license/LICENSE. |
---|
14 | * |
---|
15 | * COPYRIGHT (c) 2010 Sebastien Bourdeauducq |
---|
16 | */ |
---|
17 | |
---|
18 | /** |
---|
19 | * @defgroup lm32_milkymist_pfpu Milkymist PFPU |
---|
20 | * @ingroup lm32_milkymist_shared |
---|
21 | * @brief Milkymist PFPU driver |
---|
22 | * @{ |
---|
23 | */ |
---|
24 | |
---|
25 | #ifndef __MILKYMIST_PFPU_H_ |
---|
26 | #define __MILKYMIST_PFPU_H_ |
---|
27 | |
---|
28 | #ifdef __cplusplus |
---|
29 | extern "C" { |
---|
30 | #endif |
---|
31 | |
---|
32 | /* Ioctls */ |
---|
33 | #define PFPU_EXECUTE 0x4600 |
---|
34 | |
---|
35 | #define PFPU_PROGSIZE (2048) |
---|
36 | #define PFPU_REG_COUNT (128) |
---|
37 | |
---|
38 | struct pfpu_td { |
---|
39 | unsigned int *output; |
---|
40 | unsigned int hmeshlast; |
---|
41 | unsigned int vmeshlast; |
---|
42 | unsigned int *program; |
---|
43 | unsigned int progsize; |
---|
44 | float *registers; |
---|
45 | /** @brief shall we update the "registers" array after completion */ |
---|
46 | bool update; |
---|
47 | /** @brief shall we invalidate L1 data cache after completion */ |
---|
48 | bool invalidate; |
---|
49 | }; |
---|
50 | |
---|
51 | rtems_device_driver pfpu_initialize( |
---|
52 | rtems_device_major_number major, |
---|
53 | rtems_device_minor_number minor, |
---|
54 | void *arg |
---|
55 | ); |
---|
56 | |
---|
57 | rtems_device_driver pfpu_control( |
---|
58 | rtems_device_major_number major, |
---|
59 | rtems_device_minor_number minor, |
---|
60 | void *arg |
---|
61 | ); |
---|
62 | |
---|
63 | #define PFPU_DRIVER_TABLE_ENTRY {pfpu_initialize, \ |
---|
64 | NULL, NULL, NULL, NULL, pfpu_control} |
---|
65 | |
---|
66 | /** @} */ |
---|
67 | |
---|
68 | #ifdef __cplusplus |
---|
69 | } |
---|
70 | #endif |
---|
71 | |
---|
72 | #endif /* __MILKYMIST_PFPU_H_ */ |
---|