ise.h
1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/* -----------------------------------------------------------------------------
* Copyright (C) 2019 daiteq s.r.o. http://www.daiteq.com
*
* This program is distributed WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE.
*
* -----------------------------------------------------------------------------
* Filename : ise.h
* Authors : Martin Danek
* Description : models of the ISE for LEON2
* Release :
* Version : 1.0
* Date : 20.04.2019
* -----------------------------------------------------------------------------
*/
#ifndef ISE_H
#define ISE_H
/* default architecture is 64bit */
#ifdef RV32
typedef uint32_t REGTYPE;
typedef int32_t SREGTYPE;
#define REGBITS 32
#define REGFMT "0x%08X"
#else
typedef uint64_t REGTYPE;
typedef int64_t SREGTYPE;
#define REGBITS 64
#define REGFMT "0x%016lX"
#endif
#define ADD 0x0
#define SUB 0x8
#define MUL 0xC
#define NOSAT 0
#define SATUR 1
REGTYPE swar_dem(REGTYPE exp, REGTYPE signal, unsigned packingFactor, unsigned bits, unsigned interleaved, unsigned cplx);
SREGTYPE swar_corr(REGTYPE code, REGTYPE signal, unsigned packingFactor, unsigned bits, unsigned sgnd, unsigned reduce, SREGTYPE *sop);
REGTYPE swar_sincos(REGTYPE coef, unsigned bits);
REGTYPE swar_alu(REGTYPE veca, REGTYPE vecb, unsigned packingFactor, unsigned bits, unsigned oper, unsigned sgnd, unsigned sat, unsigned reduce, SREGTYPE *acc);
#endif /* ISE_H */