OpenCores
URL https://opencores.org/ocsvn/yac/yac/trunk

Subversion Repositories yac

[/] [yac/] [trunk/] [sw/] [inc/] [yac.h] - Blame information for rev 9

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 9 feddischso
/* -------------------------------------------------------------------
2
 *
3
 *
4
 *
5
 *   File           : yac.h
6
 *   Project        : YAC (Yet Another CORDIC Core)
7
 *   Creation       : Jun. 2015
8
 *   Limitations    :
9
 *   Synthesizer    :
10
 *   Target         :
11
 *
12
 *   Author(s):     : Christian Haettich
13
 *   Email          : feddischson@opencores.org
14
 *
15
 *
16
 *
17
 *
18
 *   Description
19
 *        Header file for YAC driver
20
 *
21
 *
22
 *
23
 *
24
 *
25
 *
26
 *
27
 *  -------------------------------------------------------------------
28
 *
29
 *                   Copyright Notice
30
 *
31
 *  This file is part of YAC - Yet Another CORDIC Core
32
 *  Copyright (c) 2015, Author(s), All rights reserved.
33
 *
34
 *  YAC is free software; you can redistribute it and/or
35
 *  modify it under the terms of the GNU Lesser General Public
36
 *  License as published by the Free Software Foundation; either
37
 *  version 3.0 of the License, or (at your option) any later version.
38
 *
39
 *  YAC is distributed in the hope that it will be useful,
40
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
41
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
42
 *  Lesser General Public License for more details.
43
 *
44
 *  You should have received a copy of the GNU Lesser General Public
45
 *  License along with this library. If not, download it from
46
 *  http://www.gnu.org/licenses/lgpl
47
 *
48
 *  -------------------------------------------------------------------
49
 */
50
 
51
 
52
#ifndef _YAC_H_
53
#define _YAC_H_
54
 
55
#include <stdint.h>
56
 
57
 
58
#define YAC_FLAG_VEC_ROT     0x08
59
#define YAC_FLAG_ATAN_3      0x04
60
#define YAC_MODE_MSK         0x03
61
#define YAC_MODE_CIR         0x00
62
#define YAC_MODE_LIN         0x01
63
#define YAC_MODE_HYP         0x02
64
 
65
 
66
#define YAC_ENTRIES_SHIFT   16
67
 
68
 
69
 
70
/*
71
 * Setup of the instanciated yac
72
 */
73
#define YAC_XY_WIDTH        8
74
#define YAC_A_WIDTH         8
75
#define YAC_RM_GAIN         3
76
#define YAC_N_ENTRIES       4
77
 
78
 
79
 
80
typedef struct _YAC_
81
{
82
  uint32_t     base;
83
  uint32_t     status_reg;
84
  uint32_t     xy_width;
85
  uint32_t     a_width;
86
  uint8_t      rm_gain;
87
  uint16_t     entries;
88
}YAC;
89
 
90
 
91
void yac_init( YAC * yac,
92
               uint32_t   base,
93
               uint32_t   xy_width,
94
               uint32_t   a_width,
95
               uint8_t    rm_gain,
96
               uint16_t   entries );
97
 
98
void yac_single( YAC * yac,
99
                 int32_t * x_i,
100
                 int32_t * y_i,
101
                 int32_t * z_i,
102
                 int32_t * x_o,
103
                 int32_t * y_o,
104
                 int32_t * z_o,
105
                 uint8_t * mode );
106
 
107
 
108
 
109
#endif /* _YAC_H_ */
110
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.