22#if !defined(__AP_FIXED_H__) && !defined(__AP_INT_H__) && \
23 !defined(__AUTOPILOT_CBE_H__) && !defined(__HLS_HALF_H__)
24#error "Only ap_fixed.h and ap_int.h can be included directly in user code."
28#if !defined(__SYNTHESIS__) && (defined(AESL_SYN) || defined(__HLS_SYN__))
34#if (defined(_AP_N) || defined(_AP_C))
35#error One or more of the following is defined: _AP_N, _AP_C. Definition conflicts with their usage as template parameters.
39#if (defined(_AP_W) || defined(_AP_I) || defined(_AP_S) || defined(_AP_Q) || \
40 defined(_AP_O) || defined(_AP_W2) || defined(_AP_I2) || \
41 defined(_AP_S2) || defined(_AP_Q2) || defined(_AP_O2) || \
42 defined(_AP_N) || defined(_AP_N2))
44 "One or more of the following is defined: _AP_W, _AP_I, _AP_S, _AP_Q, _AP_O, _AP_N, _AP_W2, _AP_I2, _AP_S2, _AP_Q2, _AP_O2, _AP_N2. Definition conflicts with their usage as template parameters."
48#if (defined(_AP_W3) || defined(_AP_S3) || defined(_AP_W4) || defined(_AP_S4))
50 "One or more of the following is defined: _AP_W3, _AP_S3, _AP_W4,_AP_S4. Definition conflicts with their usage as template parameters."
53#if (defined(_AP_W1) || defined(_AP_S1) || defined(_AP_T) || \
54 defined(_AP_T1) || defined(_AP_T2) || defined(_AP_T3) || defined(_AP_T4))
56 "One or more of the following is defined: _AP_W1, _AP_S1, _AP_T, _AP_T1, _AP_T2, _AP_T3, _AP_T4. Definition conflicts with their usage as template parameters."
60#error "AP data type can only be used in C++"
65#ifndef __SC_COMPATIBLE__
78#ifndef SYSTEMC_INCLUDED
80#define SC_RND_ZERO AP_RND_ZERO
81#define SC_RND_MIN_INF AP_RND_MIN_INF
82#define SC_RND_INF AP_RND_INF
83#define SC_RND_CONV AP_RND_CONV
85#define SC_TRN_ZERO AP_TRN_ZERO
98#ifndef SYSTEMC_INCLUDED
100#define SC_SAT_ZERO AP_SAT_ZERO
101#define SC_SAT_SYM AP_SAT_SYM
102#define SC_WRAP AP_WRAP
103#define SC_WRAP_SM AP_WRAP_SM
122#define AP_RND_ZERO SC_RND_ZERO
123#define AP_RND_MIN_INF SC_RND_MIN_INF
124#define AP_RND_INF SC_RND_INF
125#define AP_RND_CONV SC_RND_CONV
127#define AP_TRN_ZERO SC_TRN_ZERO
139#define AP_SAT_ZERO SC_SAT_ZERO
140#define AP_SAT_SYM SC_SAT_SYM
141#define AP_WRAP SC_WRAP
142#define AP_WRAP_SM SC_WRAP_SM
146template <
int _AP_W,
bool _AP_S>
155template <
int _AP_W,
bool _AP_S>
158template <
int _AP_W,
bool _AP_S>
161template <
int _AP_W1,
typename _AP_T1,
int _AP_W2,
typename _AP_T2>
164template <
int _AP_W,
int _AP_I,
bool _AP_S =
true, ap_q_mode _AP_Q = AP_TRN,
165 ap_o_mode _AP_O = AP_WRAP,
int _AP_N = 0>
168template <
int _AP_W,
int _AP_I, ap_q_mode _AP_Q = AP_TRN,
169 ap_o_mode _AP_O = AP_WRAP,
int _AP_N = 0>
172template <
int _AP_W,
int _AP_I, ap_q_mode _AP_Q = AP_TRN,
173 ap_o_mode _AP_O = AP_WRAP,
int _AP_N = 0>
176template <
int _AP_W,
int _AP_I,
bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
180template <
int _AP_W,
int _AP_I,
bool _AP_S, ap_q_mode _AP_Q, ap_o_mode _AP_O,
185enum BaseMode { AP_BIN = 2, AP_OCT = 8, AP_DEC = 10, AP_HEX = 16 };
187#ifndef SYSTEMC_INCLUDED
196typedef signed __int64 ap_slong;
197typedef unsigned __int64 ap_ulong;
199typedef signed long long ap_slong;
200typedef unsigned long long ap_ulong;
205 _AP_SIZE_short =
sizeof(short) * 8,
206 _AP_SIZE_int =
sizeof(
int) * 8,
207 _AP_SIZE_long =
sizeof(long) * 8,
208 _AP_SIZE_ap_slong =
sizeof(ap_slong) * 8
Signed Arbitrary Precision Fixed-Point Type.
Sign Arbitrary Precision Type.
Unsigned Arbitrary Precision Type.