Skip to content

Commit f9ecf99

Browse files
committed
[seq] Remove support for DDS reset in cmdlist
This is not really used and we might remove the support on the server side
1 parent 216d3ff commit f9ecf99

3 files changed

Lines changed: 4 additions & 48 deletions

File tree

lib/nacs-seq/zynq/cmdlist.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,6 @@ class Writer {
246246
addInst(typename Inst::DDSDetPhase{OpCode::DDSDetPhase, chn, det_phase});
247247
}
248248

249-
void addDDSReset(uint8_t chn)
250-
{
251-
addInst(typename Inst::DDSReset{OpCode::DDSReset, chn});
252-
}
253-
254249
void addDAC(uint8_t chn, uint16_t amp)
255250
{
256251
addInst(typename Inst::DAC{OpCode::DAC, chn, amp});
@@ -322,9 +317,6 @@ struct Parser : ParserBase {
322317
writer.addDDSPhase(res.first, res.second.second);
323318
}
324319
}
325-
else if (nres.first == "reset") {
326-
writer.addDDSReset(read_ddschn("reset"));
327-
}
328320
else if (nres.first == "dac") {
329321
auto res = read_daccmd();
330322
writer.addDAC(res.first, res.second);

lib/nacs-seq/zynq/cmdlist.h

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ enum OpCode : uint8_t {
5656
DDSAmp = 5,
5757
DDSPhase = 6,
5858
DDSDetPhase = 7,
59-
DDSReset = 8,
59+
// DDSReset = 8,
6060
DAC = 9,
6161
};
6262

@@ -72,7 +72,7 @@ namespace InstDefs {
7272
* DDS Amp: [#5: 8][chn: 8][amp: 16] (4 bytes)
7373
* DDS Phase: [#6: 8][chn: 8][phase: 16] (4 bytes)
7474
* DDS Det Phase: [#7: 8][chn: 8][det_phase: 16] (4 bytes)
75-
* DDS Reset: [#8: 8][chn: 8] (2 bytes)
75+
* // DDS Reset: [#8: 8][chn: 8] (2 bytes)
7676
* DAC: [#9: 8][chn: 8][val: 16] (4 bytes)
7777
*
7878
* Old command formats:
@@ -150,12 +150,6 @@ struct NACS_PACKED DDSDetPhase {
150150
};
151151
static_assert(sizeof(DDSDetPhase) == 4, "");
152152

153-
struct NACS_PACKED DDSReset {
154-
OpCode op; // 8
155-
uint8_t chn;
156-
};
157-
static_assert(sizeof(DDSReset) == 2, "");
158-
159153
struct NACS_PACKED DAC {
160154
OpCode op; // 9
161155
uint8_t chn;
@@ -174,14 +168,13 @@ struct Inst_v1 {
174168
using DDSAmp = InstDefs::DDSAmp;
175169
using DDSPhase = InstDefs::DDSPhase;
176170
using DDSDetPhase = InstDefs::DDSDetPhase;
177-
using DDSReset = InstDefs::DDSReset;
178171
using DAC = InstDefs::DAC;
179172
static constexpr uint8_t version = 1;
180173
static constexpr uint8_t cmd_size[10] = {
181174
sizeof(TTLAll), sizeof(TTL1), // TTL
182175
sizeof(Wait), sizeof(Clock), // wait, clock
183176
sizeof(DDSFreq), sizeof(DDSAmp), sizeof(DDSPhase),
184-
sizeof(DDSDetPhase), sizeof(DDSReset), // DDS
177+
sizeof(DDSDetPhase), 0, // DDS
185178
sizeof(DAC), // DAC
186179
};
187180
};
@@ -195,14 +188,13 @@ struct Inst_v3 {
195188
using DDSAmp = InstDefs::DDSAmp;
196189
using DDSPhase = InstDefs::DDSPhase;
197190
using DDSDetPhase = InstDefs::DDSDetPhase;
198-
using DDSReset = InstDefs::DDSReset;
199191
using DAC = InstDefs::DAC;
200192
static constexpr uint8_t version = 3;
201193
static constexpr uint8_t cmd_size[10] = {
202194
sizeof(TTLAll), sizeof(TTL1), // TTL
203195
sizeof(Wait), sizeof(Clock), // wait, clock
204196
sizeof(DDSFreq), sizeof(DDSAmp), sizeof(DDSPhase),
205-
sizeof(DDSDetPhase), sizeof(DDSReset), // DDS
197+
sizeof(DDSDetPhase), 0, // DDS
206198
sizeof(DAC), // DAC
207199
};
208200
};
@@ -282,10 +274,6 @@ struct ExeState {
282274
*
283275
* Generate a DDS det phase pulse. Should take `PulseTime::DDSPhase` cycles.
284276
*
285-
* * `dds_reset(uint8_t chn)`:
286-
*
287-
* Generate a DDS reset pulse. Should take `PulseTime::DDSReset` cycles.
288-
*
289277
* * `dac(uint8_t chn, uint16_t V)`:
290278
*
291279
* Generate a DAC pulse. Should take `PulseTime::DAC` cycles.
@@ -397,11 +385,6 @@ void ExeState::_run(T &&cb, const uint8_t *code, size_t code_len)
397385
cb.dds_detphase(inst.chn, inst.det_phase);
398386
break;
399387
}
400-
case OpCode::DDSReset: {
401-
auto inst = Mem::load_unalign<typename Inst::DDSReset>(p);
402-
cb.dds_reset(inst.chn);
403-
break;
404-
}
405388
case OpCode::DAC: {
406389
auto inst = Mem::load_unalign<typename Inst::DAC>(p);
407390
cb.dac(inst.chn, inst.amp);

lib/nacs-seq/zynq/exehelper_p.h

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,6 @@ struct Printer {
104104
stm << "+=0x" << std::hex << detphase << std::dec << std::endl;
105105
}
106106
}
107-
void dds_reset(uint8_t chn)
108-
{
109-
stm << "reset(" << int(chn) << ")" << std::endl;
110-
}
111107
void dac(uint8_t chn, uint16_t V)
112108
{
113109
stm << "dac(" << int(chn) << ")=";
@@ -166,10 +162,6 @@ struct TimeKeeper {
166162
{
167163
total_t += PulseTime::DDSPhase;
168164
}
169-
void dds_reset(uint8_t)
170-
{
171-
total_t += PulseTime::DDSReset;
172-
}
173165
void dac(uint8_t, uint16_t)
174166
{
175167
total_t += PulseTime::DAC;
@@ -273,17 +265,6 @@ struct PulseCollector : TimeKeeper {
273265
return;
274266
TimeKeeper::dds_detphase(chn, phase);
275267
}
276-
void dds_reset(uint8_t chn)
277-
{
278-
if ((m_chntype == ChnType::Freq || m_chntype == ChnType::Amp ||
279-
m_chntype == ChnType::Phase) && chn_num == chn) {
280-
ts.push_back(total_t);
281-
vals.push_back(0);
282-
}
283-
if (!seq_started)
284-
return;
285-
TimeKeeper::dds_reset(chn);
286-
}
287268
void dac(uint8_t chn, uint16_t V)
288269
{
289270
if (m_chntype == ChnType::DAC && chn_num == chn) {

0 commit comments

Comments
 (0)