Skip to content

Commit

Permalink
更新pycde
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragon-Git committed Sep 21, 2024
1 parent 461e3df commit 7543cfe
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pycde_example/codic.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Cordic(Module):
def build_comb(ports) -> None:
taps = [st_m_op(ports.coord_i, lambda x : x.as_sint())]
for i in range(16):
dirc = taps[-1].theta.as_bits(32).slice(Bits(32)(31), 1)
dirc = taps[-1].theta.as_bits(32).slice(Bits(5)(31), 1)
x_sh = comb.ShrSOp(taps[-1].x.as_bits(), Bits(32)(i)).as_sint()
y_sh = comb.ShrSOp(taps[-1].y.as_bits(), Bits(32)(i)).as_sint()
with If(dirc):
Expand Down
4 changes: 2 additions & 2 deletions pycde_example/mini_riscv/alu.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ def build(io):
(io.A.as_bits() & io.B.as_bits()).as_sint(XLEN),
(io.A.as_bits() | io.B.as_bits()).as_sint(XLEN),
(io.A.as_bits() ^ io.B.as_bits()).as_sint(XLEN),
(io.A < io.B).as_sint(XLEN),
(io.A < io.B).as_sint().as_sint(XLEN),
comb.ShlOp(io.A.as_bits(), shamt).as_sint(XLEN),
(io.A.as_uint() < io.B.as_uint()).as_sint(XLEN),
(io.A.as_uint() < io.B.as_uint()).as_sint().as_sint(XLEN),
comb.ShrUOp(io.A.as_bits(), shamt).as_sint(XLEN),
comb.ShrSOp(io.A.as_bits(), shamt).as_sint(XLEN),
io.A,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ requires-python = ">=3.8"
dependencies = [
"PyYAML",
"cocotb",
"pycde>=0.5.0, <0.7.0",
"pycde>=0.6.0, <0.7.0",
]

[project.optional-dependencies]
Expand Down

0 comments on commit 7543cfe

Please sign in to comment.