It looks like you're new here. If you want to get involved, click one of these buttons!
Hi Matthias,
I using the following from an example posted, below
the code extracts the net as expected ie:VDD.
But if I short out the net to say "LB" in the example "Ringo" cell
the code throws the following error.
Arguments of reference or direct type cannot be passed nil in LayoutToNetlist::shapes_of_net in MacroInterpreter::execute
C:/Users/12144/KLayout/drc/new_folder/extract_nets.lydrc:102:in `shapes_of_net'
C:/Users/12144/KLayout/drc/new_folder/extract_nets.lydrc:102:in `block in execute_drc'
C:/Users/12144/KLayout/drc/new_folder/extract_nets.lydrc:101:in `each'
C:/Users/12144/KLayout/drc/new_folder/extract_nets.lydrc:101:in `execute_drc'
:/built-in-macros/drc_interpreters.lym:18:in `instance_eval'
:/built-in-macros/drc_interpreters.lym:18:in `execute_drc'
:/built-in-macros/drc_interpreters.lym:65:in `execute'
# Gets the Circuit object for the top level cell
top_circuit = l2n_data.netlist.circuit_by_name(source.layout.top_cell.name)
# Finds the Net object for the "VDD" net
net = top_circuit.net_by_name(value)
# outputs the shapes for this net to layers 1000 (ntie), 1001 (ptie), 1002 (nwell)
# etc ...
{ 2010 => ntie, 2011 => ptie, 2012 => nwell, 2013 => nsd, 2014 => psd,
2015 => contact, 2016 => poly, 2017 => metal1, 2018 => via, 2019 => metal2 }.each do |n,l|
DRC::DRCLayer::new(self, l2n_data.shapes_of_net(net, l.data, true)).output(n, 0)
Regards
Tracy
Comments
Hi Tracy,
I took the liberty to edit your text so it becomes more readable. This forum supports Markdown, so please use it properly.
Regarding your problem: I assume that "net" is nil. Maybe because "value" is a string which is not a valid net name. Could you check this?
Kind regards,
Matthias