Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Count the device size of SPICE netlist

Status
Not open for further replies.

khoaitay

Newbie
Joined
Jun 24, 2018
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
37
Hi everyone,

I have a large SPICE netlist.
I want to count all of the device size of the types of MOSFET in spice netlist. Does anyone know there are the tool or method to do it?
Example result I expect:
PMOS_LV 5000 (devices) total width 10000uM
PMOS_HV 1000 total with 2000um.
...

Have any tool/script to do it?

Thanks
 

I'd consider pulling it into Excel (import data from text)
and then you could sort by type, do math or whatever.
Regular syntax should make import easy.
 

Hi Dick_freebird,

I dont understand your idea. If I pulling a spice netlist into excel; I can not count anything. It is a large spice netlist with hierarchy structure.
 

Excel has an extensive set of built-in table search, count, control, and even string manipulation functions; In addition, if you want to take advantage of much more advanced features, you can also work with VBA Macros from within Excel environment, but for the above issue, you do not need something too sophisticated. So, answering your question: Is there any tool? Yes, Excel; Is there any script? No, you need to code it by your own. The good news is that it is somewhat simple, and there are a lot of documentation and tutorials on the Web about its usage.
 
If the netlist is hierarchical then you might have more work
to do, but you may find that there are options to produce a
flat netlist (check LVS prep stuff, where I have seen such).
 

If the netlist is hierarchical then you might have more work
to do, but you may find that there are options to produce a
flat netlist (check LVS prep stuff, where I have seen such).

Yes, thank admin and dick_freebird.
I know if we have the flatten netlist, it is very easy to count the device size. We only get the flatten netlist when we done the layout. If we have only hierarchical schematic, I think we need write a script to do this.
Summary:
1. Case 1: we have schematic+ layout --> we can get the flatten netlist (in LVS step, PEX extract (I tested))
2. Case 2: we have only hierarchical schematic --> need write a script to this work.

Thanks.
 

A script may relieve some manual work but you could slog
through it. Scripts are often not worth it, the first time
around (when you throw in false starts and debug) but
are a good idea if this is going to be a recurring activity.

I might suggest that if this is indeed of value, it may be
valuable enough that you can get it assigned to be
Somebody Else's Problem (like someone in the CAD /
modeling group maybe, who does scripts for a living.

We once tasked one of the CAD people to sort of do
the opposite (grinding the netlist to merge separate
but same-connected, same-params MOSFETs into a
single m= instance, in the interest of simulation speed
and convergence-probability). Maybe see if you can
"sell the story" to your boss and him/her, to the CAD
manager.

But by the time that all happens I'd bet you could do it
"the hard way" at least once.
 
one option is to write a script in awk/sed using regular expressions and count it.
 

Thank you all for your idea.
This work will help to early estimate power, area... of your design.
I think I need to do it myself.

Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top