Commit e4355ceb authored by Theodor-Adrian Stana's avatar Theodor-Adrian Stana

doc: Added pulse counters to gateware

Also changed Python test programs to ask for login data.
Signed-off-by: Theodor-Adrian Stana's avatarTheodor Stana <t.stana@cern.ch>
parent cc5dfeaf
......@@ -9,7 +9,7 @@
\noindent \rule{\textwidth}{.1cm}
\hfill January 10, 2013
\hfill January 28, 2013
\vspace*{3cm}
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="450.6196"
height="64.169319"
id="svg3259"
version="1.1"
inkscape:version="0.48.3.1 r9886"
sodipodi:docname="pulse-cnt.svg">
<defs
id="defs3261" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
inkscape:cx="255.89633"
inkscape:cy="-42.617916"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
inkscape:window-width="1855"
inkscape:window-height="1176"
inkscape:window-x="65"
inkscape:window-y="24"
inkscape:window-maximized="1">
<inkscape:grid
type="xygrid"
id="grid71895"
empspacing="5"
visible="true"
enabled="true"
snapvisiblegridlinesonly="true"
units="mm"
spacingx="0.5mm"
spacingy="0.5mm"
originx="-25.966249mm"
originy="-189.85889mm" />
</sodipodi:namedview>
<metadata
id="metadata3264">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-92.006394,-315.46453)">
<g
transform="translate(49.606305,12.401572)"
id="g6859">
<rect
y="311.811"
x="212.59842"
height="40.748032"
width="35.433071"
id="rect6649"
style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<path
inkscape:connector-curvature="0"
id="path6651"
d="m 225,341.92911 -5.31496,0 10.62992,0 0,-19.48819 10.62992,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
sodipodi:nodetypes="ccc"
inkscape:connector-curvature="0"
id="path6653"
d="m 226.77165,333.07084 3.54331,-3.5433 3.54331,3.5433"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
</g>
<g
transform="translate(58.46457,12.401572)"
id="g3267">
<g
id="g72719">
<rect
y="311.811"
x="290.55118"
height="40.748032"
width="35.433071"
id="rect6857"
style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none" />
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="292.55969"
y="339.47507"
id="text6864"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan6866"
x="292.55969"
y="339.47507"
style="font-size:20px;font-weight:bold">+1</tspan></text>
</g>
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#808080;fill-opacity:1;stroke:none;font-family:Sans"
x="90.354324"
y="311.811"
id="text72715"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan72717"
x="90.354324"
y="311.811"
style="font-size:12px;font-weight:bold;text-align:end;text-anchor:end;fill:#808080;fill-opacity:1">TTL</tspan></text>
<text
sodipodi:linespacing="125%"
id="text72724"
y="361.4173"
x="90.354324"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#808080;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:12px;font-weight:bold;text-align:end;text-anchor:end;fill:#808080;fill-opacity:1"
y="361.4173"
x="90.354324"
id="tspan72726"
sodipodi:role="line">Blocking</tspan></text>
</g>
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 210.82677,345.47242 51.37795,0"
id="path71897"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cc" />
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path71899"
d="m 297.6378,334.8425 51.37795,0"
style="fill:#000000;fill-opacity:0;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#808080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 189.56693,341.92911 -21.25984,0 0,-21.25984 -17.71654,0"
id="path72681"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
sodipodi:nodetypes="cccc"
inkscape:connector-curvature="0"
id="path72683"
d="m 189.56693,349.01573 -21.25984,0 0,21.25984 -17.71654,0"
style="fill:none;stroke:#808080;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:#ffffff;fill-opacity:1;stroke:#808080;stroke-width:0.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
d="m 185.02362,336.87137 c 5.16063,6.88084 5.16063,10.32125 0,17.20209 12.04146,0 20.64251,0 25.80315,-8.60104 -5.16064,-8.60105 -13.76169,-8.60105 -25.80315,-8.60105 z"
id="path3936"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<rect
style="fill:#cccccc;fill-opacity:1;stroke:#000000;stroke-width:1;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
id="rect72689"
width="94.134499"
height="40.748032"
x="435.5899"
y="324.21259" />
<text
sodipodi:linespacing="125%"
id="text72691"
y="351.87665"
x="437.82318"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
xml:space="preserve"><tspan
style="font-size:20px;font-weight:bold"
y="351.87665"
x="437.82318"
id="tspan72693"
sodipodi:role="line">CHxPCR</tspan></text>
<path
sodipodi:nodetypes="cc"
inkscape:connector-curvature="0"
id="path72699"
d="m 384.44882,345.47242 51.37795,0"
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
<path
style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 529.72441,345.47243 12.40157,0 0,33.66142 -214.37007,0 0,-24.80315 21.25984,0"
id="path72701"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<text
xml:space="preserve"
style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
x="133.92857"
y="317.36218"
id="text72703"
sodipodi:linespacing="125%"><tspan
sodipodi:role="line"
id="tspan72705"
x="133.92857"
y="317.36218" /></text>
</g>
</svg>
This diff is collapsed.
......@@ -17,7 +17,7 @@
howpublished = {\url{http://www.ohwr.org/attachments/download/2324/ELMA_SNMP_specification.pdf}}
}
@misc{rtm-ident,
@misc{rtm-det,
title = {{RTM detection}},
howpublished = {\url{http://www.ohwr.org/projects/conv-ttl-blo/wiki/RTM_board_detection}}
}
......
This diff is collapsed.
import time
import sys
import time
sys.path.append("../vbcp")
from vbcp import *
sys.path.append("../ei2c")
from ei2c import *
IDREG = 0x00
FWVREG = 0x04
......@@ -43,16 +43,16 @@ CTB_CLK_PER = 50*(10**(-9))
#CTB_CLK_PER = 8*(10**(-9))
if __name__ == "__main__":
ip = "elma" # raw_input("Crate IP? ")
user = "admin" # raw_input("Username? ")
pwd = "ADMIN" # raw_input("Password? ")
ip = raw_input("Crate IP or hostname? ")
user = raw_input("Username? ")
pwd = raw_input("Password? ")
# Wait for proper slot number
while 1:
try:
slot = raw_input("Slot no.? ")
slot = int(slot)
testelma = VBCP(ip, user, pwd)
testelma = EI2C(ip, user, pwd)
break
except TypeError as e:
print "Please input a decimal slot number."
......@@ -63,7 +63,7 @@ if __name__ == "__main__":
except:
print "Unexpected error: ", sys.exc_info()[0]
# Open VBCP connection
# Open I2C connection
testelma.open()
bloid = testelma.read(slot, 0x00)
......
......@@ -35,23 +35,23 @@
import random
import sys
import time
sys.path.append("../vbcp")
from vbcp import *
sys.path.append("../ei2c")
from ei2c import *
RAMSTART = 0x000
RAMEND = 0xFFF
if __name__ == "__main__":
ip = "cfvm-864-celma1" # raw_input("Crate IP? ")
user = "user" # raw_input("Username? ")
pwd = "USER" # raw_input("Password? ")
ip = raw_input("Crate IP or hostname? ")
user = raw_input("Username? ")
pwd = raw_input("Password? ")
# Wait for proper slot number
while 1:
try:
nrslots = raw_input("Number of slots: ")
nrslots = int(nrslots)
testelma = VBCP(ip, user, pwd)
testelma = EI2C(ip, user, pwd)
break
except KeyboardInterrupt:
sys.exit()
......@@ -116,7 +116,7 @@ if __name__ == "__main__":
print "%s: starting test" % time.strftime("%Y-%m-%d-%Hh%Mm%Ss", time.localtime())
f.write("------------------------------------------------------------\r\n")
# Open VBCP connection
# Open I2C connection
testelma.open()
# Init counters
......@@ -140,7 +140,7 @@ if __name__ == "__main__":
try:
testelma.write(i, addr, wval)
except VBCPException as e:
except EI2CException as e:
f.write("wex %i / %s / %s\r\n" % (i, time.strftime("%Y-%m-%d-%Hh%Mm%Ss",time.localtime()), e.strerror))
wexcep_cnt += 1
......@@ -156,7 +156,7 @@ if __name__ == "__main__":
# br = 1
# break
except VBCPException as e:
except EI2CException as e:
f.write("rex %i / %s / %s\r\n" % (i, time.strftime("%Y-%m-%d-%Hh%Mm%Ss",time.localtime()), e.strerror))
rexcep_cnt += 1
......@@ -177,7 +177,7 @@ if __name__ == "__main__":
# # Try a write to CONV-TTL-BLO, exception if unsuccessful
# try:
# testelma.write(i, addr, wval)
# except VBCPException as e:
# except EI2CException as e:
# f.write("wex %i / %s / %s\r\n" % (i, time.strftime("%Y-%m-%d-%Hh%Mm%Ss",time.localtime()), e.strerror))
# wexcep_cnt += 1
## br = 1
......@@ -195,7 +195,7 @@ if __name__ == "__main__":
## br = 1
## break
#
# except VBCPException as e:
# except EI2CException as e:
# f.write("rex %i / %s / %s\r\n" % (i, time.strftime("%Y-%m-%d-%Hh%Mm%Ss",time.localtime()), e.strerror))
# rexcep_cnt += 1
## br = 1
......@@ -207,7 +207,7 @@ if __name__ == "__main__":
# Compute run time
run_time = time.time() - start_time
# Close VBCP connection and print final values
# Close I2C connection and print final values
testelma.close()
f.write("------------------------------------------------------------\r\n")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment