Skip to content

Commit

Permalink
Xic: netlist model and value when both given, for r,l,c devices only.
Browse files Browse the repository at this point in the history
  • Loading branch information
wrcad committed Jun 4, 2020
1 parent 11e467c commit 2b36fa2
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions xic/src/sced/sced_spiceout.cc
Original file line number Diff line number Diff line change
Expand Up @@ -680,19 +680,31 @@ SpOut::ckt_deck(CDs *sdesc, bool add_sc)
lstr.add(devref);
}

// Note that the model property supersedes the value property
// if both are present.
if (subname) {
lstr.add_c(' ');
lstr.add(subname);
}
if (model) {
else if (model) {
lstr.add_c(' ');
lstr.add(model);
}
if (value && !model) {
lstr.add_c(' ');
lstr.add(value);
if (value) {
if (!subname && !model) {
lstr.add_c(' ');
lstr.add(value);
}
else {
char k = *device;
if (isupper(k))
k = tolower(k);
if (k == 'r' || k == 'c' || k == 'l') {
lstr.add_c(' ');
lstr.add_c(k);
lstr.add_c('=');
lstr.add(value);
}
// Else model supersedes value, value ignored.
}
}
if (param) {
lstr.add_c(' ');
Expand Down

0 comments on commit 2b36fa2

Please sign in to comment.