Coverage for klayout_pex/netlist/netlist_format.py: 92%
12 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-06 13:14 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-11-06 13:14 +0000
1#
2# --------------------------------------------------------------------------------
3# SPDX-FileCopyrightText: 2024-2026 Martin Jan Köhler and Harald Pretl
4# Johannes Kepler University, Institute for Integrated Circuits.
5#
6# This file is part of KPEX
7# (see https://github.com/iic-jku/klayout-pex).
8#
9# This program is free software: you can redistribute it and/or modify
10# it under the terms of the GNU General Public License as published by
11# the Free Software Foundation, either version 3 of the License, or
12# (at your option) any later version.
13#
14# This program is distributed in the hope that it will be useful,
15# but WITHOUT ANY WARRANTY; without even the implied warranty of
16# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17# GNU General Public License for more details.
18#
19# You should have received a copy of the GNU General Public License
20# along with this program. If not, see <http://www.gnu.org/licenses/>.
21# SPDX-License-Identifier: GPL-3.0-or-later
22# --------------------------------------------------------------------------------
23#
25from __future__ import annotations
26from enum import StrEnum
29class NetlistFormat(StrEnum):
30 """
31 The formats of the netlists KPEX writes
32 """
33 SPICE = 'spice'
34 VACASK = 'vacask' # an include file of the VACASK simulator (https://codeberg.org/arpadbuermen/VACASK)
36 @property
37 def file_extension(self) -> str:
38 match self:
39 case NetlistFormat.SPICE:
40 return '.spice'
41 case NetlistFormat.VACASK:
42 return '.inc' # NOTE: as the include files of the VACASK views of PDKs