{
bool flag_ignore_gold_x = false;
bool flag_make_outputs = false;
+ bool flag_make_outcmp = false;
bool flag_make_assert = false;
size_t argidx;
flag_make_outputs = true;
continue;
}
+ if (args[argidx] == "-make_outcmp") {
+ flag_make_outcmp = true;
+ continue;
+ }
if (args[argidx] == "-make_assert") {
flag_make_assert = true;
continue;
gold_cell->connections[w1->name] = w2_gold;
gate_cell->connections[w1->name] = w2_gate;
+ RTLIL::SigSpec this_condition;
+
if (flag_ignore_gold_x)
{
RTLIL::SigSpec gold_x = miter_module->new_wire(w2_gold->width, NEW_ID);
eq_cell->connections["\\A"] = gold_masked;
eq_cell->connections["\\B"] = gate_masked;
eq_cell->connections["\\Y"] = miter_module->new_wire(1, NEW_ID);
- all_conditions.append(eq_cell->connections["\\Y"]);
+ this_condition = eq_cell->connections["\\Y"];
miter_module->add(eq_cell);
}
else
eq_cell->connections["\\A"] = w2_gold;
eq_cell->connections["\\B"] = w2_gate;
eq_cell->connections["\\Y"] = miter_module->new_wire(1, NEW_ID);
- all_conditions.append(eq_cell->connections["\\Y"]);
+ this_condition = eq_cell->connections["\\Y"];
miter_module->add(eq_cell);
}
+
+ if (flag_make_outcmp)
+ {
+ RTLIL::Wire *w_cmp = new RTLIL::Wire;
+ w_cmp->name = "\\cmp_" + RTLIL::unescape_id(w1->name);
+ w_cmp->port_output = true;
+ miter_module->add(w_cmp);
+ miter_module->connections.push_back(RTLIL::SigSig(w_cmp, this_condition));
+ }
+
+ all_conditions.append(this_condition);
}
}
log(" also route the gold- and gate-outputs to 'gold_*' and 'gate_*' outputs\n");
log(" on the miter circuit.\n");
log("\n");
+ log(" -make_outcmp\n");
+ log(" also create a cmp_* output for each gold/gate output pair.\n");
+ log("\n");
log(" -make_assert\n");
log(" also create an 'assert' cell that checks if trigger is always low.\n");
log("\n");