Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //************************************************************************
- // Interceptor script for basic test of M7847 16KW memory board
- //------------------------------------------------------------------------
- // Test Parameters
- BoardID='7847#5' // ID of board being tested
- TestBaseAddr=0 // Word Address of Memory Board
- TestMemSize=16384 // Memory Board size in words
- BlokSize=16; // Size of test block (words)
- AddrStepSize=4096 // Test block address increment (words)
- // Setup
- LogClear
- Log 'Testing M7847 board '+BoardID
- Log 'This test done without M930 terminator in AB1'
- ErrorCount=0
- ErrorFlag=False
- TestBaseAddr=TestBaseAddr*2 // Convert to bytes...
- TestMemSize=TestMemSize*2
- AddrStepSize=AddrStepSize*2
- // Run tests...
- For BlockAddr=TestBaseAddr to TestBaseAddr+TestMemSize by AddrStepSize do
- TestData=0 Call FillMemCon Call ExamMem(False)
- TestData=65535 Call FillMemCon Call ExamMem(False)
- TestData=21845 Call FillMemCon Call ExamMem(False)
- TestData=43690 Call FillMemCon Call ExamMem(False)
- Call FillMemAdr Call ExamMem(True)
- Log('')
- End
- Log 'Test Complete. '+ErrorCount+' Errors found. Duration: '+Duration;
- LogSave $Name+' ('+BoardID+') '+$Date+'-'+$Time+'.log';
- // Fill memory block with a constant value
- Procedure FillMemCon
- Call ShowFillHeading('constant value $'+Hex(TestData))
- PutCommand('@C.'+Oct(TestData)); // Enter test data value
- For 0 to BlokSize do
- LogRepl(Heading+HEX(CurrAddr)) // Show address being loaded
- PutCommand('@D'); // Hit deposit key
- Inc(CurrAddr) // Track the address value
- End
- End
- // Fill memory block with each location's address value
- Procedure FillMemAdr
- Call ShowFillHeading('address value')
- For 0 to BlokSize do // Loop for the number of words/testblock
- If Not ErrorFlag then // Don't clobber any error message,
- LogRepl(Heading+HEX(CurrAddr)) // otherwise show address
- End
- PutCommand('@C.'+Oct(CurrAddr)+'DV'); // Det data value and Deposit
- If ConsoleDispStr<>Oct(CurrAddr) then // Check the data was entered properly
- Log('ERROR: Display shows: '+ConsoleDispStr+' Should be: '+Oct(CurrAddr))
- ErrorFlag=True;
- End
- Inc(CurrAddr) // Track the address value
- End
- End
- // Check that memory block contains the expected data
- Procedure ExamMem
- Call ShowTestHeading
- For 0 to BlokSize do
- If Not ErrorFlag then // Show addr if no error msg
- LogRepl(Heading+HEX(CurrAddr))
- End
- PutCommand('@E@V') // Hit Exam, ensure we have updated value
- If &1 then // Using address as test data?
- TestData=CurrAddr
- End
- Call CheckExamResult // Check Exam result matches test data
- Inc(CurrAddr) // Track the address value
- End
- End
- // Check that the console display (from EXAM) shows the expected value (in TestData)
- Procedure CheckExamResult
- If ConsoleDispStr<>Oct(TestData) then // Does console show correct value?
- ErorMesg='['+Oct(CurrAddr)+'] = '+ConsoleDispStr+' Expected '+Oct(TestData)
- ConsValu=ConsoleDispVal
- Syndrome=ConsValu Xor TestData // No, form difference, and display
- ErorMesg=ErorMesg+' Syndrome Bits: '+Bin(Syndrome)
- Log('ERROR: '+ErorMesg);
- Inc(ErrorCount) ErrorFlag=True
- End
- End
- Procedure ShowFillHeading
- Heading='Filling block at: '+Oct(BlockAddr)+' $'+Hex(BlockAddr)+' with '+&1+' >$'
- Log(Heading)
- Call LoadAddress(BlockAddr)
- End
- Procedure ShowTestHeading
- Heading='Testing block at: '+Oct(BlockAddr)+' $'+Hex(BlockAddr)+' >$'
- Log(Heading)
- Call LoadAddress(BlockAddr)
- End
- Procedure LoadAddress
- CurrAddr=&1
- PutCommand('@C.'+Oct(CurrAddr)+'L'); // Hit CLR, Enter address, Hit LAD
- ErrorFlag=False
- End
Add Comment
Please, Sign In to add comment