Designers want a voltage probe that can be instantiated on a schematic. The voltage probe translates to a .probe statement in hspice netlists or a save netname statement in a spectre netlist.
Here are my questions
1.Do I need to use a formInitProc to get the attached netname or a callback procedure?
2. In the formInitProc or Callback proc, how do I get the value of the netname attached to the terminal?
Here are the code fragments below.
;; netlist procedure to print save netname line in spectre netlist
;; procedure( sgSpectreVprobe(inst) let((fp net_name enable complete_line cv) fp=nlGetNetlister(inst);; Get value from instance net_name = nlGetParamStringValue(inst 'net_name) ;cv = nlGetCurrentCellView(inst) ;l_nets = nlGetSimTerminalNets(cv) ;this_net=car(l_nets) enable = nlGetParamStringValue(inst 'enable) complete_line = strcat("save net_name") nlPrintString(fp) nlPrintString(fp complete_line) ); let);procedure
############# CDF pararmeter
cdfCreateParam( cdfId ?name "net_name" ?prompt "net_name" ?defValue "net_name" ?type "string" )
I took a different approach and created a 'voltage bsource' device that could be instantiated in a schematic. A designer can then set the 'v' parameter value to the anything, including simple v(path.to.internal.net) or differential signal expressions. Then you assign a top-level net name to the bsource output and save as you see fit.
I created a one-liner model file include to 'save all top-level signals' that designers can quickly enable:
save * depth=1
Not precisely what you're looking for, but may be useful if you can't get the vprobe working.