fixed a possible Bug in PulseBlaster
WAIT opcode is ignored if preceeding state is shorter than 120ns.
This commit is contained in:
parent
974be4ec82
commit
64fb1ed1fe
@ -173,18 +173,27 @@ void SpinCorePulseBlaster::run_pulse_program_w_sync(state& exp, double sync_freq
|
|||||||
prog->push_front(c);
|
prog->push_front(c);
|
||||||
|
|
||||||
// first command: wait for monoflop on P136 up again
|
// first command: wait for monoflop on P136 up again
|
||||||
|
// the monoflop will open if ADC sample clock goes through zero voltage
|
||||||
|
// this synchronizes the start of the pulse program with the sampling clock
|
||||||
c=prog->create_command();
|
c=prog->create_command();
|
||||||
c->ttls=sync_mask;
|
c->ttls=sync_mask;
|
||||||
c->instruction=SpinCorePulseBlaster::WAIT;
|
c->instruction=SpinCorePulseBlaster::WAIT;
|
||||||
c->length=shortest_pulse;
|
c->length=shortest_pulse;
|
||||||
prog->push_front(c);
|
prog->push_front(c);
|
||||||
|
|
||||||
if (0) {
|
|
||||||
// zeroth command: set sync mask in advance, sometimes necessary
|
|
||||||
|
if (1) {
|
||||||
|
|
||||||
|
// zeroth command: pulse before WAIT opcode needs to be at least 120ns
|
||||||
|
// otherwise the WAIT is ignored and the program keeps repeating until pb_stop()
|
||||||
|
// reported to SpinCore (Contact Request 2016-12-19 at 1482143561)
|
||||||
|
// markusro: When is this necessary? (TODO)
|
||||||
c=prog->create_command();
|
c=prog->create_command();
|
||||||
c->ttls=sync_mask;
|
c->ttls=sync_mask;
|
||||||
c->instruction=SpinCorePulseBlaster::CONTINUE;
|
c->instruction=SpinCorePulseBlaster::CONTINUE;
|
||||||
c->length=shortest_pulse+2;
|
//c->length=shortest_pulse+2; // markusro: why +2 ??
|
||||||
|
c->length=12; // markusro: why +2 ??
|
||||||
prog->push_front(c);
|
prog->push_front(c);
|
||||||
}
|
}
|
||||||
duration+=2.0*shortest_pulse/clock+1.0/sync_freq;
|
duration+=2.0*shortest_pulse/clock+1.0/sync_freq;
|
||||||
|
Loading…
Reference in New Issue
Block a user