Skip to content

Commit f3f6894

Browse files
committed
wip
1 parent aa467e8 commit f3f6894

File tree

2 files changed

+17
-31
lines changed

2 files changed

+17
-31
lines changed

chipflow_lib/__init__.py

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,20 @@ def _ensure_chipflow_root():
8585
"package": {
8686
"enum": ["caravel", "cf20", "pga144"]
8787
},
88-
"pads": {"$ref": "#/$defs/pin"},
89-
"power": {"$ref": "#/$defs/pin"},
88+
"power": {
89+
"type": "object",
90+
"patternProperties": {
91+
".+": {
92+
"type": "object",
93+
"required": [
94+
"name"
95+
],
96+
"properties": {
97+
"voltage":"string"
98+
}
99+
}
100+
},
101+
},
90102
"debug": {
91103
"type": "object",
92104
"properties": {
@@ -98,32 +110,6 @@ def _ensure_chipflow_root():
98110
},
99111
},
100112
},
101-
"$defs": {
102-
"pin": {
103-
"type": "object",
104-
"additionalProperties": False,
105-
"minProperties": 1,
106-
"patternProperties": {
107-
".+": {
108-
"type": "object",
109-
"required": [
110-
"type",
111-
"loc",
112-
],
113-
"additionalProperties": False,
114-
"properties": {
115-
"type": {
116-
"enum": ["io", "i", "o", "oe", "clock", "reset", "power", "ground"]
117-
},
118-
"loc": {
119-
"type": "string",
120-
"pattern": "^[NSWE]?[0-9]+$"
121-
},
122-
}
123-
}
124-
}
125-
}
126-
}
127113
}
128114

129115

chipflow_lib/platforms/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ def BidirPinSignature(width, **kwargs):
125125
PinList = List[Pin]
126126
Pins = Union[PinSet, PinList]
127127

128-
class PowerPins(enum.Enum):
128+
class PowerType(enum.Enum):
129129
POWER = "power"
130130
GROUND = "ground"
131131

132-
class JTAGPins(enum.Enum):
132+
class JTAGWireName(enum.Enum):
133133
TRST = "trst"
134134
TCK = "tck"
135135
TMS = "tms"
@@ -270,7 +270,7 @@ def clocks(self) -> Dict[int, Pin]:
270270

271271
@property
272272
@abc.abstractmethod
273-
def jtag(self) -> Dict[JTAGPin, Pin]:
273+
def jtag(self) -> Dict[JTAGWireName, Pin]:
274274
"""
275275
Map of JTAG pins for the package
276276
"""

0 commit comments

Comments
 (0)