Esempio n. 1
0
                        )
                        inst = Instance(("%s" % master), param, None, ("I%d" % i))
                        inst.setOrigin( Point( x, y))

                        i += 1

                        if (i % 20):
                            x += 20
                        else:
                            x = 0
                            y += 20

        print("Total number of instances created:  %d" % i)
        self.save()



    # TEST is defined externally from this file.
    # For building the test cases, invoke like this:
    # cnpy -c "TEST='SMALL';execfile('Via.py')"
    if "TEST" in vars():
        if vars()["TEST"] == "SMALL":
            ViaTemplate.unitTest(lambda: ParamArray(), "MyPyCellLib", "UNITTEST_Via", "layout")
            DloGen.withNewDlo( smalltest, "MyPyCellLib", "SMALLTEST_Via", "layout")
        elif vars()["TEST"] == "BIG":
            DloGen.withNewDlo( bigtest, "MyPyCellLib", "BIGTEST_Via", "layout")
    else:
        DloGen.withNewDlo( smalltest, "MyPyCellLib", "SMALLTEST_Via", "layout")

# end
Esempio n. 2
0
                inst = PyTransistorUnitInstance("PyTransistor", param, None, ("I%d" % i))
                inst.setOrigin( Point( x, y))

                i += 1

                if (i % 20):
                    x += 10
                else:
                    x = 0
                    y += 10

        print("Total number of instances created:  %d" % i)
        self.save()



    # TEST is defined externally from this file.
    # For building the test cases, invoke like this:
    # cnpy -c "TEST='SMALL';execfile('transistorUnit.py')"
    if "TEST" in vars():
        if vars()["TEST"] == "SMALL":
            PyTransistorUnit.unitTest(lambda: ParamArray(), "MyPyCellLib", "UNITTEST_transistorUnit", "layout")
            DloGen.withNewDlo( smalltest, "MyPyCellLib", "SMALLTEST_transistorUnit", "layout")
        elif vars()["TEST"] == "BIG":
            DloGen.withNewDlo( bigtest, "MyPyCellLib", "BIGTEST_transistorUnit", "layout")
    else:
        DloGen.withNewDlo( smalltest, "MyPyCellLib", "SMALLTEST_transistorUnit", "layout")

# end