Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leaner way for LVS parameter compare tolerances #471

klayoutmatthias opened this issue Jan 7, 2020 · 0 comments

Leaner way for LVS parameter compare tolerances #471

klayoutmatthias opened this issue Jan 7, 2020 · 0 comments


Copy link

@klayoutmatthias klayoutmatthias commented Jan 7, 2020

The current way is somewhat clumsy: For the tolerance you can specify a tolerance this way (put these statements right before compare):

    # specifies an absolute tolerance of 0.02 (µm) for the L parameter of "P250_1V8" devices:
    netlist.device_class_by_name("P250_1V8").equal_parameters = RBA::EqualDeviceParameters::new(RBA::DeviceClassMOS4Transistor::PARAM_L, 0.02, 0.0)

For a resistor that would be (assuming "RES" is the device name) for a 100 Ohm tolerance:

    netlist.device_class_by_name("RES").equal_parameters = RBA::EqualDeviceParameters::new(RBA::DeviceClassResistor::PARAM_R, 100, 0.0)

The first argument to "RBA::EqualDeviceParameters::new" is the parameter ID, the second the absolute tolerance and the third is the relative tolerance (whichever is larger). So to give it a 1% tolerance for the resistance you can use:

    netlist.device_class_by_name("RES").equal_parameters = RBA::EqualDeviceParameters::new(RBA::DeviceClassResistor::PARAM_R, 0.0, 0.01)

If you want to specify a tolerance for two parameters, combine the tolerance specs with "+":

    netlist.device_class_by_name("P250_1V8").equal_parameters =
       RBA::EqualDeviceParameters::new(RBA::DeviceClassMOS4Transistor::PARAM_L, 0.02, 0.0) +
       RBA::EqualDeviceParameters::new(RBA::DeviceClassMOS4Transistor::PARAM_W, 0.01, 0.0)

which gives L a 20nm and W a 10nm tolerance.

Leaner notation

An imperative, leaner style was:

tolerance("P250_1V8", "L", 0.02)
tolerance("P250_1V8", "W", 0.01)
tolerance("RES", "R", :relative => 0.01, :absolute => 10)

with the general scheme:

tolerance(device_class_name, param_name, absolute_tolerance [, relative_tolerance ])
tolerance(device_class_name, param_name [, :absolute => absolute_tolerance] [, :relative => relative_tolerance])
klayoutmatthias added a commit that referenced this issue Feb 27, 2020
klayoutmatthias added a commit that referenced this issue Feb 27, 2020
Implemented #471 (leaner way to specify compare tolerances)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.