Skip to content

Commit 1588e78

Browse files
committed
Use mlogv32 fork for better type checking
1 parent a232a56 commit 1588e78

File tree

4 files changed

+10
-15
lines changed

4 files changed

+10
-15
lines changed

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ override-dependencies = [
3232
]
3333

3434
[tool.uv.sources]
35+
pymsch = { git = "https://github.com/object-Object/pymsch", rev = "3c413fae16" }
3536
riscof = { git = "https://github.com/riscv/riscof", rev = "9fe3597d75" }
3637
riscv-isac = { git = "https://github.com/riscv-software-src/riscv-isac", rev = "777d2b4762" }
3738

python/src/mlogv32/preprocessor/app.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,16 +147,10 @@ def build(
147147
labels=worker_labels,
148148
)
149149

150-
lookups_schem = cast(
151-
Schematic,
152-
Schematic.read_file(str(config.schematics.lookups)), # type: ignore
153-
)
150+
lookups_schem = Schematic.read_file(str(config.schematics.lookups))
154151
assert lookups_schem.get_dimensions() == (4, 4)
155152

156-
ram_schem = cast(
157-
Schematic,
158-
Schematic.read_file(str(config.schematics.ram)), # type: ignore
159-
)
153+
ram_schem = Schematic.read_file(str(config.schematics.ram))
160154
assert ram_schem.get_dimensions() == (1, 1)
161155

162156
schem = Schematic()
@@ -339,7 +333,8 @@ def lenrange(start: int, length: int, step: int = 1):
339333

340334

341335
def simple_block(block: Content | BEContent, x: int, y: int):
342-
return Block(block, x, y, None, 0)
336+
# lie
337+
return Block(cast(Content, block), x, y, None, 0)
343338

344339

345340
def relative_links(*links: ProcessorLink, x: int, y: int):

python/src/mlogv32/scripts/ram_proc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ def build(
397397
)
398398
schem2.write_file(str(out / "ram_proc.msch"))
399399

400-
w, h, *_ = schem1.get_dimensions()
400+
w, h = schem1.get_dimensions()
401401
print(
402402
f"Generated {len(lookup_procs)} lookup tables ({w}x{h}) for {ram_size} variables using {min(len(BLOCK_IDS), ram_size)} block ids."
403403
)

uv.lock

Lines changed: 4 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)