From 1b39561f429129311d4a754759d1cd348e07065c Mon Sep 17 00:00:00 2001 From: hneemann Date: Thu, 20 Jul 2017 20:26:37 +0200 Subject: [PATCH] better error messages in power supply --- src/main/dig/74xx/decimalCounter.dig | 4 ---- src/main/dig/74xx/hexCounter.dig | 22 ++++++++----------- .../neemann/digital/core/io/PowerSupply.java | 4 ++-- 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/main/dig/74xx/decimalCounter.dig b/src/main/dig/74xx/decimalCounter.dig index 562a7987c..81a0e0f15 100644 --- a/src/main/dig/74xx/decimalCounter.dig +++ b/src/main/dig/74xx/decimalCounter.dig @@ -6,10 +6,6 @@ Description 12-bit BCD counter - - lockedMode - true - diff --git a/src/main/dig/74xx/hexCounter.dig b/src/main/dig/74xx/hexCounter.dig index 67250581f..14890987e 100644 --- a/src/main/dig/74xx/hexCounter.dig +++ b/src/main/dig/74xx/hexCounter.dig @@ -6,10 +6,6 @@ Description 12-bit hex counter - - lockedMode - true - @@ -219,11 +215,6 @@ repeat(2<<12) C bits(4,(n+1)>>8) bits(4,(n+1)>>4) bits(4,(n+1) - - VDD - - - Ground @@ -239,6 +230,11 @@ repeat(2<<12) C bits(4,(n+1)>>8) bits(4,(n+1)>>4) bits(4,(n+1) + + VDD + + + @@ -561,14 +557,14 @@ repeat(2<<12) C bits(4,(n+1)>>8) bits(4,(n+1)>>4) bits(4,(n+1) - - - - + + + + diff --git a/src/main/java/de/neemann/digital/core/io/PowerSupply.java b/src/main/java/de/neemann/digital/core/io/PowerSupply.java index f12a17f64..338732072 100644 --- a/src/main/java/de/neemann/digital/core/io/PowerSupply.java +++ b/src/main/java/de/neemann/digital/core/io/PowerSupply.java @@ -49,9 +49,9 @@ public class PowerSupply extends Node implements Element { @Override public void readInputs() throws NodeException { if (vcc.getValue() != 1 || vcc.isHighZ()) - throw new NodeException(Lang.get("err_errorInPowerSupply", "VCC"), vcc); + throw new NodeException(Lang.get("err_errorInPowerSupply", "VCC"), this, 0, vcc.asList()); if (gnd.getValue() != 0 || gnd.isHighZ()) - throw new NodeException(Lang.get("err_errorInPowerSupply", "GND"), gnd); + throw new NodeException(Lang.get("err_errorInPowerSupply", "GND"), this, 1, gnd.asList()); } @Override