librelane 3.1.0.dev6__tar.gz → 3.1.0.dev8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/PKG-INFO +10 -6
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/__main__.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/__init__.py +1 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/metrics/__init__.py +1 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/metrics/__main__.py +3 -3
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/metrics/library.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/misc.py +4 -4
- librelane-3.1.0.dev8/librelane/common/tcl.py +138 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/__init__.py +1 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/config.py +7 -18
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/pdk_compat.py +6 -15
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/variable.py +6 -4
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/container.py +0 -37
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/__init__.py +1 -0
- librelane-3.1.0.dev8/librelane/flows/basic.py +16 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/builtins.py +1 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/chip.py +1 -12
- librelane-3.1.0.dev8/librelane/pdk_hashes.yaml +4 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/base.sdc +31 -25
- librelane-3.1.0.dev8/librelane/scripts/klayout/Readme.md +18 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/klayout/insert_cell.py +9 -5
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/klayout/open_design.py +17 -8
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/klayout/render.py +26 -9
- librelane-3.1.0.dev8/librelane/scripts/klayout/smoke.py +16 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/klayout/stream_out.py +61 -23
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/klayout/xml_drc_report_to_json.py +15 -3
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/klayout/xor.drc +2 -0
- librelane-3.1.0.dev8/librelane/scripts/klayout/xor.py +145 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/def/mag_gds.tcl +4 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/apply_def_template.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/cell_frequency.py +3 -2
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/check_antenna_properties.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/contextualize.py +1 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/defutil.py +14 -19
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/diodes.py +1 -3
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/disconnected_pins.py +12 -13
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/eco_buffer.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/eco_diode.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/filter_unannotated.py +1 -2
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/io_place.py +6 -7
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/ioplace_parser/__init__.py +1 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/ioplace_parser/parse.py +8 -8
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/label_macro_pins.py +9 -15
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/lefutil.py +8 -12
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/placers.py +1 -2
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/power_utils.py +16 -17
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/random_place.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/remove_buffers.py +3 -4
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/io.tcl +10 -3
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/sta/corner.tcl +14 -14
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/pyosys/construct_abc_script.py +1 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/pyosys/json_header.py +5 -3
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/pyosys/synthesize.py +54 -53
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/state/__init__.py +1 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/__init__.py +2 -0
- librelane-3.1.0.dev6/librelane/steps/common_variables.py → librelane-3.1.0.dev8/librelane/steps/common.py +9 -1
- librelane-3.1.0.dev8/librelane/steps/gdsfill.py +75 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/klayout.py +260 -114
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/magic.py +9 -4
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/netgen.py +26 -47
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/odb.py +19 -19
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/openroad.py +97 -18
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/openroad_alerts.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/pyosys.py +103 -30
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/step.py +0 -1
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/tclstep.py +12 -44
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/pyproject.toml +34 -13
- librelane-3.1.0.dev6/librelane/common/tcl.py +0 -123
- librelane-3.1.0.dev6/librelane/pdk_hashes.yaml +0 -4
- librelane-3.1.0.dev6/librelane/scripts/klayout/Readme.md +0 -2
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/Readme.md +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/__init__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/__version__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/cli.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/drc.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/generic_dict.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/metrics/compare.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/metrics/metric.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/metrics/util.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/ring_buffer.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/toolbox.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/tpe.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/common/types.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/__main__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/flow.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/preprocessor.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/config/removals.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/env_info.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/hold_eco_demo/config.yaml +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/hold_eco_demo/demo.v +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm/config.yaml +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm/pin_order.cfg +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm/src/impl.sdc +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm/src/signoff.sdc +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm/src/spm.v +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm/verify/spm_tb.v +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/SPM_example.v +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/base_sdc_file.sdc +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/config-tut.json +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/config.json +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/defines.v +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/template.def +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/examples/spm-user_project_wrapper/user_project_wrapper.v +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/classic.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/cli.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/flow.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/misc.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/optimizing.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/sequential.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/flows/synth_explore.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/help/__main__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/logging/__init__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/logging/logger.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/plugins.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/py.typed +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/Readme.md +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/common/read.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/def/antenna_check.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/def/mag.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/drc.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/extract_spice.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/gds/drc_batch.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/gds/erase_box.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/gds/extras_mag.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/gds/mag_with_pointers.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/get_bbox.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/lef/extras_maglef.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/lef/maglef.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/lef.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/open.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/spice_rcx.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/magic/wrapper.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/netgen/setup.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/reader.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/snap_to_grid.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/odbpy/wire_lengths.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/antenna_check.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/antenna_repair.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/buffer_list.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/dpl.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/dpl_cell_pad.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/grt.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/pad_cfg.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/pdn_cfg.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/resizer.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/set_global_connections.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/set_layer_adjustments.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/set_power_nets.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/set_rc.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/common/set_routing_layers.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/cts.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/cut_rows.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/dpl.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/drt.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/dump_rc.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/fill.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/floorplan.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/gpl.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/grt.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/gui.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/insert_buffer.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/ioplacer.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/irdrop.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/pad.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/pdn.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/rcx.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/repair_design.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/repair_design_postgrt.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/rsz_timing_postcts.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/rsz_timing_postgrt.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/sta/check_macro_instances.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/tapcell.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/ungpl.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/write_cdl.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/openroad/write_views.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/pyosys/ys_common.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/scripts/tclsh/hello.tcl +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/state/__main__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/state/design_format.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/state/state.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/__main__.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/checker.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/misc.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/verilator.py +0 -0
- {librelane-3.1.0.dev6 → librelane-3.1.0.dev8}/librelane/steps/yosys.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: librelane
|
|
3
|
-
Version: 3.1.0.
|
|
3
|
+
Version: 3.1.0.dev8
|
|
4
4
|
Summary: An infrastructure for implementing chip design flows
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
Maintainer: Mohamed Gaber
|
|
@@ -13,15 +13,19 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
13
13
|
Classifier: Programming Language :: Python :: 3.13
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.14
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
-
|
|
16
|
+
Provides-Extra: tools
|
|
17
|
+
Requires-Dist: ciel (>=3.3.0,<4)
|
|
17
18
|
Requires-Dist: click (>=8,<8.4)
|
|
18
19
|
Requires-Dist: cloup (>=3.0.5,<4)
|
|
19
20
|
Requires-Dist: deprecated (>=1.2.10,<2)
|
|
20
|
-
Requires-Dist:
|
|
21
|
-
Requires-Dist: klayout (>=0.
|
|
22
|
-
Requires-Dist: lln-libparse (==0.
|
|
23
|
-
Requires-Dist:
|
|
21
|
+
Requires-Dist: httpx2 (>=2,<3)
|
|
22
|
+
Requires-Dist: klayout (>=0.30.12,<0.32.0) ; extra == "tools"
|
|
23
|
+
Requires-Dist: lln-libparse (==0.70.*)
|
|
24
|
+
Requires-Dist: lln-openroad (==26.4.*) ; extra == "tools"
|
|
25
|
+
Requires-Dist: lxml (>=6.0.0)
|
|
26
|
+
Requires-Dist: minitcl (==9.1.*)
|
|
24
27
|
Requires-Dist: psutil (>=5.9.0)
|
|
28
|
+
Requires-Dist: pyosys (==0.70.*) ; extra == "tools"
|
|
25
29
|
Requires-Dist: pyyaml (>=5,<7)
|
|
26
30
|
Requires-Dist: rapidfuzz (>=3.9.0,<4)
|
|
27
31
|
Requires-Dist: rich (>=12,<16)
|
|
@@ -30,6 +30,7 @@ Metrics Module
|
|
|
30
30
|
|
|
31
31
|
Classes and functions for dealing with Metrics based on the `METRICS2.1 <https://github.com/ieee-ceda-datc/datc-rdf-Metrics4ML>`_ standard.
|
|
32
32
|
"""
|
|
33
|
+
|
|
33
34
|
from . import library
|
|
34
35
|
from .metric import MetricAggregator, MetricComparisonResult, Metric
|
|
35
36
|
from .util import parse_metric_modifiers, aggregate_metrics, MetricDiff
|
|
@@ -27,7 +27,7 @@ from decimal import Decimal
|
|
|
27
27
|
from typing import Optional, Tuple
|
|
28
28
|
|
|
29
29
|
import cloup
|
|
30
|
-
import
|
|
30
|
+
import httpx2
|
|
31
31
|
|
|
32
32
|
from .util import MetricDiff, TableVerbosity
|
|
33
33
|
from .compare import compare_metric_directories, default_filter_set
|
|
@@ -210,7 +210,7 @@ def compare_remote(
|
|
|
210
210
|
result = session.get(
|
|
211
211
|
f"https://api.github.com/repos/{repo}/branches/{branch}"
|
|
212
212
|
)
|
|
213
|
-
except
|
|
213
|
+
except httpx2.HTTPStatusError as e:
|
|
214
214
|
if e.response is not None and e.response.status_code == 404:
|
|
215
215
|
print(f"'{branch}' branch of repo {repo} not found.", file=sys.stderr)
|
|
216
216
|
else:
|
|
@@ -264,7 +264,7 @@ def compare_remote(
|
|
|
264
264
|
if table_out is not None:
|
|
265
265
|
table_file = open(table_out, "w", encoding="utf8")
|
|
266
266
|
print(tables, file=table_file)
|
|
267
|
-
except
|
|
267
|
+
except httpx2.HTTPStatusError as e:
|
|
268
268
|
if e.response is not None and e.response.status_code == 404:
|
|
269
269
|
print(f"Metrics not found for commit: {commit}.", file=sys.stderr)
|
|
270
270
|
else:
|
|
@@ -39,7 +39,7 @@ from typing import (
|
|
|
39
39
|
Union,
|
|
40
40
|
)
|
|
41
41
|
|
|
42
|
-
import
|
|
42
|
+
import httpx2
|
|
43
43
|
from deprecated.sphinx import deprecated
|
|
44
44
|
|
|
45
45
|
from ..__version__ import __version__
|
|
@@ -407,7 +407,7 @@ def get_latest_file(in_path: Union[str, os.PathLike], filename: str) -> Optional
|
|
|
407
407
|
return latest_json
|
|
408
408
|
|
|
409
409
|
|
|
410
|
-
def get_httpx_session(token: Optional[str] = None) ->
|
|
410
|
+
def get_httpx_session(token: Optional[str] = None) -> httpx2.Client:
|
|
411
411
|
"""
|
|
412
412
|
Creates an ``httpx`` session client that follows redirects and has the
|
|
413
413
|
User-Agent header set to ``librelane/{__version__}``.
|
|
@@ -416,11 +416,11 @@ def get_httpx_session(token: Optional[str] = None) -> httpx.Client:
|
|
|
416
416
|
Authorization: Bearer {token}, is included.
|
|
417
417
|
:returns: The created client
|
|
418
418
|
"""
|
|
419
|
-
session =
|
|
419
|
+
session = httpx2.Client(follow_redirects=True)
|
|
420
420
|
headers_raw = {"User-Agent": f"librelane/{__version__}"}
|
|
421
421
|
if token is not None and token.strip() != "":
|
|
422
422
|
headers_raw["Authorization"] = f"Bearer {token}"
|
|
423
|
-
session.headers =
|
|
423
|
+
session.headers = httpx2.Headers(headers_raw)
|
|
424
424
|
return session
|
|
425
425
|
|
|
426
426
|
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Copyright 2025 LibreLane Contributors
|
|
2
|
+
#
|
|
3
|
+
# Adapted from OpenLane
|
|
4
|
+
#
|
|
5
|
+
# Copyright 2023 Efabless Corporation
|
|
6
|
+
#
|
|
7
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
8
|
+
# you may not use this file except in compliance with the License.
|
|
9
|
+
# You may obtain a copy of the License at
|
|
10
|
+
#
|
|
11
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
12
|
+
#
|
|
13
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
14
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
15
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
|
+
# See the License for the specific language governing permissions and
|
|
17
|
+
# limitations under the License.
|
|
18
|
+
import os
|
|
19
|
+
import re
|
|
20
|
+
from enum import Enum
|
|
21
|
+
from decimal import Decimal
|
|
22
|
+
from dataclasses import asdict, is_dataclass
|
|
23
|
+
from typing import Callable, Dict, Mapping, Any, Iterable, Union
|
|
24
|
+
|
|
25
|
+
from minitcl import Interpreter
|
|
26
|
+
|
|
27
|
+
from .types import is_string
|
|
28
|
+
|
|
29
|
+
_find_unsafe = re.compile(r"[^\w@%+=:,./-]", re.ASCII).search
|
|
30
|
+
_escapes_in_quotes = re.compile(r"([\\\$\"\[])")
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TclUtils(object):
|
|
34
|
+
"""
|
|
35
|
+
A collection of useful Tcl utilities.
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
def __init__(self):
|
|
39
|
+
raise TypeError(f"Cannot create instances of '{self.__class__.__name__}'")
|
|
40
|
+
|
|
41
|
+
@staticmethod
|
|
42
|
+
def escape(s: str) -> str:
|
|
43
|
+
"""
|
|
44
|
+
:returns: If the string can be parsed by Tcl as a single token, the string
|
|
45
|
+
is returned verbatim.
|
|
46
|
+
|
|
47
|
+
Otherwise, the string is returned in double quotes, with any unsafe
|
|
48
|
+
characters escaped with a backslash.
|
|
49
|
+
"""
|
|
50
|
+
if s == "":
|
|
51
|
+
return '""'
|
|
52
|
+
if not _find_unsafe(s):
|
|
53
|
+
return s
|
|
54
|
+
return '"' + _escapes_in_quotes.sub(r"\\\1", s).replace("\n", r"\n") + '"'
|
|
55
|
+
|
|
56
|
+
@staticmethod
|
|
57
|
+
def join(ss: Iterable[str]) -> str:
|
|
58
|
+
"""
|
|
59
|
+
:param ss: Input list
|
|
60
|
+
:returns: The input list converted to a Tcl-compatible list where each
|
|
61
|
+
element is either a single token or double-quoted (i.e. interpreted
|
|
62
|
+
by Tcl as a single element.)
|
|
63
|
+
"""
|
|
64
|
+
return " ".join(TclUtils.escape(arg) for arg in ss)
|
|
65
|
+
|
|
66
|
+
@staticmethod
|
|
67
|
+
def value_to_tcl(value: Any) -> str:
|
|
68
|
+
"""
|
|
69
|
+
Converts an arbitrary Python value to Tcl as follows:
|
|
70
|
+
|
|
71
|
+
* If the value is a dict, the keys and values are escaped recursively
|
|
72
|
+
using: :meth:`TclUtils.join`.
|
|
73
|
+
* If the value is an instance of a dataclass, it is treated as a dict.
|
|
74
|
+
* If the value is a list, it is joined using :meth:`TclUtils.join`.
|
|
75
|
+
* If the value is an Enum, its name is returned.
|
|
76
|
+
* If the value is Boolean, "1" is returned for True and "0" for False.
|
|
77
|
+
* If the value is numeric, it is converted to a string.
|
|
78
|
+
* Otherwise, the value is passed to ``str()``.
|
|
79
|
+
"""
|
|
80
|
+
if not isinstance(value, type) and is_dataclass(value):
|
|
81
|
+
return TclUtils.value_to_tcl(asdict(value))
|
|
82
|
+
elif isinstance(value, Mapping):
|
|
83
|
+
result = []
|
|
84
|
+
for v_key, v_value in value.items():
|
|
85
|
+
result.append(TclUtils.value_to_tcl(v_key))
|
|
86
|
+
result.append(TclUtils.value_to_tcl(v_value))
|
|
87
|
+
return TclUtils.join(result)
|
|
88
|
+
elif isinstance(value, Iterable) and not is_string(value):
|
|
89
|
+
result = []
|
|
90
|
+
for item in value:
|
|
91
|
+
result.append(TclUtils.value_to_tcl(item))
|
|
92
|
+
return TclUtils.join(result)
|
|
93
|
+
elif isinstance(value, Enum):
|
|
94
|
+
return value.name
|
|
95
|
+
elif isinstance(value, bool):
|
|
96
|
+
return "1" if value else "0"
|
|
97
|
+
elif isinstance(value, Decimal):
|
|
98
|
+
if value.to_integral_value() == value:
|
|
99
|
+
# ensure there's a .0 so it is not parsed as an int
|
|
100
|
+
return f"{value:.1f}"
|
|
101
|
+
return str(value)
|
|
102
|
+
elif isinstance(value, int):
|
|
103
|
+
return str(value)
|
|
104
|
+
else:
|
|
105
|
+
return str(value)
|
|
106
|
+
|
|
107
|
+
@staticmethod
|
|
108
|
+
def _eval_env_common(
|
|
109
|
+
env_in: Mapping[str, Any], do_eval: Callable
|
|
110
|
+
) -> Dict[str, str]:
|
|
111
|
+
interpreter = Interpreter()
|
|
112
|
+
|
|
113
|
+
interpreter.eval("array unset ::env")
|
|
114
|
+
for key, value in env_in.items():
|
|
115
|
+
if value is not None:
|
|
116
|
+
interpreter.set_var("env", key, TclUtils.value_to_tcl(value))
|
|
117
|
+
|
|
118
|
+
env_out = dict(env_in)
|
|
119
|
+
do_eval(interpreter)
|
|
120
|
+
interpreter.eval("set _env_dict [array get ::env]")
|
|
121
|
+
|
|
122
|
+
parsed = interpreter.parse_list(interpreter.get_var("_env_dict"))
|
|
123
|
+
env_out = {}
|
|
124
|
+
for i in range(len(parsed) // 2):
|
|
125
|
+
key = parsed[2 * i]
|
|
126
|
+
val = parsed[2 * i + 1]
|
|
127
|
+
env_out[key] = val
|
|
128
|
+
return env_out
|
|
129
|
+
|
|
130
|
+
@staticmethod
|
|
131
|
+
def _eval_env(env_in: Mapping[str, Any], tcl_in: str) -> Dict[str, Any]:
|
|
132
|
+
return TclUtils._eval_env_common(env_in, lambda i: i.eval(tcl_in))
|
|
133
|
+
|
|
134
|
+
@staticmethod
|
|
135
|
+
def _eval_env_file(
|
|
136
|
+
env_in: Mapping[str, Any], tcl_in: Union[str, os.PathLike]
|
|
137
|
+
) -> Dict[str, Any]:
|
|
138
|
+
return TclUtils._eval_env_common(env_in, lambda i: i.eval_file(tcl_in))
|
|
@@ -22,6 +22,7 @@ The Configuration Module
|
|
|
22
22
|
This modules includes various functions for importing and/or generating LibreLane
|
|
23
23
|
configuration objects. Configuration objects are the primary input to a flow.
|
|
24
24
|
"""
|
|
25
|
+
|
|
25
26
|
from .preprocessor import Keys
|
|
26
27
|
from .variable import Instance, Macro, Variable
|
|
27
28
|
from .config import (
|
|
@@ -832,7 +832,7 @@ class Config(GenericImmutableDict[str, Any]):
|
|
|
832
832
|
def __get_pdk_raw(
|
|
833
833
|
pdk_root: str, pdk: str, scl: Optional[str], pad: Optional[str]
|
|
834
834
|
) -> Tuple[GenericImmutableDict[str, Any], str, str, Optional[str]]:
|
|
835
|
-
|
|
835
|
+
seed_config: GenericDict[str, Any] = GenericDict(
|
|
836
836
|
{
|
|
837
837
|
SpecialKeys.pdk_root: pdk_root,
|
|
838
838
|
SpecialKeys.pdk: pdk,
|
|
@@ -840,15 +840,15 @@ class Config(GenericImmutableDict[str, Any]):
|
|
|
840
840
|
)
|
|
841
841
|
|
|
842
842
|
if scl is not None:
|
|
843
|
-
|
|
843
|
+
seed_config[SpecialKeys.scl] = scl
|
|
844
844
|
|
|
845
845
|
# HACK: Prevent loading default SCL cfg vars for old openlane PDK
|
|
846
846
|
# configs
|
|
847
847
|
# For more info: https://github.com/librelane/librelane/issues/932
|
|
848
|
-
|
|
848
|
+
seed_config["STD_CELL_LIBRARY_OPT"] = scl
|
|
849
849
|
|
|
850
850
|
if pad is not None:
|
|
851
|
-
|
|
851
|
+
seed_config[SpecialKeys.pad] = pad
|
|
852
852
|
|
|
853
853
|
pdkpath = os.path.join(pdk_root, pdk)
|
|
854
854
|
if not os.path.exists(pdkpath):
|
|
@@ -875,10 +875,7 @@ class Config(GenericImmutableDict[str, Any]):
|
|
|
875
875
|
)
|
|
876
876
|
pdk_config_path = pdk_config_path_alt
|
|
877
877
|
|
|
878
|
-
pdk_env = TclUtils.
|
|
879
|
-
pdk_config,
|
|
880
|
-
open(pdk_config_path, encoding="utf8").read(),
|
|
881
|
-
)
|
|
878
|
+
pdk_env = TclUtils._eval_env_file(seed_config, pdk_config_path)
|
|
882
879
|
|
|
883
880
|
scl = pdk_env.get("STD_CELL_LIBRARY", None)
|
|
884
881
|
assert (
|
|
@@ -902,12 +899,7 @@ class Config(GenericImmutableDict[str, Any]):
|
|
|
902
899
|
)
|
|
903
900
|
scl_config_path = scl_config_path_alt
|
|
904
901
|
|
|
905
|
-
full_env = migrate_old_config(
|
|
906
|
-
TclUtils._eval_env(
|
|
907
|
-
pdk_env,
|
|
908
|
-
open(scl_config_path, encoding="utf8").read(),
|
|
909
|
-
)
|
|
910
|
-
)
|
|
902
|
+
full_env = migrate_old_config(TclUtils._eval_env_file(pdk_env, scl_config_path))
|
|
911
903
|
|
|
912
904
|
pad = pdk_env.get("PAD_CELL_LIBRARY", None)
|
|
913
905
|
|
|
@@ -923,10 +915,7 @@ class Config(GenericImmutableDict[str, Any]):
|
|
|
923
915
|
)
|
|
924
916
|
|
|
925
917
|
full_env = migrate_old_config(
|
|
926
|
-
TclUtils.
|
|
927
|
-
full_env,
|
|
928
|
-
open(pad_config_path, encoding="utf8").read(),
|
|
929
|
-
)
|
|
918
|
+
TclUtils._eval_env_file(full_env, pad_config_path)
|
|
930
919
|
)
|
|
931
920
|
|
|
932
921
|
return GenericImmutableDict(full_env), pdkpath, scl, pad
|
|
@@ -354,20 +354,11 @@ def migrate_old_config(config: Mapping[str, Any]) -> Dict[str, Any]:
|
|
|
354
354
|
if "HEURISTIC_ANTENNA_THRESHOLD" not in config:
|
|
355
355
|
new["HEURISTIC_ANTENNA_THRESHOLD"] = 130
|
|
356
356
|
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
new["
|
|
363
|
-
# deliberately not checking for bad dicts or dicts that require quoting
|
|
364
|
-
# it's already overkill to assume people modified the PDK files here
|
|
365
|
-
#
|
|
366
|
-
# if someone complains we can parse a Tcl dict later
|
|
367
|
-
tcl_dict_entries = ws_rx.split(tcl_dict)
|
|
368
|
-
while len(tcl_dict_entries):
|
|
369
|
-
key = tcl_dict_entries.pop(0)
|
|
370
|
-
value = tcl_dict_entries.pop(0)
|
|
371
|
-
new["KLAYOUT_DRC_DEFINES"][key] = value
|
|
357
|
+
if new["PDK"].startswith("sky130"):
|
|
358
|
+
new["KLAYOUT_ISOSUB_LAYER"] = (81, 53)
|
|
359
|
+
if new["PDK"].startswith("gf180mcu"):
|
|
360
|
+
new["KLAYOUT_ISOSUB_LAYER"] = (23, 5)
|
|
361
|
+
if new["PDK"].startswith("ihp-sg13"):
|
|
362
|
+
new["KLAYOUT_ISOSUB_LAYER"] = (40, 0)
|
|
372
363
|
|
|
373
364
|
return new
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
16
16
|
# See the License for the specific language governing permissions and
|
|
17
17
|
# limitations under the License.
|
|
18
|
-
import shlex
|
|
19
18
|
import inspect
|
|
20
19
|
from enum import Enum
|
|
21
20
|
from decimal import Decimal, InvalidOperation
|
|
@@ -46,6 +45,9 @@ from typing import (
|
|
|
46
45
|
get_origin,
|
|
47
46
|
get_args,
|
|
48
47
|
)
|
|
48
|
+
|
|
49
|
+
from minitcl import Interpreter
|
|
50
|
+
|
|
49
51
|
from ..state import DesignFormat, State
|
|
50
52
|
from ..common import GenericDict, Path, is_string, zip_first, Number, slugify
|
|
51
53
|
|
|
@@ -681,7 +683,7 @@ class Variable:
|
|
|
681
683
|
elif ";" in raw:
|
|
682
684
|
raw = raw.split(";")
|
|
683
685
|
else:
|
|
684
|
-
raw =
|
|
686
|
+
raw = Interpreter().parse_list(str(raw))
|
|
685
687
|
if len(raw) and raw[-1] == "":
|
|
686
688
|
raw.pop() # Trailing commas
|
|
687
689
|
else:
|
|
@@ -724,7 +726,7 @@ class Variable:
|
|
|
724
726
|
)
|
|
725
727
|
components = raw
|
|
726
728
|
if is_string(raw):
|
|
727
|
-
components =
|
|
729
|
+
components = Interpreter().parse_list(str(raw))
|
|
728
730
|
assert isinstance(components, list)
|
|
729
731
|
# Assuming Tcl format:
|
|
730
732
|
if len(components) % 2 != 0:
|
|
@@ -732,7 +734,7 @@ class Variable:
|
|
|
732
734
|
f"Tcl-style flat dictionary provided for variable '{key_path}' is invalid: uneven number of components ({len(components)})"
|
|
733
735
|
)
|
|
734
736
|
raw = {}
|
|
735
|
-
for i in range(
|
|
737
|
+
for i in range(len(components) // 2):
|
|
736
738
|
key = components[2 * i]
|
|
737
739
|
val = components[2 * i + 1]
|
|
738
740
|
raw[key] = val
|
|
@@ -21,7 +21,6 @@ import pathlib
|
|
|
21
21
|
import subprocess
|
|
22
22
|
from typing import List, NoReturn, Sequence, Optional, Union, Tuple
|
|
23
23
|
|
|
24
|
-
import httpx
|
|
25
24
|
import semver
|
|
26
25
|
|
|
27
26
|
from .common import mkdirp
|
|
@@ -82,42 +81,6 @@ def image_exists(ce_path: str, image: str) -> bool:
|
|
|
82
81
|
return len(images) >= 1
|
|
83
82
|
|
|
84
83
|
|
|
85
|
-
def remote_manifest_exists(image: str) -> bool:
|
|
86
|
-
registry = "docker.io"
|
|
87
|
-
image_elements = image.split("/", maxsplit=1)
|
|
88
|
-
if len(image_elements) > 1:
|
|
89
|
-
registry = image_elements[0]
|
|
90
|
-
image = image_elements[1]
|
|
91
|
-
elements = image.split(":")
|
|
92
|
-
repo = elements[0]
|
|
93
|
-
tag = "latest"
|
|
94
|
-
if len(elements) > 1:
|
|
95
|
-
tag = elements[1]
|
|
96
|
-
|
|
97
|
-
url = None
|
|
98
|
-
if registry == "docker.io":
|
|
99
|
-
url = f"https://registry.hub.docker.com/v2/repositories/{repo}/tags/{tag}"
|
|
100
|
-
elif registry == "ghcr.io":
|
|
101
|
-
url = f"https://ghcr.io/v2/{repo}/manifests/{tag}"
|
|
102
|
-
else:
|
|
103
|
-
err(f"Unknown registry '{registry}'.")
|
|
104
|
-
return False
|
|
105
|
-
|
|
106
|
-
try:
|
|
107
|
-
httpx.Client(follow_redirects=True).get(
|
|
108
|
-
url, headers={"Accept": "application/json"}
|
|
109
|
-
)
|
|
110
|
-
except httpx.NetworkError:
|
|
111
|
-
err("Couldn't connect to the internet to pull container images.")
|
|
112
|
-
return False
|
|
113
|
-
except httpx.HTTPStatusError as e:
|
|
114
|
-
err(
|
|
115
|
-
f"The image {image} was not found. This may be because the CI for this image is running- in which case, please try again later. (error: {e})"
|
|
116
|
-
)
|
|
117
|
-
return False
|
|
118
|
-
return True
|
|
119
|
-
|
|
120
|
-
|
|
121
84
|
def ensure_image(ce_path: str, image: str) -> bool:
|
|
122
85
|
if image_exists(ce_path, image):
|
|
123
86
|
return True
|
|
@@ -18,6 +18,7 @@ The Flow Module
|
|
|
18
18
|
An API for implementing new flows using the LibreLane infrastructure, as well
|
|
19
19
|
as a number of built-in flows.
|
|
20
20
|
"""
|
|
21
|
+
|
|
21
22
|
from .flow import FlowError, FlowException, FlowProgressBar, Flow
|
|
22
23
|
from .sequential import SequentialFlow
|
|
23
24
|
from . import builtins
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Copyright 2026 LibreLane Contributors
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
from .flow import Flow
|
|
4
|
+
from .classic import Classic
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@Flow.factory.register()
|
|
8
|
+
class Basic(Classic):
|
|
9
|
+
Substitutions = {
|
|
10
|
+
"Verilator.*": None,
|
|
11
|
+
"Checker.Lint*": None,
|
|
12
|
+
"Yosys.EQY": None,
|
|
13
|
+
# Needs full KLayout
|
|
14
|
+
"KLayout.DRC": None,
|
|
15
|
+
"Checker.KLayoutDRC": None,
|
|
16
|
+
}
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
# Copyright 2025 LibreLane Contributors
|
|
2
|
-
#
|
|
3
|
-
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
# you may not use this file except in compliance with the License.
|
|
5
|
-
# You may obtain a copy of the License at
|
|
6
|
-
#
|
|
7
|
-
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
#
|
|
9
|
-
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
# See the License for the specific language governing permissions and
|
|
13
|
-
# limitations under the License.
|
|
2
|
+
# SPDX-License-Identifier: Apache-2.0
|
|
14
3
|
from .flow import Flow
|
|
15
4
|
from .classic import Classic
|
|
16
5
|
from ..steps import (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
set
|
|
2
|
-
|
|
1
|
+
set clock_name __VIRTUAL_CLK__
|
|
2
|
+
set port_args ""
|
|
3
|
+
if { [info exists ::env(CLOCK_PORT)] && $::env(CLOCK_PORT) ne "" } {
|
|
3
4
|
set port_count [llength $::env(CLOCK_PORT)]
|
|
4
5
|
|
|
5
6
|
if { $port_count == "0" } {
|
|
@@ -9,12 +10,35 @@ if { [info exists ::env(CLOCK_PORT)] } {
|
|
|
9
10
|
}
|
|
10
11
|
|
|
11
12
|
if { $port_count > "0" } {
|
|
12
|
-
set ::
|
|
13
|
+
set ::clock_name [lindex $::env(CLOCK_PORT) 0]
|
|
13
14
|
}
|
|
15
|
+
|
|
16
|
+
set port_args [get_ports $clock_name]
|
|
17
|
+
puts "\[INFO] Using clock $clock_name"
|
|
18
|
+
|
|
19
|
+
set clk_input [get_port $clock_name]
|
|
20
|
+
set clk_indx [lsearch [all_inputs] $clk_input]
|
|
21
|
+
set all_inputs_wo_clk [lreplace [all_inputs] $clk_indx $clk_indx ""]
|
|
22
|
+
|
|
23
|
+
# For now, LibreLane doesn't know what port the reset is
|
|
24
|
+
#set rst_input [get_port resetn]
|
|
25
|
+
#set rst_indx [lsearch [all_inputs] $rst_input]
|
|
26
|
+
#set all_inputs_wo_clk_rst [lreplace $all_inputs_wo_clk $rst_indx $rst_indx ""]
|
|
27
|
+
set all_inputs_wo_clk_rst $all_inputs_wo_clk
|
|
28
|
+
|
|
29
|
+
if { ![info exists ::env(SYNTH_CLK_DRIVING_CELL)] } {
|
|
30
|
+
set ::env(SYNTH_CLK_DRIVING_CELL) $::env(SYNTH_DRIVING_CELL)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
set_driving_cell \
|
|
34
|
+
-lib_cell [lindex [split $::env(SYNTH_CLK_DRIVING_CELL) "/"] 0] \
|
|
35
|
+
-pin [lindex [split $::env(SYNTH_CLK_DRIVING_CELL) "/"] 1] \
|
|
36
|
+
$clk_input
|
|
37
|
+
} else {
|
|
38
|
+
set all_inputs_wo_clk [all_inputs]
|
|
39
|
+
set all_inputs_wo_clk_rst $all_inputs_wo_clk
|
|
14
40
|
}
|
|
15
|
-
|
|
16
|
-
puts "\[INFO] Using clock $clock_port…"
|
|
17
|
-
create_clock {*}$port_args -name $clock_port -period $::env(CLOCK_PERIOD)
|
|
41
|
+
create_clock {*}$port_args -name $clock_name -period $::env(CLOCK_PERIOD)
|
|
18
42
|
|
|
19
43
|
set input_delay_value [expr $::env(CLOCK_PERIOD) * $::env(IO_DELAY_CONSTRAINT) / 100]
|
|
20
44
|
set output_delay_value [expr $::env(CLOCK_PERIOD) * $::env(IO_DELAY_CONSTRAINT) / 100]
|
|
@@ -29,35 +53,17 @@ if { [info exists ::env(MAX_CAPACITANCE_CONSTRAINT)] } {
|
|
|
29
53
|
set_max_capacitance $::env(MAX_CAPACITANCE_CONSTRAINT) [current_design]
|
|
30
54
|
}
|
|
31
55
|
|
|
32
|
-
set clk_input [get_port $clock_port]
|
|
33
|
-
set clk_indx [lsearch [all_inputs] $clk_input]
|
|
34
|
-
set all_inputs_wo_clk [lreplace [all_inputs] $clk_indx $clk_indx ""]
|
|
35
|
-
|
|
36
|
-
#set rst_input [get_port resetn]
|
|
37
|
-
#set rst_indx [lsearch [all_inputs] $rst_input]
|
|
38
|
-
#set all_inputs_wo_clk_rst [lreplace $all_inputs_wo_clk $rst_indx $rst_indx ""]
|
|
39
|
-
set all_inputs_wo_clk_rst $all_inputs_wo_clk
|
|
40
|
-
|
|
41
56
|
# correct resetn
|
|
42
|
-
set clocks [get_clocks $
|
|
57
|
+
set clocks [get_clocks $clock_name]
|
|
43
58
|
|
|
44
59
|
set_input_delay $input_delay_value -clock $clocks $all_inputs_wo_clk_rst
|
|
45
60
|
set_output_delay $output_delay_value -clock $clocks [all_outputs]
|
|
46
61
|
|
|
47
|
-
if { ![info exists ::env(SYNTH_CLK_DRIVING_CELL)] } {
|
|
48
|
-
set ::env(SYNTH_CLK_DRIVING_CELL) $::env(SYNTH_DRIVING_CELL)
|
|
49
|
-
}
|
|
50
|
-
|
|
51
62
|
set_driving_cell \
|
|
52
63
|
-lib_cell [lindex [split $::env(SYNTH_DRIVING_CELL) "/"] 0] \
|
|
53
64
|
-pin [lindex [split $::env(SYNTH_DRIVING_CELL) "/"] 1] \
|
|
54
65
|
$all_inputs_wo_clk_rst
|
|
55
66
|
|
|
56
|
-
set_driving_cell \
|
|
57
|
-
-lib_cell [lindex [split $::env(SYNTH_CLK_DRIVING_CELL) "/"] 0] \
|
|
58
|
-
-pin [lindex [split $::env(SYNTH_CLK_DRIVING_CELL) "/"] 1] \
|
|
59
|
-
$clk_input
|
|
60
|
-
|
|
61
67
|
set cap_load [expr $::env(OUTPUT_CAP_LOAD) / 1000.0]
|
|
62
68
|
puts "\[INFO] Setting load to: $cap_load"
|
|
63
69
|
set_load $cap_load [all_outputs]
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
## Reference
|
|
2
|
+
https://www.klayout.de/doc-qt5/code/index.html
|
|
3
|
+
|
|
4
|
+
## Notes
|
|
5
|
+
|
|
6
|
+
As of KLayout 0.30.13, using the built-in interpreter:
|
|
7
|
+
|
|
8
|
+
- The interpreter does not add the top-level directory to PYTHONPATH.
|
|
9
|
+
- A top-level exception results in a 0 exit. All exceptions must be caught.
|
|
10
|
+
- exit and sys.exit both do not propagate. Use this pattern:
|
|
11
|
+
|
|
12
|
+
```python3
|
|
13
|
+
try:
|
|
14
|
+
import pya
|
|
15
|
+
pya.Application.instance().exit(1)
|
|
16
|
+
except AttributeError:
|
|
17
|
+
sys.exit(1)
|
|
18
|
+
```
|
|
@@ -13,7 +13,11 @@
|
|
|
13
13
|
# See the License for the specific language governing permissions and
|
|
14
14
|
# limitations under the License.
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
from klayout.dbcore import (
|
|
17
|
+
DCellInstArray,
|
|
18
|
+
DTrans,
|
|
19
|
+
Layout,
|
|
20
|
+
)
|
|
17
21
|
|
|
18
22
|
|
|
19
23
|
def insert_cell(
|
|
@@ -22,15 +26,15 @@ def insert_cell(
|
|
|
22
26
|
output: str,
|
|
23
27
|
):
|
|
24
28
|
# The main layout where the cell is inserted
|
|
25
|
-
main_layout =
|
|
29
|
+
main_layout = Layout()
|
|
26
30
|
main_layout.read(input)
|
|
27
31
|
top = main_layout.top_cell()
|
|
28
32
|
|
|
29
33
|
# The cell to insert
|
|
30
|
-
insert_layout =
|
|
34
|
+
insert_layout = Layout()
|
|
31
35
|
insert_layout.read(insert)
|
|
32
36
|
|
|
33
|
-
def copy_cell_to_layout(target_layout, cell):
|
|
37
|
+
def copy_cell_to_layout(target_layout: Layout, cell):
|
|
34
38
|
cell_in_target = target_layout.create_cell(cell.name)
|
|
35
39
|
cell_in_target.copy_tree(cell)
|
|
36
40
|
return cell_in_target
|
|
@@ -39,7 +43,7 @@ def insert_cell(
|
|
|
39
43
|
insert_in_main = copy_cell_to_layout(main_layout, insert_layout.top_cell())
|
|
40
44
|
|
|
41
45
|
# Instantiate the cell
|
|
42
|
-
top.insert(
|
|
46
|
+
top.insert(DCellInstArray(insert_in_main.cell_index(), DTrans(0, 0)))
|
|
43
47
|
|
|
44
48
|
main_layout.write(output)
|
|
45
49
|
|