How sayakdas10/mfit works
Purpose and entry points
This is a Python thermal simulator for 2.5D/3D multi-chiplet packages. It builds a lumped thermal RC network from layered geometry/material/power inputs, solves transient or steady temperatures using a SuperLU-backed Backward Euler path, and can export discrete state-space (DSS) matrices. Primary CLI: thermal_RC.py. Liquid-cooled wafer-scale flow is separately driven by wafer_liquid/thermal_RC_liquid.py and wafer_liquid/run_wafer_16x16.sh.
Input model and configuration boundary
The simulator consumes four user-owned inputs: material YAML, geometry YAML, power-layout YAML, and time-indexed power CSV. material_prop.yml provides anisotropic layer properties; geometry supports uniform or explicit nonuniform x/y node placement; power configuration maps sources/blocks to the mesh; traces supply source power over time. Format contract: INPUT_FORMAT.md. Representative inputs are under example_1_uniform_nodes_homogeneous_chiplets/chiplet_geometry_4_chiplets_uniform_nodes.yml and example_3_heterogeneous_chiplets/power_dist_config_heterogeneous.yml.
Package and mesh construction
package_class.py is the likely top-level physical-package builder, composing layer and node representations from the geometry and material specifications. layer_class.py models layer-level discretization/material regions, including chiplet-underlying layers and heterogeneous blocks. node_class.py represents thermal nodes and their spatial/physical properties. This stage establishes the node index space used consistently by conductance/capacitance assembly, power mapping, temperature output, and DSS matrices.
Power distribution pipeline
power_class.py translates configured chiplet/block power sources into per-node thermal inputs, reconciling source layout with layer mesh granularity. common.py likely contains shared geometry, mapping, and output utilities. The boundary is explicit: source-level power columns in CSV become a nodal power vector for each simulation interval; heterogeneous configurations can override block materials and define chiplet-specific layouts.
RC-system assembly and numerical solve
thermal_RC.py orchestrates parsing, package construction, power mapping, simulation mode selection, and outputs. It assembles the thermal ODE/RC model across in-plane and vertical connections, supporting anisotropic conductivity and optionally tuned capacitance. For transient simulation, it advances with Backward Euler; the Python layer depends on a bundled/native C solver interface in c_files and the dynamically installed SuperLU library. Steady state follows the same physical system with a steady solve.
DSS export and results
When enabled, thermal_RC.py derives and writes DSS matrices implementing T(k+1) = A*T(k) + B*P(k), alongside mapped nodal power. Normal simulation emits node temperatures, chiplet averages where valid, floorplans, and optional heatmaps beneath the requested output directory. Example launch wrappers are example_1_uniform_nodes_homogeneous_chiplets/run1.sh and example_2_non_uniform_nodes_homogeneous_chiplets/run2.sh.
Wafer-scale liquid-cooling variant
wafer_liquid/thermal_RC_liquid.py and wafer_liquid/liquid_cooling.py extend the RC flow with liquid-cooling behavior for wafer-scale systems. wafer_liquid/generate_wafer_inputs.py generates scalable geometry, power config, and trace inputs, exemplified by wafer_liquid/generated/wafer_16x16/. wafer_liquid/postprocess_wafer.py reduces solver outputs into chiplet/module summaries, with committed example results in wafer_liquid/results/wafer_16x16_steady/wafer_summary/.
External validation and runtime dependencies
Runtime is Python plus native SuperLU shared libraries; Python dependencies are declared in requirements.txt. FEM validation/reference artifacts are separated in FEM_models, with ANSYS Fluent identified as the external reference simulator rather than a runtime dependency.
Main entry points: power_class.py Nodal power mapping · thermal_RC.py Backward Euler solver · thermal_RC_liquid.py Liquid RC entry point · package_class.py Physical package builder
Components 19
Input contract
- Input format · Defines material, geometry, power-layout, and trace inputs.
INPUT_FORMAT.md - Material YAML · Anisotropic layer properties.
material_prop.yml - Geometry YAML · Layer geometry and uniform or nonuniform mesh placement.
example_1_uniform_nodes_homogeneous_chiplets/chiplet_geometry_4_chiplets_uniform_nodes.yml - Power layout YAML · Maps sources and blocks onto the mesh.
example_3_heterogeneous_chiplets/power_dist_config_heterogeneous.yml - Power trace CSV · Time-indexed source power.
Core RC simulator
- Thermal RC CLI · Orchestrates parsing, assembly, solve mode, and output.
thermal_RC.py - Physical package builder · Builds the package and shared node index space.
package_class.py - Layer discretization · Models material regions, underlying layers, and heterogeneous blocks.
layer_class.py - Thermal nodes · Spatial and physical node representation.
node_class.py - Nodal power mapping · Converts source-level traces into per-node thermal inputs.
power_class.py - RC system assembly · Assembles in-plane and vertical conductance and capacitance.
thermal_RC.py - Backward Euler solver · Advances transient temperatures or solves the steady physical system.
thermal_RC.py - Results and DSS export · Writes temperatures, summaries, floorplans, heatmaps, and optional A/B matrices.
thermal_RC.py
Numerical backend
- Native SuperLU interface · Bundled interface backed by installed SuperLU shared libraries.
c_files
Wafer liquid variant
- Liquid RC entry point · Runs wafer-scale liquid-cooled thermal flow.
wafer_liquid/thermal_RC_liquid.py - Liquid cooling model · Adds liquid-cooling behavior to the RC flow.
wafer_liquid/liquid_cooling.py - Wafer input generator · Generates scalable wafer geometry, power configuration, and traces.
wafer_liquid/generate_wafer_inputs.py - Wafer postprocessor · Reduces solver output to chiplet and module summaries.
wafer_liquid/postprocess_wafer.py
Validation
- FEM reference artifacts · ANSYS Fluent reference models, not a runtime dependency.
FEM_models
Connections 25
- Input format → Material YAML: specifies
- Input format → Geometry YAML: specifies
- Input format → Power layout YAML: specifies
- Material YAML → Physical package builder: material properties
- Geometry YAML → Physical package builder: geometry and mesh
- Physical package builder → Layer discretization: composes
- Layer discretization → Thermal nodes: discretizes into
- Thermal nodes → RC system assembly: node index space
- Power layout YAML → Nodal power mapping: source layout
- Power trace CSV → Nodal power mapping: source power by interval
- Thermal nodes → Nodal power mapping: mesh granularity
- Thermal RC CLI → Physical package builder: builds
- Thermal RC CLI → Nodal power mapping: maps power
- Thermal RC CLI → RC system assembly: assembles
- Nodal power mapping → Backward Euler solver: nodal P(k)
- RC system assembly → Backward Euler solver: RC system
- Backward Euler solver → Native SuperLU interface: factorization and solve
- Backward Euler solver → Results and DSS export: temperatures
- Nodal power mapping → Results and DSS export: mapped nodal power
- RC system assembly → Results and DSS export: optional DSS A/B
- Wafer input generator → Liquid RC entry point: generated wafer inputs
- Liquid RC entry point → Liquid cooling model: uses
- Liquid RC entry point → Backward Euler solver: extends RC solve
- Liquid RC entry point → Wafer postprocessor: wafer outputs
- FEM reference artifacts → Results and DSS export: reference comparison