/*
 * project_para.h
 *
 *  Created on: Jul 15, 2018
 *      Author: Kasun
 */

#ifndef SRC_PROJECT_PARA_H_
#define SRC_PROJECT_PARA_H_

#define HiCCE_DMA_SIMULATION	0
#define	DEBUG_HICCE				0

#include "xparameters.h"
#include "FPGA_CommBlock_v1.h"
#include "sleep.h"
#include <stdlib.h>

void init_HiCCE(void);
void HiCCE_DMA_Tranfer(unsigned int DMA_tmp_addr, unsigned int DMA_trans_size);
void HiCCE_DMA_Tranfer_sim(unsigned int DMA_tmp_addr, unsigned int DMA_trans_size);

#define DMA_RX_BASEADDR			DMA_F2A_BUFFER_BASE
#define INTAN_A_RX_BUF_BASE		(DMA_RX_BASEADDR)
#define INTAN_B_RX_BUF_BASE		(DMA_RX_BASEADDR + 0x00020000)
#define INTAN_C_RX_BUF_BASE		(DMA_RX_BASEADDR + 0x00040000)
#define INTAN_D_RX_BUF_BASE		(DMA_RX_BASEADDR + 0x00060000)

//********* registers ***********//
#define reg_block_base_addr				XPAR_REG_BLOCK_0_S00_AXI_BASEADDR
#define reg_block_WriteOnly_base_addr 	XPAR_REG_BLOCK_0_S00_AXI_BASEADDR

/*
 * write only registers
 */
#define config_intan_A_reg_addr	reg_block_WriteOnly_base_addr+4*0
#define config_intan_B_reg_addr	reg_block_WriteOnly_base_addr+4*1
#define config_intan_C_reg_addr reg_block_WriteOnly_base_addr+4*2
#define config_intan_D_reg_addr reg_block_WriteOnly_base_addr+4*3

#define read_intan_reg_addr		reg_block_WriteOnly_base_addr+4*4

#define Resetn_Soft_reg_addr	reg_block_WriteOnly_base_addr+4*5

/*
 * Read only registers
 */
#define reg_block_ReadOnly_base_addr	XPAR_REG_BLOCK_0_S00_AXI_BASEADDR+4*14

#define Ack_intan_reg_addr				reg_block_ReadOnly_base_addr+4*0		// input for uP
#define intan_A_DATA_reg_addr			reg_block_ReadOnly_base_addr+4*1		// input for uP
#define intan_B_DATA_reg_addr			reg_block_ReadOnly_base_addr+4*2		// input for uP
#define intan_C_DATA_reg_addr			reg_block_ReadOnly_base_addr+4*3		// input for uP
#define intan_D_DATA_reg_addr			reg_block_ReadOnly_base_addr+4*4		// input for uP
//#define Digital_Pot_ACK_reg_addr		reg_block_ReadOnly_base_addr+4*6		// input for uP
//#define FIFO_empty_reg_addr				reg_block_ReadOnly_base_addr+4*7		// input for uP

//*********** register values ************//


#endif /* SRC_PROJECT_PARA_H_ */
