Browse Source

Revise check for '.probe alli' and event nodes:

Bail out, don't run any sim, don't change variable
'auto_bridge'.
pre-master-46
Holger Vogt 1 year ago
parent
commit
660b183ad0
  1. 2
      src/frontend/inpcom.c
  2. 13
      src/xspice/evt/evtcheck_nodes.c

2
src/frontend/inpcom.c

@ -8697,9 +8697,7 @@ static void inp_check_syntax(struct card *deck)
for (card = deck; card; card = card->nextcard) { for (card = deck; card; card = card->nextcard) {
char* cut_line = card->line; char* cut_line = card->line;
if (ciprefix(".probe", cut_line) && search_plain_identifier(cut_line, "alli")) { if (ciprefix(".probe", cut_line) && search_plain_identifier(cut_line, "alli")) {
int i = 0;
bool bi = TRUE; bool bi = TRUE;
cp_vset("auto_bridge", CP_NUM, &i);
cp_vset("probe_alli_given", CP_BOOL, &bi); cp_vset("probe_alli_given", CP_BOOL, &bi);
break; break;
} }

13
src/xspice/evt/evtcheck_nodes.c

@ -700,6 +700,14 @@ bool Evtcheck_nodes(
* an event node. Failure is fatal. * an event node. Failure is fatal.
*/ */
if (ckt->evt->info.node_list && cp_getvar("probe_alli_given", CP_BOOL, NULL, 0)) {
fprintf(stderr,
"\nError: Dot command '.probe alli' and "
"digital nodes are not compatible.\n");
fprintf(stderr, " Simulation will fail!\n\n");
controlled_exit(EXIT_FAILURE);
}
for (event_node = ckt->evt->info.node_list; for (event_node = ckt->evt->info.node_list;
event_node; event_node;
event_node = event_node->next) { event_node = event_node->next) {
@ -707,13 +715,8 @@ bool Evtcheck_nodes(
analog_node; analog_node;
analog_node = analog_node->next) { analog_node = analog_node->next) {
int nl; int nl;
if (strcmp(event_node->name, analog_node->name) == 0) { if (strcmp(event_node->name, analog_node->name) == 0) {
if (show == AB_OFF) { if (show == AB_OFF) {
if (cp_getvar("probe_alli_given", CP_BOOL, NULL, 0))
fprintf(stderr,
"\nDot command '.probe alli' and "
"digital nodes are not compatible.\n");
FREE(errMsg); FREE(errMsg);
errMsg = tprintf("Auto bridging is switched off " errMsg = tprintf("Auto bridging is switched off "
"but node %s is mixed-type.\n", "but node %s is mixed-type.\n",

Loading…
Cancel
Save