Commit f261b396 authored by David Cussans's avatar David Cussans

Taking local copy of PyChips

parent 2f031cf3
K 25
svn:wc:ra_dav:version-url
V 32
/svn/!svn/ver/1570/trunk/PyChips
END
VersionHistory.txt
K 25
svn:wc:ra_dav:version-url
V 51
/svn/!svn/ver/1538/trunk/PyChips/VersionHistory.txt
END
K 10
svn:ignore
V 24
.pydevproject
.project
END
10
dir
1570
https://cactus.hepforge.org/svn/trunk/PyChips
https://cactus.hepforge.org/svn
2013-05-09T15:13:09.517614Z
1570
harderk
has-props
18a17b70-165d-4f71-a96d-00e1b61b3a60
test
dir
addressTables
dir
VersionHistory.txt
file
2013-07-29T17:57:11.000000Z
30972e3a69a3a9e90afbb557b906e79e
2013-01-25T13:19:49.053038Z
1538
frazier
has-props
1869
scripts
dir
src
dir
Version 1.5.X
-------------
Released XX December 2011.
Only supports the IPbus Protocol Version 2.0 and above!
* No longer supports IPbus Protocol v1.2/1.3. Please use the latest version
in the Version 1.4.X series if you are still using the older protocol.
New Features:
* Added support for IPbus v2.0 headers
Version 1.4.2
-------------
Released 19th December 2011.
Supports the IPbus Protocol Version 1.2/1.3
Minor changes / bug-fixes:
* Dummy hardware improvements
- A unified dummy hardware startup script that allows you to select the
various options (UDP/TCP mode, the port number, verbosity) via command-
line arguments.
- The TCP Dummy Hardware no-longer shuts down after the first TCP connection
closes - it now listens for a new connection whenever it's lacking an
active connection.
Version 1.4.1
-------------
Released 19th July 2011.
Supports the IPbus Protocol Version 1.2/1.3
Bug-fixes:
* Dummy hardware now correctly handles the RMWsum and getReservedAddrInfo
transactions.
Version 1.4.0
-------------
Released 23rd June 2011.
Supports the IPbus Protocol Version 1.2/1.3
New Features:
* Significant speed improvements
- Three times greater bandwidth on large block reads/writes
- Approx 30% faster on general/mixed small packet transactions
* Dummy Hardware improvements
- Automatic byte-reordering
- Handles malformed packets more elegantly than before
Bug fixes:
* In certain circumstances, a byte-order header was not automatically
being added to the beginning of the IPbus packet.
Version 1.3.0
-------------
Released 31st May 2011.
Supports the IPbus Protocol Version 1.2/1.3
Pre-version 1.3.0
-----------------
Older version history is not available...
\ No newline at end of file
K 25
svn:wc:ra_dav:version-url
V 45
/svn/!svn/ver/933/trunk/PyChips/addressTables
END
simpleTestAddrTable.txt
K 25
svn:wc:ra_dav:version-url
V 69
/svn/!svn/ver/231/trunk/PyChips/addressTables/simpleTestAddrTable.txt
END
soakTestAddrTable.txt
K 25
svn:wc:ra_dav:version-url
V 67
/svn/!svn/ver/933/trunk/PyChips/addressTables/soakTestAddrTable.txt
END
10
dir
1570
https://cactus.hepforge.org/svn/trunk/PyChips/addressTables
https://cactus.hepforge.org/svn
2011-12-22T16:31:27.899680Z
933
frazier
18a17b70-165d-4f71-a96d-00e1b61b3a60
simpleTestAddrTable.txt
file
2013-07-29T17:57:09.000000Z
67ed7fad27ea918cbff2b3c09f31989f
2011-03-10T19:07:38.397796Z
231
frazier
has-props
2124
soakTestAddrTable.txt
file
2013-07-29T17:57:09.000000Z
50540f679a643bcbc33c4447c9f31a14
2011-12-22T16:31:27.899680Z
933
frazier
has-props
564
*RegName RegAddr RegMask R W
*----------------------------------------------------------------------------------
SysId 0x00001000 0xffffffff 1 0
BoardId 0x00001004 0xffffffff 1 0
SlaveId 0x00001008 0xffffffff 1 0
FirmwareId 0x0000100C 0xffffffff 1 0
Test 0x00001010 0xffffffff 1 1
TestRam 0x08000000 0xffffffff 1 1 Should be at least 4K deep.
i2c_reset 0x00004000 0xffffffff 0 1
i2c_data 0x00004004 0xffffffff 0 1
i2c_trigger 0x00004008 0xffffffff 0 1
i2c_status 0x0000400c 0xffffffff 1 0
*----------------------------------------------------------------------------------
* The registers are for the purposes of unit-testing the code, and do not exist
* on the mini-T itself
UnitTest1 0xffff0000 0xffffffff 1 1
UnitTest1_mask1 0xffff0000 0xff000000 1 1
UnitTest1_mask2 0xffff0000 0x00ff0000 1 1
UnitTest1_mask3 0xffff0000 0x0000fffe 1 1
UnitTest1_mask4 0xffff0000 0x00000001 1 1
UnitTest2 0xffff0001 0xffffffff 1 1
UnitTest2_mask1 0xffff0001 0xff000000 1 1
UnitTest2_mask2 0xffff0001 0x00ff0000 1 1
UnitTest2_mask3 0xffff0001 0x0000fffe 1 1
UnitTest2_mask4 0xffff0001 0x00000001 1 1
UnitTest3 0xffff0002 0xffffffff 1 1
UnitTest4 0xffff0003 0xffffffff 1 1
UnitTest5 0xffff0004 0xffffffff 1 1
UnitTest6 0xffff0005 0xffffffff 1 1
UnitTest7 0xffff0006 0xffffffff 1 1
UnitTest8 0xffff0007 0xffffffff 1 1
UnitTest_ResetDummyHW 0xffffffff 0xffffffff 1 1 Reading from this address resets the dummy hardware.
*----------------------------------------------------------------------------------
\ No newline at end of file
*RegName RegAddr RegMask R W
*----------------------------------------------------------------------------------
Test_readOnly 0x00000000 0xffffffff 1 1 # Put write-flag to 1, in order to test read-only-ness!
Test 0x00000001 0xffffffff 1 1
TestRam 0x00000010 0xffffffff 1 1
TestRam_end 0x0000001f 0xffffffff 1 1
BigTestRam 0x00001000 0xffffffff 1 1
BigTestRam_end 0x00001fff 0xffffffff 1 1
K 25
svn:wc:ra_dav:version-url
V 39
/svn/!svn/ver/934/trunk/PyChips/scripts
END
example1.py
K 25
svn:wc:ra_dav:version-url
V 51
/svn/!svn/ver/499/trunk/PyChips/scripts/example1.py
END
soakTest.py
K 25
svn:wc:ra_dav:version-url
V 51
/svn/!svn/ver/934/trunk/PyChips/scripts/soakTest.py
END
bandwidthRxTest.py
K 25
svn:wc:ra_dav:version-url
V 58
/svn/!svn/ver/499/trunk/PyChips/scripts/bandwidthRxTest.py
END
configureJumboMac.py
K 25
svn:wc:ra_dav:version-url
V 60
/svn/!svn/ver/863/trunk/PyChips/scripts/configureJumboMac.py
END
10
dir
1570
https://cactus.hepforge.org/svn/trunk/PyChips/scripts
https://cactus.hepforge.org/svn
2011-12-22T16:42:29.517135Z
934
frazier
18a17b70-165d-4f71-a96d-00e1b61b3a60
example1.py
file
2013-07-29T17:57:10.000000Z
90ebe4b8a9f33d5d7e11431d91cdf4f1
2011-06-21T22:29:49.331383Z
499
frazier
has-props
1878
soakTest.py
file
2013-07-29T17:57:10.000000Z
10931df3fa75c627980d8aed235af372
2011-12-22T16:42:29.517135Z
934
frazier
has-props
6865
bandwidthRxTest.py
file
2013-07-29T17:57:10.000000Z
2155affb31538e0fffd2ca21850e2da9
2011-06-21T22:29:49.331383Z
499
frazier
has-props
1542
configureJumboMac.py
file
2013-07-29T17:57:10.000000Z
e4476a2f4ee79e1e131e74da9e4ed9d8
2011-11-01T16:40:33.255597Z
863
frazier
has-props
1223
from PyChipsUser import *
from datetime import datetime
from os import environ
import math
#chipsLog.setLevel(logging.DEBUG)
#######################
### TEST PARAMETERS ###
hostIP = "localhost"
hostPort = 50001
hostRamName = "BigTestRam"
testDepth = 350
testIterations = 10000
#######################
addrTable = AddressTable("../addressTables/davesFirmwareSoakTestAddrTable.txt")
testBoard = ChipsBusUdp(addrTable, hostIP, hostPort)
# Fill up the host's RAM with something, just so we can see its working correctly
# when in debug mode
writeBuf = []
for iVal in range(testDepth):
writeBuf.append(iVal)
testBoard.blockWrite(hostRamName, writeBuf)
print "Read-bandwidth test is running..."
# Start the clock
startTime = datetime.now()
# Run the test
for iRead in range(testIterations):
testBoard.blockRead(hostRamName, testDepth)
# Stop the clock
stopTime = datetime.now()
# Calculate the total IPbus payload actually transferred in kilobytes, excluding all headers, etc
totalPayloadKB = testIterations * testDepth / 256.
# Calculate the total transfer time in seconds
totalTime = stopTime-startTime
totalSeconds = (totalTime.days*86400) + totalTime.seconds + (totalTime.microseconds/1000000.)
dataRateKB_s = totalPayloadKB/totalSeconds
print "\nRead Bandwidth Results:"
print "-----------------------\n"
print "Total IPbus payload transferred = %.2f KB" % totalPayloadKB
print "Total time taken = %.2f s" % totalSeconds
print "Average read bandwidth = %.2f KB/s" % dataRateKB_s
# Configures the Ethernet MAC to use jumbo frames, when using Dave Newbold's default firmware.
#
# Robert Frazier, Oct 2011
from PyChipsUser import *
#chipsLog.setLevel(logging.DEBUG) # Uncomment for debug output!
# ******************************************************
# **** Set IP and port number of board in question ****
boardIpAddr = "192.168.200.32" # TODO: make this a command line parameter...
boardPortNum = 50001
# ******************************************************
if __name__ == '__main__':
addrTable = AddressTable("../addressTables/davesFirmwareSoakTestAddrTable.txt")
board = ChipsBusUdp(addrTable, boardIpAddr, boardPortNum)
board.write("MacHostBusPtr", 0x240)
result = board.read("MacHostBusReg")
print "Receiver register is set to:", hex(result)
print "Writing back previous value with bit 30 set high..."
board.write("MacHostBusReg", (result | 0x40000000))
print "...done."
board.write("MacHostBusPtr", 0x280)
result = board.read("MacHostBusReg")
print "Transmitter register is set to:", hex(result)
print "Writing back previous value with bit 30 set high..."
board.write("MacHostBusReg", (result | 0x40000000))
print "...done."
# Import the PyChips code - PYTHONPATH must be set to the PyChips installation src folder!
from PyChipsUser import *
##################################################################################################
### Uncomment one of the following two lines to turn on verbose or very-verbose debug modes. ###
### These debug modes allow you to see the packets being sent and received. ###
##################################################################################################
#chipsLog.setLevel(logging.DEBUG) # Verbose logging (see packets being sent and received)
# Read in an address table by creating an AddressTable object (Note the forward slashes, not backslashes!)
addrTable = AddressTable("../addressTables/davesFirmwareSoakTestAddrTable.txt")
# Create a ChipsBus bus to talk to your board.