跳至内容
virtuoso加电源

virtuoso加电源

virtuoso加电源

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
procedure( LOL_Run_Wire_Stub_Fix( libName )
    let( (lib cv mPt pt stubPt line netName)
        lib = ddGetObj( libName )
        if( lib then
            printf( "--- Processing Library: %s ---\n" libName )
            foreach( cell lib~>cells
                ; Try to open schematic
                cv = dbOpenCellViewByType( libName cell~>name "schematic" "" "a" )
                
                when( cv
                    printf( "  > Fixing: %s\n" cell~>name )
                    
                    foreach( inst cv~>instances
                        foreach( iTerm inst~>instTerms
                            ; Filter for vdd or gnd pins
                            when( member( iTerm~>name '("vdd" "gnd") )
                                foreach( pin iTerm~>term~>pins
                                    foreach( fig pin~>figs
                                        ; 1. Calculate Coordinate
                                        mPt = centerBox( fig~>bBox )
                                        pt = dbTransformPoint( mPt inst~>transform )
                                        
                                        ; 2. Define Direction
                                        if( iTerm~>name == "vdd" then
                                            netName = "vdd!"
                                            stubPt = list( car(pt) cadr(pt)+0.15 )
                                        else
                                            netName = "gnd!"
                                            stubPt = list( car(pt) cadr(pt)-0.15 )
                                        )
                                        
                                        ; 3. Draw Wire Stub (Layer: wire drawing)
                                        line = dbCreateLine( cv list("wire" "drawing") list(pt stubPt) )
                                        
                                        ; 4. Add Label to Wire
                                        when( line
                                            schCreateWireLabel( cv line stubPt netName "centerCenter" "R0" "stick" 0.05 nil )
                                        )
                                    )
                                )
                            )
                        )
                    )
                    
                    ; Finalize
                    schCheck( cv )
                    dbSave( cv )
                    dbClose( cv )
                )
            )
            printf( "--- SUCCESS: All schematics updated ---\n" )
        else
            printf( "ERROR: Library %s not found!\n" libName )
        )
    )
)

1
load( "/root/Desktop/fix_final.il" )

1
LOL_Run_Wire_Stub_Fix( "freepdk45_cellsBARK" )