summaryrefslogtreecommitdiffstats
path: root/sbe/test
diff options
context:
space:
mode:
authorRaja Das <rajadas2@in.ibm.com>2016-03-15 23:44:39 -0500
committerPrachi Gupta <pragupta@us.ibm.com>2016-06-08 11:45:52 -0500
commiteb1b71efed5605274dbfb17a11e353a385e190b0 (patch)
tree95bb7c210b28fe08cea612563765283cfa57f714 /sbe/test
parentd8e942c7bf09874cca9d0c55fe211370641b1808 (diff)
downloadtalos-sbe-eb1b71efed5605274dbfb17a11e353a385e190b0.tar.gz
talos-sbe-eb1b71efed5605274dbfb17a11e353a385e190b0.zip
ADU Support
Change-Id: I8351391d75fcd0d8d07e94d2e3378d052993c3a7 RTC: Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/22855 Tested-by: Jenkins Server Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: AMIT J. TENDOLKAR <amit.tendolkar@in.ibm.com>
Diffstat (limited to 'sbe/test')
-rwxr-xr-xsbe/test/test.xml1
-rw-r--r--sbe/test/testAduMem.xml19
-rw-r--r--sbe/test/testAduMem_ecc.py45
-rw-r--r--sbe/test/testAduMem_itag.py43
-rw-r--r--sbe/test/testAduMem_noEccNoItag.py76
-rw-r--r--sbe/test/testAduMem_withEccItag.py43
-rw-r--r--sbe/test/testAduMem_withEccWithItagReadWrite.py73
7 files changed, 300 insertions, 0 deletions
diff --git a/sbe/test/test.xml b/sbe/test/test.xml
index 23f0d46f..f63d269c 100755
--- a/sbe/test/test.xml
+++ b/sbe/test/test.xml
@@ -12,6 +12,7 @@
<include>../simics/targets/p9_nimbus/sbeTest/testCntlInstruction.xml</include>
<include>../simics/targets/p9_nimbus/sbeTest/testRegAccess.xml</include>
<include>../simics/targets/p9_nimbus/sbeTest/testFifoReset.xml</include>
+ <include>../simics/targets/p9_nimbus/sbeTest/testAduMem.xml</include>
<testcase>
<simcmd>sbe-trace 0</simcmd>
</testcase>
diff --git a/sbe/test/testAduMem.xml b/sbe/test/testAduMem.xml
new file mode 100644
index 00000000..dde43724
--- /dev/null
+++ b/sbe/test/testAduMem.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <testcase>
+ <simcmd>run-python-file targets/p9_nimbus/sbeTest/testAduMem_ecc.py</simcmd>
+ <exitonerror>yes</exitonerror>
+ </testcase>
+ <testcase>
+ <simcmd>run-python-file targets/p9_nimbus/sbeTest/testAduMem_itag.py</simcmd>
+ <exitonerror>yes</exitonerror>
+ </testcase>
+ <testcase>
+ <simcmd>run-python-file targets/p9_nimbus/sbeTest/testAduMem_withEccItag.py</simcmd>
+ <exitonerror>yes</exitonerror>
+ </testcase>
+ <testcase>
+ <simcmd>run-python-file targets/p9_nimbus/sbeTest/testAduMem_noEccNoItag.py</simcmd>
+ <exitonerror>yes</exitonerror>
+ </testcase>
+
diff --git a/sbe/test/testAduMem_ecc.py b/sbe/test/testAduMem_ecc.py
new file mode 100644
index 00000000..358d9ae9
--- /dev/null
+++ b/sbe/test/testAduMem_ecc.py
@@ -0,0 +1,45 @@
+import sys
+sys.path.append("targets/p9_nimbus/sbeTest" )
+import testUtil
+err = False
+
+LOOP_COUNT = 1
+
+GETMEMADU_TESTDATA_ECC = [0,0,0,0x6,
+ 0,0,0xA4,0x01,
+ 0,0,0x0,0xAD, #CoreChipletId/EccByte/Flags - CacheInhibit/FastMode/NoTag/Ecc/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x20] # length of data
+
+GETMEMADU_EXPDATA_ECC = [0x00,0x00,0x00,0x24, # length of data
+ 0xc0,0xde,0xa4,0x01,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03];
+
+# MAIN Test Run Starts Here...
+#-------------------------------------------------
+def main( ):
+ testUtil.runCycles( 10000000 )
+
+ # GetMemAdu with Ecc
+ testUtil.writeUsFifo( GETMEMADU_TESTDATA_ECC)
+ testUtil.writeEot( )
+
+ testUtil.readDsEntry ( 9 )
+ testUtil.readDsFifo( GETMEMADU_EXPDATA_ECC)
+ testUtil.runCycles( 10000000 )
+ testUtil.readEot( )
+
+#-------------------------------------------------
+# Calling all test code
+#-------------------------------------------------
+main()
+
+if err:
+ print ("\nTest Suite completed with error(s)")
+ #sys.exit(1)
+else:
+ print ("\nTest Suite completed with no errors")
+ #sys.exit(0);
+
diff --git a/sbe/test/testAduMem_itag.py b/sbe/test/testAduMem_itag.py
new file mode 100644
index 00000000..33160602
--- /dev/null
+++ b/sbe/test/testAduMem_itag.py
@@ -0,0 +1,43 @@
+import sys
+sys.path.append("targets/p9_nimbus/sbeTest" )
+import testUtil
+err = False
+
+GETMEMADU_TESTDATA_ITAG = [0,0,0,0x6,
+ 0,0,0xA4,0x01,
+ 0,0,0x0,0xB5, #CoreChipletId/EccByte/Flags -> CacheInhibit/FastMode/Tag/NoEcc/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x40] # length of data
+
+GETMEMADU_EXPDATA_ITAG = [0x00,0x00,0x00,0x48, # length of data
+ 0xc0,0xde,0xa4,0x01,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03];
+
+# MAIN Test Run Starts Here...
+#-------------------------------------------------
+def main( ):
+ testUtil.runCycles( 10000000 )
+
+ # GetMemAdu with Itag
+ testUtil.writeUsFifo( GETMEMADU_TESTDATA_ITAG )
+ testUtil.writeEot( )
+
+ testUtil.readDsEntry ( 18 )
+ testUtil.readDsFifo( GETMEMADU_EXPDATA_ITAG )
+ testUtil.runCycles( 10000000 )
+ testUtil.readEot( )
+
+#-------------------------------------------------
+# Calling all test code
+#-------------------------------------------------
+main()
+
+if err:
+ print ("\nTest Suite completed with error(s)")
+ #sys.exit(1)
+else:
+ print ("\nTest Suite completed with no errors")
+ #sys.exit(0);
+
diff --git a/sbe/test/testAduMem_noEccNoItag.py b/sbe/test/testAduMem_noEccNoItag.py
new file mode 100644
index 00000000..6f1d3350
--- /dev/null
+++ b/sbe/test/testAduMem_noEccNoItag.py
@@ -0,0 +1,76 @@
+import sys
+sys.path.append("targets/p9_nimbus/sbeTest" )
+import testUtil
+err = False
+
+LOOP_COUNT = 1
+
+PUTMEMADU_CNTLDATA = [0,0,0,0,
+ 0,0,0xA4,0x02,
+ 0,0,0x0,0xA5, #CoreChipletId/EccByte/Flags -> NoEccOverride/CacheInhibit/FastMode/NoTag/NoEcc/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x10] # length of data
+
+PUTMEMADU_TESTDATA = [0xab,0xcd,0xef,0x12,
+ 0xba,0xdc,0xfe,0x21,
+ 0x34,0x56,0x78,0x9a,
+ 0x43,0x65,0x87,0xa9]
+
+PUTMEMADU_EXPDATA = [0x00,0x00,0x00,0x10, # length of data
+ 0xc0,0xde,0xa4,0x02,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03];
+
+
+
+GETMEMADU_TESTDATA = [0,0,0,0x6,
+ 0,0,0xA4,0x01,
+ 0,0,0x0,0xA5, #CoreChipletId/EccByte/Flags -> CacheInhibit/FastMode/NoTag/NoEcc/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x10] # length of data
+
+GETMEMADU_EXPDATA = [0xab,0xcd,0xef,0x12, #data
+ 0xba,0xdc,0xfe,0x21,
+ 0x34,0x56,0x78,0x9a,
+ 0x43,0x65,0x87,0xa9,
+ 0x00,0x00,0x00,0x10, # length of data
+ 0xc0,0xde,0xa4,0x01,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03];
+
+
+# MAIN Test Run Starts Here...
+#-------------------------------------------------
+def main( ):
+ testUtil.runCycles( 10000000 )
+
+ #PutMemAdu Test
+ testUtil.writeUsFifo( PUTMEMADU_CNTLDATA )
+ testUtil.writeUsFifo( PUTMEMADU_TESTDATA )
+ testUtil.writeEot( )
+
+ testUtil.readDsFifo( PUTMEMADU_EXPDATA )
+ testUtil.readEot( )
+
+ # GetMemAdu test
+ testUtil.writeUsFifo( GETMEMADU_TESTDATA )
+ testUtil.writeEot( )
+
+ testUtil.readDsFifo( GETMEMADU_EXPDATA )
+ testUtil.runCycles( 10000000 )
+ testUtil.readEot( )
+
+#-------------------------------------------------
+# Calling all test code
+#-------------------------------------------------
+main()
+
+if err:
+ print ("\nTest Suite completed with error(s)")
+ #sys.exit(1)
+else:
+ print ("\nTest Suite completed with no errors")
+ #sys.exit(0);
+
diff --git a/sbe/test/testAduMem_withEccItag.py b/sbe/test/testAduMem_withEccItag.py
new file mode 100644
index 00000000..5980a9a4
--- /dev/null
+++ b/sbe/test/testAduMem_withEccItag.py
@@ -0,0 +1,43 @@
+import sys
+sys.path.append("targets/p9_nimbus/sbeTest" )
+import testUtil
+err = False
+
+GETMEMADU_TESTDATA_ECC_ITAG = [0,0,0,0x6,
+ 0,0,0xA4,0x01,
+ 0,0,0x0,0xBD, #CoreChipletId/EccByte/Flags -> CacheInhibit/FastMode/Tag/Ecc/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x40] # length of data
+
+GETMEMADU_EXPDATA_ECC_ITAG = [0x00,0x00,0x00,0x50, # length of data
+ 0xc0,0xde,0xa4,0x01,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03];
+
+# MAIN Test Run Starts Here...
+#-------------------------------------------------
+def main( ):
+ testUtil.runCycles( 10000000 )
+
+ # GetMemAdu with Ecc with Itag test
+ testUtil.writeUsFifo( GETMEMADU_TESTDATA_ECC_ITAG )
+ testUtil.writeEot( )
+
+ testUtil.readDsEntry ( 20 )
+ testUtil.readDsFifo( GETMEMADU_EXPDATA_ECC_ITAG )
+ testUtil.runCycles( 10000000 )
+ testUtil.readEot( )
+
+#-------------------------------------------------
+# Calling all test code
+#-------------------------------------------------
+main()
+
+if err:
+ print ("\nTest Suite completed with error(s)")
+ #sys.exit(1)
+else:
+ print ("\nTest Suite completed with no errors")
+ #sys.exit(0);
+
diff --git a/sbe/test/testAduMem_withEccWithItagReadWrite.py b/sbe/test/testAduMem_withEccWithItagReadWrite.py
new file mode 100644
index 00000000..8e2de7a0
--- /dev/null
+++ b/sbe/test/testAduMem_withEccWithItagReadWrite.py
@@ -0,0 +1,73 @@
+import sys
+sys.path.append("targets/p9_nimbus/sbeTest" )
+import testUtil
+err = False
+
+LOOP_COUNT = 1
+
+PUTMEMADU_CNTLDATA = [0,0,0,0,
+ 0,0,0xA4,0x02,
+ 0,0x07,0x0,0xBD, #CoreChipletId/EccByteTrue/Flags -> EccOverride/CacheInhibit/FastMode/Tag/EccOverride/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x08] # length of data
+
+PUTMEMADU_TESTDATA = [0xab,0xcd,0xef,0x12,
+ 0xba,0xdc,0xfe,0x21]
+
+PUTMEMADU_EXPDATA = [0x00,0x00,0x00,0x0a, # length of data
+ 0xc0,0xde,0xa4,0x02,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03]
+
+
+
+GETMEMADU_TESTDATA = [0,0,0,0x6,
+ 0,0,0xA4,0x01,
+ 0,0,0x0,0xBD, #CoreChipletId/EccByte/Flags -> CacheInhibit/FastMode/Tag/Ecc/AutoIncr/Adu/Proc
+ 0,0,0,0, # Addr Upper 32 bit
+ 0x08,0x00,0x00,0x00, # Addr Lower 32 bit
+ 0x00,0x00,0x00,0x08] # length of data
+
+GETMEMADU_EXPDATA = [0xab,0xcd,0xef,0x12, #data
+ 0xba,0xdc,0xfe,0x21,
+ 0x01,0x07,0,0, #First Byte is iTag / Second Byte is ECC
+ 0x00,0x00,0x00,0x0a, # length of data
+ 0xc0,0xde,0xa4,0x01,
+ 0x0,0x0,0x0,0x0,
+ 0x00,0x0,0x0,0x03];
+
+
+# MAIN Test Run Starts Here...
+#-------------------------------------------------
+def main( ):
+ testUtil.runCycles( 10000000 )
+
+ #PutMemAdu Test
+ testUtil.writeUsFifo( PUTMEMADU_CNTLDATA )
+ testUtil.writeUsFifo( PUTMEMADU_TESTDATA )
+ testUtil.writeEot( )
+
+ testUtil.readDsFifo( PUTMEMADU_EXPDATA )
+ testUtil.readEot( )
+
+ # GetMemAdu test
+ testUtil.writeUsFifo( GETMEMADU_TESTDATA )
+ testUtil.writeEot( )
+
+ testUtil.readDsFifo( GETMEMADU_EXPDATA )
+ testUtil.runCycles( 10000000 )
+ testUtil.readEot( )
+
+#-------------------------------------------------
+# Calling all test code
+#-------------------------------------------------
+main()
+
+if err:
+ print ("\nTest Suite completed with error(s)")
+ #sys.exit(1)
+else:
+ print ("\nTest Suite completed with no errors")
+ #sys.exit(0);
+
OpenPOWER on IntegriCloud