// +FHDR------------------------------------------------------------
//                 Copyright (c) 2022 SmartLogic.
//                       ALL RIGHTS RESERVED
// -----------------------------------------------------------------
// Filename      : ucp_testcase.h
// Author        : xianfeng.du
// Created On    : 2022-10-20
// Last Modified :
// -----------------------------------------------------------------
// Description:
//
//
// -FHDR------------------------------------------------------------


#ifndef __UCP_TESTCASE_H__
#define __UCP_TESTCASE_H__

//#include "typedef.h"

#define TEST_MSG_SIZE     (100)

#define SFN_SLOT_NUM      (20)
#define TIMER_OFFSET	  (5000)
#define TIMER_SLOT_OFFSET (500000)
#define TIMER_SFN_OFFSET  (5000000)
#define TIMER_OFFSET_MAX  (TIMER_SLOT_OFFSET + TIMER_OFFSET)
#define TIMER_OFFSET_MIN  (TIMER_SLOT_OFFSET - TIMER_OFFSET)
#define SFN_SLOT_NUM_15K      (10)
#define TIMER_SLOT_OFFSET_15K (1000000)
#define TIMER_SFN_OFFSET_15K  (10000000)
#define TIMER_OFFSET_15K      (10000)
#define TIMER_OFFSET_MAX_15K  (TIMER_SLOT_OFFSET_15K + TIMER_OFFSET_15K)
#define TIMER_OFFSET_MIN_15K  (TIMER_SLOT_OFFSET_15K - TIMER_OFFSET_15K)

#define LOOPBACK_APE_OFFSET (100000)
#define TICK_PP1S_OFFSET    (1000000000)

#define CASE0_APE0_RX_ERR_MAX_NUM 16

inline uint32_t get_max(uint32_t a, uint32_t b) {return (a) >= (b) ? (a):(b);}
inline uint32_t get_min(uint32_t a, uint32_t b) {return (a) <= (b) ? (a):(b);}

//void ape_test_case1(void);
void ape0_test_task_reg(void);
void ape1_test_task_reg(void);
void ape2_test_task_reg(void);
void ape3_test_task_reg(void);
void ape4_test_task_reg(void);
void ape5_test_task_reg(void);
void ape6_test_task_reg(void);
void ape7_test_task_reg(void);

#endif

