Is there an easy way to generate a spectre netlist in subcircuit form from a schematic or av_extracted cellview? In the past I've done things like call virtuoso with a replay file that has something like:
envSetVal("asimenv.startup" "projectDir" 'string "my_netlist_directory")
simulator('spectre)
design("myLib" "myCell" "myView")
createNetlit(?recreateAll t)
this has been most useful, but of course this gives me the netlist of myCell as the top of the netlist. I have a need to create subcircuits, i.e.
subckt myCell p1 p2 p2 ...
// netlist contents
ends myCell
as opposed to just the netlist contents. It would be nice if any CDF parameters ended up in the header properly.
I could do this by creating a new schematic and instantiating myCell into it and then netlisting this wrapper schematic and then using awk/perl/python/whatever to pull out what is between the subckt/ends lines (inclusive) but that requires either manual intervention (creating the wrapper schematic) or at least a writable library which I may or may not have.
Think custom cells -> subckt -> liberate for characterization for one reason this could be needed.
Any suggestions?
Thanks
-Dan