Back to home page

LXR

 
 

    


File indexing completed on 2025-05-11 08:23:43

0001 /**
0002  * @file
0003  * @ingroup lm32_milkymist_pfpu RTEMSBSPsLM32SharedMilkymistOne
0004  * @brief Milkymist PFPU driver
0005  */
0006 
0007 /*  milkymist_pfpu.h
0008  *
0009  *  Milkymist PFPU driver for RTEMS
0010  *
0011  *  The license and distribution terms for this file may be
0012  *  found in the file LICENSE in this distribution or at
0013  *  http://www.rtems.org/license/LICENSE.
0014  *
0015  *  COPYRIGHT (c) 2010 Sebastien Bourdeauducq
0016  */
0017 
0018 /**
0019  * @defgroup lm32_milkymist_pfpu Milkymist PFPU
0020  * @ingroup RTEMSBSPsLM32SharedMilkymistOne
0021  * @brief Milkymist PFPU driver
0022  * @{
0023  */
0024 
0025 #ifndef __MILKYMIST_PFPU_H_
0026 #define __MILKYMIST_PFPU_H_
0027 
0028 #ifdef __cplusplus
0029 extern "C" {
0030 #endif
0031 
0032 /* Ioctls */
0033 #define PFPU_EXECUTE       0x4600
0034 
0035 #define PFPU_PROGSIZE          (2048)
0036 #define PFPU_REG_COUNT       (128)
0037 
0038 struct pfpu_td {
0039     unsigned int *output;
0040     unsigned int hmeshlast;
0041     unsigned int vmeshlast;
0042     unsigned int *program;
0043     unsigned int progsize;
0044     float *registers;
0045     /** @brief shall we update the "registers" array after completion */
0046     bool update;
0047     /** @brief shall we invalidate L1 data cache after completion */
0048     bool invalidate;
0049 };
0050 
0051 rtems_device_driver pfpu_initialize(
0052   rtems_device_major_number major,
0053   rtems_device_minor_number minor,
0054   void *arg
0055 );
0056 
0057 rtems_device_driver pfpu_control(
0058   rtems_device_major_number major,
0059   rtems_device_minor_number minor,
0060   void *arg
0061 );
0062 
0063 #define PFPU_DRIVER_TABLE_ENTRY {pfpu_initialize, \
0064 NULL, NULL, NULL, NULL, pfpu_control}
0065 
0066 /** @} */
0067 
0068 #ifdef __cplusplus
0069 }
0070 #endif
0071 
0072 #endif /* __MILKYMIST_PFPU_H_ */