⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 functions.h

📁 飞思卡尔imx27 wince5.0 bootloader源代码
💻 H
📖 第 1 页 / 共 3 页
字号:
//  Description:  configure GPIO pads, so gpio message mechanism can work 
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: void 
//    in-out:  
//       out:  
//    return: void
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/02/04 14:19:28 IST
//  Revision:  none
// =====================================================================================
void configure_iomuxc_for_gpio_message_mcu(void);
//2}}}


//----------------------------------------------------------------------
//  Check Test Functions
//----------------------------------------------------------------------

//{{{2

// ===  FUNCTION  ======================================================================
// 
//         Name:  CheckTest
// 
//  Description: Main CheckTest routine. compares 2 arrays, gives pass/fail results,
//               sends events to verilog trigger, and finishes test on current processor
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in:  WORD             *exp_val        expected results array
//        in:  WORD             *res_val        real results array
//        in:  int              num_of_res      number of results (array size)
//    in-out:  
//       out:  
//    return:  
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 12:11:52 IST
//  Revision:  none
// =====================================================================================
int CheckTest(WORD *exp_val, WORD *res_val, int num_of_res);

// ===  FUNCTION  ======================================================================
// 
//         Name:  ExtCheckTest
// 
//  Description: Compares 2 arrays (expected Vs. real results) and outputs
//               pass/fail events through verilog_trigger,  
//
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD              *exp_val          expected values array
//        in: WORD              *res_val          real results array
//        in: int               num_of_res        number of results (array size) 
//    in-out:  
//       out: 
//    return: void 
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 11:57:03 IST
//  Revision:  none
// =====================================================================================
int ExtCheckTest(WORD *exp_val, WORD *res_val, int num_of_res);

// ===  FUNCTION  ======================================================================
// 
//         Name:  IntCheckTest
// 
//  Description: Compares 2 arrays (expected Vs. real results) and outputs
//               pass/fail events through verilog_trigger, and uses GPIO 
//               messaging.
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD              *exp_val          expected values array
//        in: WORD              *res_val          real results array
//        in: int               num_of_res        number of results (array size) 
//    in-out:  
//       out: 
//    return: void 
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 11:57:03 IST
//  Revision:  none
// =====================================================================================
int IntCheckTest(WORD *exp_val, WORD *res_val, int num_of_res); 


//2}}}

//----------------------------------------------------------------------
//  Data Compare Functions
//----------------------------------------------------------------------

//{{{2

// ===  FUNCTION  ======================================================================
// 
//         Name:  compare_array
// 
//  Description:  compare 2 arrays (expected values and real results),
//                and trigger pass/fail event for each comparison
//                uses info_checktest_trigger
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD              *exp_val        expected values array
//        in: WORD              *res_val        real results array
//        in: int               num_of_res      number of results (array size)
//    in-out:  
//       out:  
//    return: void              
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 15:41:53 IST
//  Revision:  none
// =====================================================================================
int compare_array(WORD *exp_val,WORD *res_val, int num_of_res);

// ===  FUNCTION  ======================================================================
// 
//         Name:  compare_results
// 
//  Description:  compare 2 data words (expected value and real result)
//                and trigger pass/fail event.
//                uses info_trigger. returns pass/fail indication
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD              reg_addr       data word, used for the info message
//        in: WORD              exp_val        expected value
//        in: WORD              res_val        real result
//    in-out:  
//       out:  
//    return: int               flag            pass(0)/fail(1)
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 15:41:53 IST
//  Revision:  none
// =====================================================================================
int compare_results(WORD reg_addr,WORD exp_val,WORD res_val);



// ===  FUNCTION  ======================================================================
// 
//         Name:  word_data_compare 
// 
//  Description:  compare 2 data half words, and trigger pass/fail event
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD              worda           first word to compare 
//        in: WORD              wordb           second word to compare
//    in-out:  
//       out:  
//    return:  void
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 15:34:44 IST
//  Revision:  none
// =====================================================================================
int word_data_compare (WORD worda , WORD wordb);

// ===  FUNCTION  ======================================================================
// 
//         Name:  hw_data_compare
// 
//  Description:  compare 2 data half words, and trigger pass/fail event
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: HALF              hworda          first half word to compare 
//        in: HALF              hwordb          second half word to compare
//    in-out:  
//       out:  
//    return:  void
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 15:34:44 IST
//  Revision:  none
// =====================================================================================
int hw_data_compare (HALF worda , HALF wordb);

// ===  FUNCTION  ======================================================================
// 
//         Name:  byte_data_compare
// 
//  Description:  compare 2 data bytes, and trigger pass/fail event
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: HALF              bytea           first byte to compare 
//        in: HALF              byteb           second byte to compare
//    in-out:  
//       out:  
//    return:  void
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 15:34:44 IST
//  Revision:  none
// =====================================================================================
int byte_data_compare (BYTE worda , BYTE wordb);

//2}}}
//----------------------------------------------------------------------
//  Write With Mask (write only certain bits)
//----------------------------------------------------------------------

//{{{2
// ===  FUNCTION  ======================================================================
// 
//         Name:  regN_write_mask
// 
//  Description:  Write value to a register using bit mask.
//                N=8,16,32
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD              addr            address to access
//        in: BYTE/HALF/WORD    wdata           data to write, size depends on N
//        in: BYTE/HALF/WORD    mask            bit mask for writing, size depends on N
//    in-out:  
//       out:  
//    return:  void
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/02/04 14:00:05 IST
//  Revision:  none
// =====================================================================================
void reg8_write_mask( WORD addr , BYTE wdata , BYTE mask);
void reg16_write_mask(WORD addr , HALF wdata , HALF mask);
void reg32_write_mask(WORD addr , WORD wdata , WORD mask);



//2}}}

//----------------------------------------------------------------------
//  Read/Write Compare Functions
//----------------------------------------------------------------------

//{{{2

// ===  FUNCTION  ======================================================================
// 
//         Name:  regN_rw_test
// 
//  Description:  write value to register, read it back and compare to expected value.
//                and trigger pass/fail event (uses regN_read_tst)
//                size is N=8,16,32
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in: WORD             addr             addr to access
//        in: BYTE/HALF/WORD   wdata            data to write, size depends on N
//        in: WORD             exp_rdata        expected value
//    in-out:  
//       out:  
//    return: void 
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  03/01/04 16:41:28 IST
//  Revision:  none
// =====================================================================================

void reg32_rw_test(WORD addr, WORD wdata, WORD exp_rdata);
void reg16_rw_test(WORD addr, HALF wdata, HALF exp_rdata);
void reg8_rw_test(WORD addr, BYTE wdata, BYTE exp_rdata);

//2}}}

// #####   FUNCTION DECLARATIONS  - NON COMMON API ############################################ 

//----------------------------------------------------------------------
//  Tortola/Argon project specific functions
//----------------------------------------------------------------------

//{{{2

// ===  FUNCTION  ======================================================================
// 
//         Name:  release_spba
// 
//  Description:  release spba from being mastered by ARM
// 
// - PARAMETER -------------------------------------------------------------------------
//      Mode   Type             Name            Description
// -------------------------------------------------------------------------------------
//        in:  void
//    in-out:  
//       out:  
//    return:  void
// -------------------------------------------------------------------------------------
//    Author:  
//   Created:  09/07/04 17:34:57 IDT
//  Revision:  none
// =====================================================================================

void release_spba(void);
//2}}}

//1}}}

#endif //FUNCTIONS_H


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -