/
use.py
113 lines (88 loc) · 3.39 KB
/
use.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# Copyright 2023 Silicon Compiler Authors. All Rights Reserved.
from siliconcompiler import Chip
class PackageChip(Chip):
def __init__(self, chip, name, package=None):
self.__package = package
super().__init__(name)
self.logger = chip.logger
def add(self, *args, field='value', step=None, index=None, package=None):
if not package:
package = self.__package
super().add(*args, field=field, step=step,
index=index, package=package)
def set(self, *args, field='value', clobber=True, step=None, index=None, package=None):
if not package:
package = self.__package
super().set(*args, field=field, clobber=clobber, step=step,
index=index, package=package)
class PDK(PackageChip):
"""
Object for configuring a process development kit.
This is the main object used for configuration and data for a PDK
within the SiliconCompiler platform.
This inherits all methods from :class:`~siliconcompiler.Chip`.
Args:
chip (Chip): A real only copy of the parent chip.
name (string): Name of the PDK.
Examples:
>>> siliconcompiler.PDK(chip, "asap7")
Creates a flow object with name "asap7".
"""
class FPGA(PackageChip):
"""
Object for configuring an FPGA
This is the main object used for configuration and data for a FPGA
within the SiliconCompiler platform.
This inherits all methods from :class:`~siliconcompiler.Chip`.
Args:
chip (Chip): A real only copy of the parent chip.
name (string): Name of the FPGA.
Examples:
>>> siliconcompiler.FPGA(chip, "lattice_ice40")
Creates a flow object with name "lattice_ice40".
"""
class Library(PackageChip):
"""
Object for configuring a library.
This is the main object used for configuration and data for a library
within the SiliconCompiler platform.
This inherits all methods from :class:`~siliconcompiler.Chip`.
Args:
chip (Chip): A real only copy of the parent chip.
name (string): Name of the library.
Examples:
>>> siliconcompiler.Library(chip, "asap7sc7p5t")
Creates a library object with name "asap7sc7p5t".
"""
class Flow(Chip):
"""
Object for configuring a flow.
This is the main object used for configuration and data for a flow
within the SiliconCompiler platform.
This inherits all methods from :class:`~siliconcompiler.Chip`.
Args:
chip (Chip): A real only copy of the parent chip.
name (string): Name of the flow.
Examples:
>>> siliconcompiler.Flow(chip, "asicflow")
Creates a flow object with name "asicflow".
"""
def __init__(self, chip, name):
super().__init__(name)
self.logger = chip.logger
class Checklist(Chip):
"""
Object for configuring a checklist.
This is the main object used for configuration and data for a checklist
within the SiliconCompiler platform.
This inherits all methods from :class:`~siliconcompiler.Chip`.
Args:
chip (Chip): A real only copy of the parent chip.
name (string): Name of the checklist.
Examples:
>>> siliconcompiler.Checklist(chip, "tapeout")
Creates a checklist object with name "tapeout".
"""
def __init__(self, chip, name):
super().__init__(name)
self.logger = chip.logger