From 7dd44f12e0791d9733d8fdaa8771e3fe2d80171f Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Mon, 14 Aug 2023 15:38:25 +0200 Subject: [PATCH] Do not set a breakpoint at current time, as this may lead to trigger a "breakpoint in the past" message and stop the simulation, depending on double precision details during comparison. --- src/spicelib/analysis/cktsetbk.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/spicelib/analysis/cktsetbk.c b/src/spicelib/analysis/cktsetbk.c index 659abcdf5..86f2cd764 100644 --- a/src/spicelib/analysis/cktsetbk.c +++ b/src/spicelib/analysis/cktsetbk.c @@ -27,6 +27,13 @@ CKTsetBreak(CKTcircuit *ckt, double time) printf("[t:%e] \t want breakpoint for t = %e\n", ckt->CKTtime, time); #endif + if (AlmostEqualUlps(time, ckt->CKTtime, 3)) { +#ifdef TRACE_BREAKPOINT // #if (1) + fprintf(stderr, "Warning: Setting a new breakpoint at %e is ignored,\n as current time is %e\n", time, ckt->CKTtime); +#endif + return (OK); + } + if(ckt->CKTtime > time) { SPfrontEnd->IFerrorf (ERR_PANIC, "breakpoint in the past - HELP!"); return(E_INTERN);