#ifndef ACIM_AB_H_
#define ACIM_AB_H_

#include <ap_int.h>

/*fixed point widths*/
#define WIDTH_A 18
#define WIDTH_B 25
#define WIDTH_C 22
#define WIDTH_D 15

/*fixed point ints*/
#define INT_A 1
#define INT_B 8
#define INT_C 5
#define INT_D 2
#define INT_E 6
/*IO_Mux_reg masks*/
#define U_IN_MUX_MASK 0x01
#define MZ_IN_MUX_MASK 0x02

/*fixed point type declaration*/
typedef ap_fixed<WIDTH_B, INT_A, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s25f24_type;
typedef ap_fixed<WIDTH_A, INT_A, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s18f17_type;
typedef ap_fixed<WIDTH_C, INT_B, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s22f14_type;
typedef ap_fixed<WIDTH_D, INT_A, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s15f14_type;
typedef ap_fixed<WIDTH_B, INT_C, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s25f20_type;
typedef ap_fixed<WIDTH_A, INT_D, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s18f16_type;
typedef ap_fixed<WIDTH_C, INT_E, /*AP_RND_MIN_INF*/AP_TRN_ZERO, AP_SAT> s22f16_type;



/*function declaration*/
void ACIM_AB(s15f14_type * p1, s25f24_type * p2, s25f24_type * p3, s25f24_type * p4, s25f24_type * p5,
		s25f24_type * p6, s25f24_type * p7, s25f20_type * p8, s22f16_type * p9, s25f24_type * p10,
		s18f16_type * Mz_in, s18f16_type * Mz_reg, s22f14_type * U_A_in, s22f14_type * U_A_reg,
		s22f14_type * U_B_in, s22f14_type * U_B_reg, s25f24_type * W_out, s25f24_type * W_reg,
		s25f24_type * I_A_out,	s25f24_type * I_A_reg, s25f24_type * I_B_out, s25f24_type * I_B_reg,
		s25f24_type * PSI_A_out, s25f24_type * PSI_A_reg, s25f24_type * PSI_B_out,
		s25f24_type * PSI_B_reg, char * IO_Mux_reg);


#endif