Skip to content

Commit

Permalink
extra fet string also used by ext2sp; plot contacts
Browse files Browse the repository at this point in the history
  • Loading branch information
rmanohar committed Sep 6, 2021
1 parent 1d4f835 commit 060b91d
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 1 deletion.
23 changes: 23 additions & 0 deletions tech/techgen.cc
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,15 @@ void emit_plowing (pp_t *pp)
pp_SPACE;
}

void emit_plot_map (pp_t *pp, Contact *c)
{
if (!c) return;

pp_printf (pp, "map %s %s %s", c->getName(),
c->getLowerName(), c->getUpperName());
pp_nl;
}

void emit_plot (pp_t *pp)
{
pp_printf (pp, "plot"); pp_TAB;
Expand All @@ -963,6 +972,20 @@ void emit_plot (pp_t *pp)
pp_printf (pp, "draw %s", Technology::T->diff[j][i]->getName());
pp_nl;
}
pp_nl;

emit_plot_map (pp, Technology::T->poly->getUpC());

for (int i=0; i < Technology::T->nmetals-1; i++) {
emit_plot_map (pp, Technology::T->metal[i]->getUpC());
}

for (int i=0; i < Technology::T->num_devs; i++) {
for (int j=0; j < 2; j++) {
emit_plot_map (pp, Technology::T->diff[j][i]->getUpC());
}
}

pp_UNTAB;
pp_UNTAB;
pp_printf (pp, "end");
Expand Down
13 changes: 12 additions & 1 deletion transform/ext2sp/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,7 @@ void ext2spice (const char *name, struct ext_file *E, int toplevel)
int l;
struct Hashtable *N;
int devcount = 1;
const char *extra_fet_string;

b = hash_lookup (seen, name);
if (b) {
Expand All @@ -528,6 +529,13 @@ void ext2spice (const char *name, struct ext_file *E, int toplevel)
N = hash_new (32);
b->v = N;

if (config_exists ("net.extra_fet_string")) {
extra_fet_string = config_get_string ("net.extra_fet_string");
}
else {
extra_fet_string = NULL;
}

for (struct ext_list *lst = E->subcells; lst; lst = lst->next) {
int xl, xh, yl, yh;
ext2spice (lst->file, lst->ext, 0);
Expand Down Expand Up @@ -667,6 +675,10 @@ void ext2spice (const char *name, struct ext_file *E, int toplevel)
print_number (stdout, tdrain->perim[fl->type]*scale);
tdrain->area[fl->type] = 0;
tdrain->perim[fl->type] = 0;

if (extra_fet_string) {
printf (" %s", extra_fet_string);
}
printf ("\n");
}
}
Expand Down Expand Up @@ -728,7 +740,6 @@ void ext2spice (const char *name, struct ext_file *E, int toplevel)
}
}


if (!toplevel) {
printf (".ends\n");
}
Expand Down

0 comments on commit 060b91d

Please sign in to comment.