bcptest.h
3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*************************************************************************
*
* File: bcptest.h
*
* This file contains all BCP tests
*
*/
#ifndef _BDOOR_IO_
#define _BDOOR_IO_
/* * * * * Init DDR * * * * * * */
int InitDDR(int, int, int, int);
int InitDDRBypass(int, int, int, int);
int BCPInitRand(char *filename);
int BCPDoneRand(char *filename);
/* Generic extension for xz values
*
* Extented I/O function
* ExtMemReadComp(210) -- xz value read and compare
* ExtMemWrite(211) -- xz value write
* ExtMemReadMaskComp(212) --- xz value read and mask compare
* rwExtReadComp(216) --- test each bit of given r/w address
* regMemSglWalk(230) --- regular memory single walk
* ExtmemSglWalk(231) --- xz memory single walk
* regMemBlkWalk(232) --- regular memory block walk
* ExtmemBlkWalk(233) --- xz memory block walk
*/
int ExtMemReadComp(int addr, int data_part, int xz_part, int extra);
int ExtMemReadMaskComp(int addr, int data_part, int xz_part, int mask);
int ExtMemWrite(int addr, int data_part, int xz_part, int extra);
int rwExtReadComp(int addr, int extra0, int extra1, int extra2);
int regMemSglWalk(int base_addr, int addr_bits, int size, int req_spacing);
int ExtMemSglWalk(int base_addr, int addr_bits, int size, int req_spacing);
int regMemBlkWalk(int base_addr, int addr_bits, int size, int req_spacing);
int ExtMemBlkWalk(int base_addr, int addr_bits, int size, int req_spacing);
/*
bcp_ri.test
bcp ri interface test
BDMemReadComp(300) --- Memory backdoor read and compare with given data
BDMemWrite(301) --- Memory backdoor write
ExtMemReadMaskComp(302) --- bdoor xz value read and mask compare
BDMemReadTest(312) --- Memory backdoor read and compare test
BDMemWriteTest(313) --- Memory backdoor write test
BDregMemSglWalk(330) --- single walk checked by bdoor read
BDExtMemSglWalk(331) --- single walk checked by bdoor read
BDregMemBlkWalk(332) --- blk walk checked by bdoor read
BDregMemBlkWalk(333) --- blk walk checked by bdoor read
*/
int BDMemReadComp(int addr, int data_part, int xz_part, int extra);
int BDMemReadMaskComp(int addr, int data_part, int xz_part, int extra);
int BDMemWrite(int addr, int data_part, int xz_part, int extra);
int BDMemReadTest(int addr, int a2, int a3, int a4);
int BDMemWriteTest(int addr, int a2, int a3, int a4);
int BDregMemSglWalk(int base_addr, int addr_bits, int size, int req_spacing);
int BDExtMemSglWalk(int base_addr, int addr_bits, int size, int req_spacing);
int BDregMemBlkWalk(int base_addr, int addr_bits, int size, int req_spacing);
int BDExtMemBlkWalk(int base_addr, int addr_bits, int size, int req_spacing);
/* bcp rsp test
RspCtraceRun --- Run SP from 0 until break inst hit.
RspCtraceSingle --- Run SP step by step
bd_sp_compare_mem --- SP Dmem comparison
bd_sp_imem_load --- Load SpData/idata.hex into imem
bd_sp_dmam_load --- Load SpData/d_x.hex into dmem
*/
int RspCtraceRun(int expect, int a2, int a3, int a4);
int RspCtraceSingle(int s_exp, int f_exp, int a3, int a4);
int bd_sp_compare_mem(char *filename);
int bd_sp_imem_load(char *filename);
int bd_sp_dmem_load(int wh, char *filename);
/* BCP general register test */
int register_test(int addr, int rw_mask, int ronly_mask, int);
/* BCP sram test */
int sram_test(int addr, int size, int, int);
int bcp_ri_rand(int read, int times, int a3, int a4);
#endif