From df5ebfa0a0fc6d060caaa21b74a2f1a7b4ba0f86 Mon Sep 17 00:00:00 2001 From: Clifford Wolf Date: Thu, 30 Jun 2016 09:58:13 +0200 Subject: [PATCH] Improved ice40_ffinit error reporting --- techlibs/ice40/ice40_ffinit.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/techlibs/ice40/ice40_ffinit.cc b/techlibs/ice40/ice40_ffinit.cc index db2100381..8a2c30d6a 100644 --- a/techlibs/ice40/ice40_ffinit.cc +++ b/techlibs/ice40/ice40_ffinit.cc @@ -57,6 +57,7 @@ struct Ice40FfinitPass : public Pass { SigMap sigmap(module); pool init_wires; dict initbits; + dict initbit_to_wire; pool handled_initbits; for (auto wire : module->selected_wires()) @@ -78,11 +79,14 @@ struct Ice40FfinitPass : public Pass { if (initbits.count(bit)) { if (initbits.at(bit) != val) - log_error("Conflicting init values for signal %s.\n", log_signal(bit)); + log_error("Conflicting init values for signal %s (%s = %s, %s = %s).\n", + log_signal(bit), log_signal(SigBit(wire, i)), log_signal(val), + log_signal(initbit_to_wire[bit]), log_signal(initbits.at(bit))); continue; } initbits[bit] = val; + initbit_to_wire[bit] = SigBit(wire, i); } } -- 2.30.2