rtm12

Usage
usage: rtm12.py [-h] [--trg TRG] [--rtm12 RTM12] [--plot PLOT] [--trg_sync_out TRG_SYNC_OUT] [--trg_wait TRG_WAIT] uut

Positional Arguments

uut

uut

Named Arguments

--trg

trg start,b1,b2 soft|wrt=value

Default: soft,soft,soft

--rtm12

rtm12 b1_len, b2_len

Default: 33000,99000

--plot

plot channel results

--trg_sync_out

Output d1 trg to HDMI

Default: 1

--trg_wait

Wait for keypress before each trigger

Default: 0

Outline:

run an rtm12 shot, providing 3 triggers

The rtm12 feature allows a shot to be run as 2 bursts of different length This setup requires 3 triggers:

trigger start of capture trigger first burst trigger second burst

Then, because a TRANSIENT capture will almost always required a data flush,

further burst triggers until the capture stops

We show an example with either soft triggers or WR triggers (txi)

Sequence S0. Disable TRG out. S1. SetArm S1.5 WaitArm S2. Send Start trigger S3. Enable TRG out S4. Send BURST1_TRG S5. Wait State RUN S6. If BLEN1 > 1 DMA BUFFER: poll sample count until we have enough count.

If we only start looking at SAMPLE_COUNT after transition to ARM, then we don’t have to worry about the non-zero start.

S7. Send BURST2_TRG S8. Wait State IDLE (complete.

example:

# Trivial example soft,soft,soft
/rtm12.py --trg=soft,soft,soft --rtm12=25000,125000 acq1001_084

#WR example: soft,txi,txi
/rtm12.py --trg=soft,txi,txi --rtm12=25000,125000 acq1001_084

soft operates on TRG.d1, txi triggers WRTT1, so it operates on TRG.d1 also

# transcript: shows the 3 triggers being fired at earliest opportunity.

./user_apps/acq400/rtm12.py --trg=soft,txi,txi --rtm12=20000,500000 --plot=1 acq2106_274

Transcript:

sam@humla:~/PROJECTS/acq400_hapi$ ./user_apps/acq400/rtm12.py --trg=soft,soft,soft --rtm12=25000,125000 --plot=1 acq2106_007
Burst1 below minimum increasing to 1 buffer
0 soft
1 soft
2 soft
uut ['acq2106_007']
rtm12 [131072, 724288]
trg ['soft', 'soft', 'soft']
[trigger capture]
Sending trigger soft
[trigger burst1]
Sending trigger soft
waiting for burst1
waiting for burst1
[trigger burst2]
Sending trigger soft
trigger again to force flush
Sending trigger soft
[wait stopped]
Triggers script 4 uut SIG:TRG_MB:COUNT 4
plotting

sam@humla:~/PROJECTS/acq400_hapi$ SITECLIENT_TRACE=1 ./user_apps/acq400/rtm12.py --trg=soft,soft,soft --rtm12=25000,125000 --plot=1 acq2106_007
Siteclient(acq2106_007, 4220) >MODEL
Siteclient(acq2106_007, 4220) <acq2106
Siteclient(acq2106_007, 4220) >is_tiga
Siteclient(acq2106_007, 4220) <none
Siteclient(acq2106_007, 4220) >is_tiga
Siteclient(acq2106_007, 4220) <none
Siteclient(acq2106_007, 4220) >has_mgt
Siteclient(acq2106_007, 4220) <12 13
Siteclient(acq2106_007, 4220) >has_mgtdram
Siteclient(acq2106_007, 4220) <14
Siteclient(acq2106_007, 4220) >has_mgt
Siteclient(acq2106_007, 4220) <12 13
Siteclient(acq2106_007, 4220) >has_mgtdram
Siteclient(acq2106_007, 4220) <14
Siteclient(acq2106_007, 4220) >SITELIST
Siteclient(acq2106_007, 4220) <216,1=480,2=480
Siteclient(acq2106_007, 4221) >module_name
Siteclient(acq2106_007, 4222) >module_name
Siteclient(acq2106_007, 4222) <acq480fmc
Siteclient(acq2106_007, 4221) <acq480fmc
Siteclient(acq2106_007, 4220) >state
Siteclient(acq2106_007, 4220) <0 0 855360 1441792 0 647 0
Siteclient(acq2106_007, 4220) >has_mgt
Siteclient(acq2106_007, 4220) <12 13
Siteclient(acq2106_007, 4220) >bufferlen
Siteclient(acq2106_007, 4220) <4194304
Siteclient(acq2106_007, 4220) >ssb
Siteclient(acq2106_007, 4220) <32
Burst1 below minimum increasing to 1 buffer
Siteclient(acq2106_007, 4220) >SIG:TRG_MB:RESET=1
Siteclient(acq2106_007, 4220) <
0 soft
Siteclient(acq2106_007, 4221) >trg=1,1,1
Siteclient(acq2106_007, 4221) <
1 soft
Siteclient(acq2106_007, 4221) >rgm=3,1,1
Siteclient(acq2106_007, 4221) <
2 soft
uut ['acq2106_007']
rtm12 [131072, 724288]
trg ['soft', 'soft', 'soft']
Siteclient(acq2106_007, 4220) >SIG:SYNC_OUT:TRG=0
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4220) >transient=PRE=0 POST=855360 SOFT_TRIGGER=0
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4220) >rtm12=131072 724288
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <1579654
Siteclient(acq2106_007, 4220) >set_arm=1
Siteclient(acq2106_007, 4220) <
[trigger capture]
Sending trigger soft
Siteclient(acq2106_007, 4220) >SIG:SRC:TRG:1
Siteclient(acq2106_007, 4220) <SIG:SRC:TRG:1 STRIG
Siteclient(acq2106_007, 4220) >soft_trigger=1
Siteclient(acq2106_007, 4220) <
[trigger burst1]
Siteclient(acq2106_007, 4220) >SIG:SYNC_OUT:TRG=2
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4220) >SIG:SYNC_OUT:TRG:DX=1
Siteclient(acq2106_007, 4220) <
Sending trigger soft
Siteclient(acq2106_007, 4220) >SIG:SRC:TRG:1
Siteclient(acq2106_007, 4220) <SIG:SRC:TRG:1 STRIG
Siteclient(acq2106_007, 4220) >soft_trigger=1
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <0
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <0
waiting for burst1
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <131074
[trigger burst2]
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <131074
Sending trigger soft
Siteclient(acq2106_007, 4220) >SIG:SRC:TRG:1
Siteclient(acq2106_007, 4220) <SIG:SRC:TRG:1 STRIG
Siteclient(acq2106_007, 4220) >soft_trigger=1
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4220) >SIG:SYNC_OUT:TRG=0
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <855364
trigger again to force flush
Sending trigger soft
Siteclient(acq2106_007, 4220) >SIG:SRC:TRG:1
Siteclient(acq2106_007, 4220) <SIG:SRC:TRG:1 STRIG
Siteclient(acq2106_007, 4220) >soft_trigger=1
Siteclient(acq2106_007, 4220) <
Siteclient(acq2106_007, 4221) >sample_count
Siteclient(acq2106_007, 4221) <855364
[wait stopped]
Siteclient(acq2106_007, 4220) >SIG:TRG_MB:COUNT
Siteclient(acq2106_007, 4220) <SIG:TRG_MB:COUNT 4
Triggers script 4 uut SIG:TRG_MB:COUNT 4
plotting
Siteclient(acq2106_007, 4220) >data32
Siteclient(acq2106_007, 4220) <0
Siteclient(acq2106_007, 4220) >transient
Siteclient(acq2106_007, 4220) <PRE=0 POST=855360 OSAM=1 DEMUX=1 SOFT_TRIGGER=0
Siteclient(acq2106_007, 4220) >transient
Siteclient(acq2106_007, 4220) <PRE=0 POST=855360 OSAM=1 DEMUX=1 SOFT_TRIGGER=0
Siteclient(acq2106_007, 4221) >ch_data_size
Siteclient(acq2106_007, 4221) <1710720
class BurstHelper[source]

Bases: object

__init__(uut, bursts)[source]
class TriggerHelper[source]

Bases: object

__init__(uut, triggers, args)[source]
select_sig_src_trg_1(source)[source]
trigger(trg_def, delay=2)[source]
next_trg()[source]
enable_trig_out()[source]
disable_trig_out()[source]
print_totals()[source]
state_eq(uut, state)[source]
state_not(uut, state)[source]
run_main(args)[source]
list_of_values(arg)[source]
get_parser()[source]