Skip analog probes in logic-only output formats.
This commit is contained in:
parent
05c644ea08
commit
3699a8a1ff
|
@ -108,6 +108,8 @@ static int init(struct sr_output *o)
|
|||
/* Get the unitsize. */
|
||||
for (l = o->sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
ctx->num_enabled_probes++;
|
||||
|
|
14
output/csv.c
14
output/csv.c
|
@ -76,8 +76,11 @@ static int init(struct sr_output *o)
|
|||
/* Get the number of probes, and the unitsize. */
|
||||
for (l = o->sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->enabled)
|
||||
ctx->num_enabled_probes++;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
ctx->num_enabled_probes++;
|
||||
}
|
||||
|
||||
ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
|
||||
|
@ -107,8 +110,11 @@ static int init(struct sr_output *o)
|
|||
ctx->num_enabled_probes, num_probes);
|
||||
for (l = o->sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->enabled)
|
||||
g_string_append_printf(ctx->header, "%s, ", probe->name);
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
g_string_append_printf(ctx->header, "%s, ", probe->name);
|
||||
}
|
||||
g_string_append_printf(ctx->header, "\n");
|
||||
|
||||
|
|
|
@ -80,8 +80,11 @@ static int init(struct sr_output *o)
|
|||
ctx->num_enabled_probes = 0;
|
||||
for (l = o->sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->enabled)
|
||||
ctx->num_enabled_probes++;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
ctx->num_enabled_probes++;
|
||||
}
|
||||
ctx->unitsize = (ctx->num_enabled_probes + 7) / 8;
|
||||
|
||||
|
@ -106,6 +109,8 @@ static int init(struct sr_output *o)
|
|||
wbuf[0] = '\0';
|
||||
for (i = 0, l = o->sdi->probes; l; l = l->next, i++) {
|
||||
probe = l->data;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
c = (char *)&wbuf + strlen((const char *)&wbuf);
|
||||
|
|
|
@ -71,8 +71,11 @@ static GString *gen_header(const struct sr_dev_inst *sdi, struct context *ctx)
|
|||
num_enabled_probes = 0;
|
||||
for (l = sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->enabled)
|
||||
num_enabled_probes++;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
num_enabled_probes++;
|
||||
}
|
||||
|
||||
s = g_string_sized_new(512);
|
||||
|
|
|
@ -92,6 +92,8 @@ SR_PRIV int init(struct sr_output *o, int default_spl, enum outputmode mode)
|
|||
|
||||
for (l = o->sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
ctx->probenames = g_slist_append(ctx->probenames, probe->name);
|
||||
|
|
|
@ -62,6 +62,8 @@ static int init(struct sr_output *o)
|
|||
|
||||
for (l = o->sdi->probes; l; l = l->next) {
|
||||
probe = l->data;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
ctx->probeindices = g_array_append_val(
|
||||
|
@ -124,6 +126,8 @@ static int init(struct sr_output *o)
|
|||
/* Wires / channels */
|
||||
for (i = 0, l = o->sdi->probes; l; l = l->next, i++) {
|
||||
probe = l->data;
|
||||
if (probe->type != SR_PROBE_LOGIC)
|
||||
continue;
|
||||
if (!probe->enabled)
|
||||
continue;
|
||||
g_string_append_printf(ctx->header, "$var wire 1 %c %s $end\n",
|
||||
|
|
Loading…
Reference in New Issue