imembist.tst 2.16 KB
//****************************************************************************
//
// File: bist.tst 
//	 Test file for IMEM hardware memory selftestor
//
// File Format:
//
// t <id> <arg1> <arg2> <arg3> <arg4>	- Run test id with the 4 args
//						where id   = decimal number
//						      argX = hex number
// q					- Quit testing and shutdown verilog 
//					  server
// 
// Common Test IDs:
// ================
// 101 - MemReadCompare
// 102 - MemWrite
// 103 - MemWriteRead
// 104 - MemPollStatus
//
//	DMEM Address:	0x04000000 - 0x04000FFF
//	IMEM Address:	0x04001000 - 0x04001FFF
//
//****************************************************************************

// halt sp
t 0103 04040010 00000002 00000001 00000000

// clear all bist field, bist_clear [2] = 1, bist_check, bist_go [1,0] = 0,
// read should show all 0s

t 0103 04080004 00000004 00000000 00000000

// trigger tester selftest force 1, bist_check [0] = 1
// don't read as bist_fail state is unknown

t 0102 04080004 00000001 00000000 00000000

// wait until bist_done [2] = 1

t 0104 04080004 00000004 00000000 00000000

// read and check bist_fail [6:3] = 0x78, bist_check [0] = 1, bist_go [1] = 0,
// bist_done [2] = 1

t 0101 04080004 0000007d 00000000 00000000

// clear bist_fail, clear bist_done, bist_clear [2] = 1
// trigger tester selftest force 0, bist_check[0] = 0
// keep bist_go [1] = 0
// don't read as bist_fail state is unknown

t 0102 04080004 00000004 00000000 00000000

// wait until bist_done [2] = 1

t 0104 04080004 00000004 00000000 00000000

// read and check bist_fail [6:3] = 78, bist_check [0] = 0, bist_go [1] = 0,
// bist_done [2] = 1

t 0101 04080004 0000007c 00000000 00000000

// clear all bist field, bist_clear [2] = 1, bist_check, bist_go [1,0] = 0,
// read should show all 0s

t 0103 04080004 00000004 00000000 00000000

// trigger bist_go to run memory test, bist_check [0] = 0, bist_go [1] = 1,
// clear_bist [2] = 0

t 0102 04080004 00000002 00000000 00000000

// wait until bist_done [2] = 1

t 0104 04080004 00000004 00000000 00000000

// read and check bist_fail [6:3] = 0, bist_check [0] = 0, bist_go [1] = 1,
// bist_done [2] = 1

t 0101 04080004 00000006 00000000 00000000

// halt testing
q