tolerance problem for resistor

I am trying to add tolerance but it makes klayout fail.
I have a deck with a resistor definition:

extract_devices(resistor("R_NR", 0.11), {"R" => resistor__R_NR, "C" => POLY1__conn})
same_device_classes("R_NR", "RES")`

This fails on match based on R value:

I now try to add tolerance section to make it match:

extract_devices(resistor("R_NR", 0.11), {"R" => resistor__R_NR, "C" => POLY1__conn})
same_device_classes("R_NR", "RES")
tolerance("R_NR", "R", :relative => 0.01)

But this fails to run in batch:

ERROR: In /home/verhaegs/eda/code/PDKMaster_TSMC_C018/klayout/share/klayout/TSMC_C018.lvs: The netlist has already been extracted in LayoutToNetlist::extract_devices
ERROR: The netlist has already been extracted in LayoutToNetlist::extract_devices in MacroInterpreter::execute
  /home/verhaegs/eda/code/PDKMaster_TSMC_C018/klayout/share/klayout/TSMC_C018.lvs:506:in 'execute_lvs'
  :/built-in-macros/lvs_interpreters.lym:18:in 'instance_eval'
  :/built-in-macros/lvs_interpreters.lym:18:in 'execute_lvs'
  :/built-in-macros/lvs_interpreters.lym:98:in 'execute'

I am using KLayout 0.26.11 on Mint 20 (Ubuntu 20 package).

Comments

  • I don't think that layout is the place for adding
    "tolerances". Layout is all ideal polygons and such.
    Tolerances come in during processing and arrive
    embedded in the components afterward. Model
    the geometry dependence of tolerances where
    it will do some good - like in simulator mismatch
    terms - and just pass the geometry info forward?

  • Hi Fatsie,
    I use the same syntax as yours, but it works fine for me... I use the beta-version 0.27 from : https://www.klayout.org/downloads/master/
    If it does not work, it is probably due to the "same_device_classes" syntax
    BRgds,
    Laurent

  • @tagger5896 Are you able to paste the full script? Something before "extract_devices" makes the netlist extracted already. You can also check for "netlist.something" calls before extract_devices.

    As a general rule, extract_devices needs to come before the netlist is made. Using "netlist" will make the netlist and only before that, devices can be derived.

    Matthias

  • Hmm ... @Matthias not sure you may got me confused on this thread :)

  • @tagger5896 Sorry, you're right :)

    @fatsie Are you able to paste the full script? Something before "extract_devices" makes the netlist extracted already. You can also check for "netlist.something" calls before extract_devices.

    As a general rule, extract_devices needs to come before the netlist is made. Using "netlist" will make the netlist and only before that, devices can be derived.

    Matthias

  • @Matthias
    No Worries, there was a similar thread elsewhere.

Sign In or Register to comment.