Product Documentation
Virtuoso Layout Suite SKILL Reference
Product Version IC23.1, November 2023

lxRegMasterDiffName

lxRegMasterDiffName(
S_function
)
=> t / nil

Description

Registers a SKILL function that can return a name for the master difference reported by the Check Against Source command.

Argument

S_function

Name of the SKILL function to be registered.

The SKILL function must take the following two arguments and return a string.

  • master: Database cellview ID of the current layout instance master.
  • expected: String value representing the expected master in the format lib/cell/{view1 view2}.
    The master may have one or multiple views defined in CPH.

Value Returned

t

The SKILL function was registered.

nil

The SKILL function registration failed.

Example

lxRegMasterDiffName('testMasterDiffName)

Where the SKILL function testMasterDiffName is defined as:

procedure(testMasterDiffName1(master expected)
    let((_mbbox _cv _tok _lib _cell _view _views (_name "")
         cH nH cW nW _nbbox)
       
        _tok = parseString(expected "/")
        _lib = car(_tok)
        _cell = cadr(_tok)
        _views = caddr(_tok)
        _view = substring(_views 2 (strlen(_views) - 2))
        _tok = parseString(_view " ")
        _view = car(_tok)
        _cv = dbOpenCellView(_lib _cell _view)
        when(_cv
            _mbbox = master~>bBox
            cH = testBoxDimY(_mbbox)
            cW = testBoxDimX(_mbbox)
            _nbbox = _cv~>bBox
            nH = testBoxDimY(_nbbox)
            nW = testBoxDimX(_nbbox)
            cond(
                (nH > cH && nW > cW 
                   _name = "Taller and wider"
                )
                (nH < cH && nW < cW
                   _name = "Shorter and thiner"
                )
                (testEqualBasic(nH cH) && nW > cW 
                   _name = "Wider"
                )
                (testEqualBasic(nH cH) && nW < cW 
                   _name = "Thinner"
                )
                (nH > cH && testEqualBasic(cW nW)
                   _name = "Taller"
                )
                (nH < cH && testEqualBasic(cW nW)
                   _name = "Shorter"
                )
            )
            dbClose(_cv)
        )
        _name
    )
)

Return to top
 ⠀
X