Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AIDA-2020 TLU
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
AIDA-2020 TLU
Commits
8c233286
Commit
8c233286
authored
Oct 26, 2015
by
David Cussans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor optimizations - now only one call to hw.dispatch in loop
parent
3ce313c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
startTLU_v4.py
firmware/scripts/startTLU_v4.py
+6
-7
No files found.
firmware/scripts/startTLU_v4.py
View file @
8c233286
...
...
@@ -22,7 +22,7 @@ listenForTelescopeShutter = False
#TriggerInterval = 400000 # Units = 160MHz clock ticks.
#loopWait = 1.0 # polling interval ( seconds )
TriggerInterval
=
16000
# Units = 160MHz clock ticks.
loopWait
=
0.
1
# polling interval ( seconds )
loopWait
=
0.
05
# polling interval ( seconds )
pulseDelay
=
0
# between 0 and 31 in units of 160MHz clock.
pulseStretch
=
4
# between 0 and 31 in units of 160MHz clock.
DUTMask
=
1
# bit mask to indicate with DUT are active
...
...
@@ -52,6 +52,11 @@ eventFifoFillLevel = 0
while
True
:
nEvents
=
int
(
eventFifoFillLevel
)
//
4
# only read out whole events ( 4 x 32-bit words )
wordsToRead
=
nEvents
*
4
# get timestamp data and fifo fill in same outgoing packet.
timestampData
=
hw
.
getNode
(
"eventBuffer.EventFifoData"
)
.
readBlock
(
wordsToRead
)
eventFifoFillLevel
=
hw
.
getNode
(
"eventBuffer.EventFifoFillLevel"
)
.
read
()
preVetotriggerCount
=
hw
.
getNode
(
"triggerLogic.PreVetoTriggersR"
)
.
read
()
postVetotriggerCount
=
hw
.
getNode
(
"triggerLogic.PostVetoTriggersR"
)
.
read
()
...
...
@@ -71,12 +76,6 @@ while True:
print
"Current timestamp High,Low (hex) = "
,
hex
(
timestampHigh
)
,
hex
(
timestampLow
)
print
"FIFO fill level = "
,
eventFifoFillLevel
nEvents
=
int
(
eventFifoFillLevel
)
//
4
# only read out whole events ( 4 x 32-bit words )
wordsToRead
=
nEvents
*
4
# get timestamp data and fifo fill in same outgoing packet.
timestampData
=
hw
.
getNode
(
"eventBuffer.EventFifoData"
)
.
readBlock
(
wordsToRead
)
eventFifoFillLevel
=
hw
.
getNode
(
"eventBuffer.EventFifoFillLevel"
)
.
read
()
hw
.
dispatch
()
print
"number of events in FIFO = "
,
nEvents
# print timestampData
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment