diff options
author | spashabk-in <shakeebbk@in.ibm.com> | 2017-02-08 06:26:33 -0600 |
---|---|---|
committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-03-01 05:23:06 -0500 |
commit | 15b2150ba77b261db8ee59e249704f2d05c93fca (patch) | |
tree | df9ec0d7744c574ca439e2d492d55683a41ea211 /src/test/testcases/testAduMem_itag.py | |
parent | c32c107be03edaa48c49050877394d14e72ed0f2 (diff) | |
download | talos-sbe-15b2150ba77b261db8ee59e249704f2d05c93fca.tar.gz talos-sbe-15b2150ba77b261db8ee59e249704f2d05c93fca.zip |
PBA and ADU updated testcase
Change-Id: Ib43f05ea46ef3389519b5d5bc31c403e61d4171c
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36128
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: RAJA DAS <rajadas2@in.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/test/testcases/testAduMem_itag.py')
-rw-r--r-- | src/test/testcases/testAduMem_itag.py | 39 |
1 files changed, 31 insertions, 8 deletions
diff --git a/src/test/testcases/testAduMem_itag.py b/src/test/testcases/testAduMem_itag.py index 713f572d..1b5be988 100644 --- a/src/test/testcases/testAduMem_itag.py +++ b/src/test/testcases/testAduMem_itag.py @@ -5,7 +5,7 @@ # # OpenPOWER sbe Project # -# Contributors Listed Below - COPYRIGHT 2016 +# Contributors Listed Below - COPYRIGHT 2016,2017 # [+] International Business Machines Corp. # # @@ -25,6 +25,7 @@ import sys sys.path.append("targets/p9_nimbus/sbeTest" ) import testUtil +import testMemUtil as testMemProcUtil err = False GETMEMADU_TESTDATA_ITAG = [0,0,0,0x6, @@ -44,15 +45,37 @@ GETMEMADU_EXPDATA_ITAG = [0x00,0x00,0x00,0x48, # length of data def main( ): testUtil.runCycles( 10000000 ) - # GetMemAdu with Itag - testUtil.writeUsFifo( GETMEMADU_TESTDATA_ITAG ) - testUtil.writeEot( ) + #PutMemAdu with Itag + data = os.urandom(80) + data = [ord(c) for c in data] + testMemProcUtil.putmem(0x08000000, data, 0xB5) + data = testMemProcUtil.addItagEcc(data,True, False) - testUtil.readDsEntry ( 18 ) - testUtil.readDsFifo( GETMEMADU_EXPDATA_ITAG ) - testUtil.runCycles( 10000000 ) - testUtil.readEot( ) + # GetMemAdu test with ECC and Itag + readData = testMemProcUtil.getmem(0x08000000, 80, 0xB5) + if(data == readData): + print ("Success - Write-Read ADU with Itag") + else: + print data + print readData + raise Exception('data mistmach') + # Partial Write test + readData = testMemProcUtil.getmem(0x08000000, 40, 0xB5) + data = os.urandom(8) + data = [ord(c) for c in data] + testMemProcUtil.putmem(0x08000008, data, 0xB5, 0xEF) + data = testMemProcUtil.addItagEcc(data,True, False) + readBackData = testMemProcUtil.getmem(0x08000000, 40, 0xB5) + sandwichData = readData[:9]+data+readData[len(data)+9:] + if(sandwichData == readBackData): + print ("Success - Write_Part-Read ADU with Itag") + else: + print readData + print data + print readBackData + print sandwichData + raise Exception('data mistmach') #------------------------------------------------- # Calling all test code #------------------------------------------------- |