4

私は回路図のネットリスト(サブサーキットのコレクション)を持っています。一般に、いくつかの SPICE シミュレーターによって作成されます。通常、階層があります(トップレベルのサブサーキットは、さまざまなサブサーキットを呼び出すかインスタンス化し、ピンを介してそれらの間の接続を定義します)。サンプル ネットリストは次のようになります。

subckt AN2D0 A1 A2 VDD VSS Z

    M_u2 (net5 A2 VDD VDD) pch 
    M_u1 (net5 A1 VDD VDD) pch 
    M_u3 (Z net5 VDD VDD) pch 
    M_u4 (net17 A2 VSS VSS) nch 
    M_u2 (Z net5 VSS VSS) nch 

ends AN2D0

subckt LS_RX_CONTROLLER VDD VSS burst_start_or_sys burst_start_out pd pd_pwm_det pd_pwm_det_TII std_by std_by_or_sys sys_en sys_out

    I2 (burst_start_or_sys std_by VDD VSS burst_start_out) AN2D2
    I1 (net22 std_by_bar VDD VSS sys_out) AN2D2
    I5 (net022 pd VDD VSS pd_pwm_det) OR2D2
    I10 (net026 pd VDD VSS std_by_or_sys) NR2D2
    I9 (sys_en std_by VDD VSS net026) NR2D0
    I6 (std_by VDD VSS std_by_bar) INVD0
    I3 (pd_pwm_det_TII net037 VDD VSS net022) OR2D0
    I11 (sys_en std_by VDD VSS net037) OR2D0
    I0 (burst_start_or_sys sys_en VDD VSS net22) AN2D0

ends LS_RX_CONTROLLER

これで、異なる階層で同じサブサーキットをインスタンス化できます。呼び出されるすべてのサブサーキットは、呼び出しサブサーキットの前に定義されます。この種のグラフは有向非巡回グラフと呼ばれます。スペースを節約するために、ネットリストから自己参照 HASH テーブルを作成しました。サブサーキットがサブサーキットのインスタンスを呼び出している場合、それはピンを指しています。最後の階層では、MOSFET D または S または G または B ノードを取得します (AN2D0 サブ回路が定義されているため)。いずれかのネット (インスタンスのピンへの接続) が階層 (net5 などのサブサーキットの呼び出しのみ) からサブサーキットを呼び出す親に持ち出される場合、それはピン (Z など) と呼ばれ、現在のサブサーキット定義行に常にリストされます。その名前で(subckt AN2D0 A1 A2 VDD VSS Z)。ハッシュのハッシュのハッシュを作成しました。

GRAPH --> subckt1--->p1
                     p2
                     net1
                     net2
          subckt2--->p1
                     p2
                     net1
                     net2
          subckt3--->p1 ---->I1.subckt1.p1--->pointing to value of p1 key of subckt1.
                             I2.subckt1.p2
                     p2
                     net1
                     net2

現在のケースでは、GRAPH は次のようになります。

the name of subcircuit-->AN2D0

     name of pin or net-->Z
         name of instant connected to it-->M_u2.nch.D
         name of instant connected to it-->M_u3.pch.D
     name of pin or net-->VDD
         name of instant connected to it-->M_u1.pch.S
         name of instant connected to it-->M_u1.pch.B
         name of instant connected to it-->M_u2.pch.S
         name of instant connected to it-->M_u3.pch.S
         name of instant connected to it-->M_u2.pch.B
         name of instant connected to it-->M_u3.pch.B
     name of pin or net-->A1
         name of instant connected to it-->M_u3.nch.G
         name of instant connected to it-->M_u1.pch.G
     name of pin or net-->VSS
         name of instant connected to it-->M_u2.nch.S
         name of instant connected to it-->M_u4.nch.B
         name of instant connected to it-->M_u2.nch.B
         name of instant connected to it-->M_u3.nch.B
         name of instant connected to it-->M_u4.nch.S
     name of pin or net-->net5
         name of instant connected to it-->M_u3.nch.D
         name of instant connected to it-->M_u3.pch.G
         name of instant connected to it-->M_u1.pch.D
         name of instant connected to it-->M_u2.pch.D
         name of instant connected to it-->M_u2.nch.G
     name of pin or net-->A2
         name of instant connected to it-->M_u4.nch.G
         name of instant connected to it-->M_u2.pch.G
     name of pin or net-->net17
         name of instant connected to it-->M_u3.nch.S
         name of instant connected to it-->M_u4.nch.D

the name of subcircuit-->LS_RX_CONTROLLER

     name of pin or net-->burst_start_or_sys
         name of instant connected to it-->I2.AN2D2.A1
            M_u3.nch.G
            M_u1.pch.G
         name of instant connected to it-->I0.AN2D0.A1
            M_u3.nch.G
            M_u1.pch.G
     name of pin or net-->burst_start_out
         name of instant connected to it-->I2.AN2D2.Z
            M_u2.nch.D
            M_u3.pch.D
     name of pin or net-->net037
         name of instant connected to it-->I11.OR2D0.Z
            M_u2.nch.D
            M_u3.pch.D
         name of instant connected to it-->I3.OR2D0.A2
            M_u3.nch.G
            M_u1.pch.G
     name of pin or net-->net026
         name of instant connected to it-->I10.NR2D2.A1
            M_u4.nch.G
            M_u2.pch.G
         name of instant connected to it-->I9.NR2D0.ZN
            M_u3.nch.D
            M_u2.pch.D
            M_u4.nch.D
     name of pin or net-->std_by
         name of instant connected to it-->I9.NR2D0.A2
            M_u3.nch.G
            M_u1.pch.G
         name of instant connected to it-->I6.INVD0.I
            M_u3.pch.G
            M_u2.nch.G
         name of instant connected to it-->I2.AN2D2.A2
            M_u4.nch.G
            M_u2.pch.G
         name of instant connected to it-->I11.OR2D0.A2
            M_u3.nch.G
            M_u1.pch.G
     name of pin or net-->sys_en
         name of instant connected to it-->I11.OR2D0.A1
            M_u4.nch.G
            M_u2.pch.G
         name of instant connected to it-->I0.AN2D0.A2
            M_u4.nch.G
            M_u2.pch.G
         name of instant connected to it-->I9.NR2D0.A1
            M_u4.nch.G
            M_u2.pch.G
     name of pin or net-->VDD
         name of instant connected to it-->I2.AN2D2.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u2.pch.S
            M_u3.pch.S
            M_u2.pch.B
            M_u3.pch.B
         name of instant connected to it-->I10.NR2D2.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u2.pch.B
         name of instant connected to it-->I0.AN2D0.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u2.pch.S
            M_u3.pch.S
            M_u2.pch.B
            M_u3.pch.B
         name of instant connected to it-->I6.INVD0.VDD
            M_u3.pch.S
            M_u3.pch.B
         name of instant connected to it-->I9.NR2D0.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u2.pch.B
         name of instant connected to it-->I1.AN2D2.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u2.pch.S
            M_u3.pch.S
            M_u2.pch.B
            M_u3.pch.B
         name of instant connected to it-->I11.OR2D0.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u3.pch.S
            M_u2.pch.B
            M_u3.pch.B
         name of instant connected to it-->I3.OR2D0.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u3.pch.S
            M_u2.pch.B
            M_u3.pch.B
         name of instant connected to it-->I5.OR2D2.VDD
            M_u1.pch.S
            M_u1.pch.B
            M_u3.pch.S
            M_u2.pch.B
            M_u3.pch.B
     name of pin or net-->sys_out
         name of instant connected to it-->I1.AN2D2.Z
            M_u2.nch.D
            M_u3.pch.D
     name of pin or net-->net022
         name of instant connected to it-->I3.OR2D0.Z
            M_u2.nch.D
            M_u3.pch.D
         name of instant connected to it-->I5.OR2D2.A1
            M_u4.nch.G
            M_u2.pch.G
     name of pin or net-->pd_pwm_det_TII
         name of instant connected to it-->I3.OR2D0.A1
            M_u4.nch.G
            M_u2.pch.G
     name of pin or net-->std_by_or_sys
         name of instant connected to it-->I10.NR2D2.ZN
            M_u3.nch.D
            M_u2.pch.D
            M_u4.nch.D
     name of pin or net-->net22
         name of instant connected to it-->I0.AN2D0.Z
            M_u2.nch.D
            M_u3.pch.D
         name of instant connected to it-->I1.AN2D2.A1
            M_u3.nch.G
            M_u1.pch.G
     name of pin or net-->pd
         name of instant connected to it-->I10.NR2D2.A2
            M_u3.nch.G
            M_u1.pch.G
         name of instant connected to it-->I5.OR2D2.A2
            M_u3.nch.G
            M_u1.pch.G
     name of pin or net-->std_by_bar
         name of instant connected to it-->I6.INVD0.ZN
            M_u2.nch.D
            M_u3.pch.D
         name of instant connected to it-->I1.AN2D2.A2
            M_u4.nch.G
            M_u2.pch.G
     name of pin or net-->VSS
         name of instant connected to it-->I11.OR2D0.VSS
            M_u3.nch.S
            M_u2.nch.S
            M_u4.nch.B
            M_u2.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I5.OR2D2.VSS
            M_u3.nch.S
            M_u4.nch.B
            M_u2.nch.S
            M_u2.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I3.OR2D0.VSS
            M_u3.nch.S
            M_u2.nch.S
            M_u4.nch.B
            M_u2.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I6.INVD0.VSS
            M_u2.nch.S
            M_u2.nch.B
         name of instant connected to it-->I0.AN2D0.VSS
            M_u2.nch.S
            M_u4.nch.B
            M_u2.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I2.AN2D2.VSS
            M_u2.nch.S
            M_u4.nch.B
            M_u2.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I1.AN2D2.VSS
            M_u2.nch.S
            M_u4.nch.B
            M_u2.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I9.NR2D0.VSS
            M_u3.nch.S
            M_u4.nch.B
            M_u3.nch.B
            M_u4.nch.S
         name of instant connected to it-->I10.NR2D2.VSS
            M_u3.nch.S
            M_u4.nch.B
            M_u3.nch.B
            M_u4.nch.S
     name of pin or net-->pd_pwm_det
         name of instant connected to it-->I5.OR2D2.Z
            M_u2.nch.D
            M_u3.pch.D

この後、任意のレベル階層からインスタンス化できるサブサーキット名と同じピンが与えられ、親を見つける必要があります。つまり、ネットがピンとしてプルアップされるまで親をトレースバックします。そして、すべてのリーフ (MOSFET D または G または S または B ピン) にストレスを与えます。

これに最適なアルゴリズムの種類と、それらを自己参照ハッシュテーブルに格納することが効率的かどうかを提案してください。

4

1 に答える 1

1

私の経験では、インデックス作成プロセスを使用してグラフ内のノードの一意の ID を生成し、次にキーがこの ID であるフラット ハッシュを作成することをお勧めします。IDを使用してリンクを作成します。例えば:

a => b、b => c、c => d、d => a

に変換します

%graph = ( a => { content => ..., linksto => [ b ] }, b => { content => ..., linksto => [ c ] }, c => { content => ..., linksto => [ d ] }, d => { content => ..., linksto => [ a ] } );

于 2012-01-26T20:32:32.097 に答える