Skip to content

Commit cc0a5db

Browse files
committed
test passing
1 parent 21dd21f commit cc0a5db

File tree

4 files changed

+12
-10
lines changed

4 files changed

+12
-10
lines changed

chipflow_lib/platforms/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ class IOModel(TypedDict):
8888
"""
8989

9090
width: NotRequired[int]
91-
direction: NotRequired[Annotated[io.Direction, PlainSerializer(lambda x: str(x))]]
91+
direction: NotRequired[Annotated[io.Direction, PlainSerializer(lambda x: x.value)]]
9292
all_have_oe: NotRequired[bool]
9393
allocate_power: NotRequired[bool]
9494
power_voltage: NotRequired[VoltageRange]

tests/test_steps_silicon.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@
2525
DEFAULT_PINLOCK = {
2626
"process" : "ihp_sg13g2",
2727
"package" : {
28-
"package_type": "QuadPackageDef",
29-
"name": "pga144",
30-
"width": 36,
31-
"height": 36
28+
"type": {
29+
"name": "pga144",
30+
"package_type": "QuadPackageDef",
31+
"width": 36,
32+
"height": 36,
33+
}
3234
},
3335
"port_map" : {},
3436
"metadata" : {},

tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def test_pin_signature_annotations():
6767

6868
assert pin_annotation is not None
6969
json_data = pin_annotation.as_json()
70-
assert json_data["direction"] == io.Direction.Input
70+
assert json_data["direction"] == 'i'
7171
assert json_data["width"] == 16
7272

7373

tests/test_utils_additional.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def test_pin_signature_annotations(self):
6464
self.assertIsNotNone(pin_annotation, "Pin annotation not found in annotations")
6565
assert pin_annotation is not None
6666
json_data = pin_annotation.as_json()
67-
self.assertEqual(json_data['direction'], io.Direction.Output)
67+
self.assertEqual(json_data['direction'], 'o')
6868
self.assertEqual(json_data['width'], 8)
6969
self.assertEqual(json_data['init']['value'], 42)
7070

@@ -170,11 +170,11 @@ def test_package_init(self):
170170
package_type = PACKAGE_DEFINITIONS["cf20"]
171171

172172
# Create package
173-
package = Package(package_type=package_type)
173+
package = Package(type=package_type)
174174

175175
# Check properties
176-
self.assertEqual(package.package_type, package_type)
177-
self.assertEqual(package.package_type.name, "cf20")
176+
self.assertEqual(package.type, package_type)
177+
self.assertEqual(package.type.name, "cf20")
178178

179179

180180
class TestPort(unittest.TestCase):

0 commit comments

Comments
 (0)