トップセルの情報を表示

開いているファイルの全トップセルについて名前・保持しているレイヤ・セルサイズを出力するスクリプトです。

こちらからダウンロード (print_topcell_info.py)

スクリプト

# Get the list of files and iterate through each file
file_list = pynebv.file.list()
for file in file_list :
    print("Input file : " + file.file_path)

    # Iterate through all descendants in the file
    for top_cell in file.descendants():
        if not isinstance(top_cell, pynebv.TopCell):
            continue

        # Output the top cell name, layer numbers, and cell area size
        print("MAIN   " + top_cell.name)
        layers = [str(layer.name.replace(" ", "").replace("L", "")) for layer in top_cell.layers()]
        print("LAYNO  " + ", ".join(layers))
        print("SIZE   " + ", ".join(map(str, top_cell.area)))

使用方法

$ nebv --python-file /path/to/script.py /path/to/chip_file

実行結果

出力ファイル

なし

コンソール

Input file : /path/to/chip_file
MAIN   <Top Cell 1>
LAYNO  <layno>,<layno>...
SIZE   <x1,y1,x2,y2>
MAIN   <Top Cell 2>
LAYNO  <layno>,<layno>...
SIZE   <x1,y1,x2,y2>
最終更新 18.08.2026