Browse Source
Statistics patch: added netlist loading and parsing time in acct command.
Statistics patch: added netlist loading and parsing time in acct command.
16 changed files with 382 additions and 7 deletions
-
2src/frontend/Makefile.am
-
24src/frontend/commands.c
-
177src/frontend/device.c
-
4src/frontend/device.h
-
22src/frontend/inp.c
-
52src/frontend/inventory.c
-
3src/frontend/mw_coms.c
-
30src/frontend/resource.c
-
1src/include/Makefile.am
-
3src/include/ftedefs.h
-
7src/include/fteext.h
-
25src/include/fteoptdefs.h
-
12src/include/optdefs.h
-
9src/spicelib/devices/cktcrte.c
-
6src/spicelib/devices/cktinit.c
-
12visualc/vngspice.vcproj
@ -0,0 +1,52 @@ |
|||||
|
/********** |
||||
|
Copyright 2010 Paolo Nenzi. All rights reserved. |
||||
|
Author: 2010 Paolo Nenzi |
||||
|
**********/ |
||||
|
|
||||
|
#include "ngspice.h" |
||||
|
#include "cktdefs.h" |
||||
|
#include "cpdefs.h" |
||||
|
#include "ftedefs.h" |
||||
|
#include "optdefs.h" |
||||
|
#include "dvec.h" |
||||
|
#include "ftehelp.h" |
||||
|
#include "hlpdefs.h" |
||||
|
|
||||
|
#include "circuits.h" |
||||
|
#include "where.h" |
||||
|
|
||||
|
/* |
||||
|
The inventory command shows the number of instances for each device |
||||
|
in the current circuit. |
||||
|
*/ |
||||
|
|
||||
|
void |
||||
|
com_inventory(wordlist *wl) |
||||
|
{ |
||||
|
CKTcircuit *circuit = NULL; |
||||
|
STATistics *stat = NULL; |
||||
|
STATdevList *devList = NULL; |
||||
|
int k; |
||||
|
|
||||
|
NG_IGNORE(wl); |
||||
|
|
||||
|
if (!ft_curckt) { |
||||
|
fprintf(cp_err, "There is no current circuit\n"); |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
circuit = ft_curckt->ci_ckt; |
||||
|
stat = circuit->CKTstat; |
||||
|
devList = stat->STATdevNum; |
||||
|
|
||||
|
out_init(); |
||||
|
out_send("Circuit Inventory\n\n"); |
||||
|
for (k = 0; k < ft_sim->numDevices; k++) { |
||||
|
if (ft_sim->devices[k]) |
||||
|
out_printf("%s: %d\n", |
||||
|
ft_sim->devices[k]->name, |
||||
|
devList[k].instNum); |
||||
|
} |
||||
|
out_send("\n"); |
||||
|
return; |
||||
|
} |
||||
@ -0,0 +1,25 @@ |
|||||
|
/********** |
||||
|
Author: 2010 Paolo Nenzi |
||||
|
**********/ |
||||
|
|
||||
|
#ifndef FTEOPT |
||||
|
#define FTEOPT |
||||
|
|
||||
|
/* Structure used to describe the frontend statistics to be collected */ |
||||
|
/* This is similar to the STATististics in optdefs.h but collects */ |
||||
|
/* statistics pertaining to ngspice frontend */ |
||||
|
|
||||
|
typedef struct sFTESTATistics { |
||||
|
|
||||
|
int FTESTATdeckNumLines; /* number of lines in spice deck */ |
||||
|
|
||||
|
double FTESTATnetLoadTime; /* total time required to load the spice deck */ |
||||
|
double FTESTATnetParseTime; /* total time required to parse the netlist */ |
||||
|
} FTESTATistics; |
||||
|
|
||||
|
|
||||
|
#define FTEOPT_NLDECK 1 |
||||
|
#define FTEOPT_NLT 2 |
||||
|
#define FTEOPT_NPT 3 |
||||
|
|
||||
|
#endif /*FTEOPT*/ |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue