Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 2cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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
FMC DEL 1ns 2cha
Commits
b89fca81
Commit
b89fca81
authored
Nov 03, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when no bunches are provided, stay in high/low according to polarity
parent
b081afdf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
3 deletions
+11
-3
FFPG_CLI.py
sw/FFPG_CLI.py
+4
-3
Ffpg.py
sw/Ffpg.py
+7
-0
No files found.
sw/FFPG_CLI.py
View file @
b89fca81
...
...
@@ -2,7 +2,6 @@
# coding: utf8
# TODO:
# - when no bunches are provided, stay in high/low according to polarity
# - fixed sub-bunch period, just check (warning) against "real" input frequency
# - relax bunch boundary check, fix continuous pulses (25 ns puls in two subsequent bunches) -> constraint to the help
...
...
@@ -24,9 +23,9 @@ def myFloat(s):
print
(
"FFPG command line interface"
)
print
(
""
)
if
len
(
sys
.
argv
)
is
not
4
and
len
(
sys
.
argv
)
<
8
:
if
len
(
sys
.
argv
)
is
not
4
and
len
(
sys
.
argv
)
<
7
:
print
"Usage:"
print
" "
+
sys
.
argv
[
0
]
+
" <fmcSlot (LUN)> <channel> <polarity> <pulseWidth> <pulseDelay> <triggerLatency>
<bunches>
"
print
" "
+
sys
.
argv
[
0
]
+
" <fmcSlot (LUN)> <channel> <polarity> <pulseWidth> <pulseDelay> <triggerLatency>
[<bunches>]
"
print
" Sets and starts selected channel on selected FMC mezzanine"
print
" or"
print
" "
+
sys
.
argv
[
0
]
+
" <fmcSlot (LUN)> <channel> stop"
...
...
@@ -39,6 +38,8 @@ if len(sys.argv) is not 4 and len(sys.argv) < 8:
print
" <pulseDelay> - non-negative float number in [ns]"
print
" <triggerLatency> - non-negative float number in [ns], or -1 (calibration disabled)"
print
" <bunches> - space separated list of bunch numbers, each 0-3563"
print
" If no bunches are provided, no pulses will be generated, but generator will run."
print
" Output will be in non-active state according to the <polarity>."
print
""
sys
.
exit
()
...
...
sw/Ffpg.py
View file @
b89fca81
...
...
@@ -393,6 +393,13 @@ class Ffpg(object):
# configure pulse positions
for
bunch
in
bunches
:
self
.
_ConfigurePulse
(
channel
,
(
bunch
*
rfToBunchRatio
)
+
pulseStartBit
,
(
bunch
*
rfToBunchRatio
)
+
pulseStopBit
,
1
)
# if there are no bunches configured, just maintain the right output level
if
len
(
bunches
)
==
0
:
if
polarity
==
1
:
self
.
_ConfigurePulse
(
channel
,
0
,
0
,
1
,
2
)
# only one reset bit
else
:
self
.
_ConfigurePulse
(
channel
,
0
,
0
,
1
,
1
)
# only one set bit
def
SetClockFineDelay
(
self
,
fineDelay
,
current
=
0
,
capacitors
=
0
):
"""
...
...
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