Skip to content

Commit

Permalink
Update example
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardt committed Dec 7, 2023
1 parent 778487c commit 1affb0e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions examples/test_simple_alu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import magma as m
# import mantle
import operator
import fault
import pytest
Expand All @@ -11,7 +10,7 @@ class ConfigReg(m.Circuit):
io = m.IO(D=m.In(m.Bits[2]), Q=m.Out(m.Bits[2])) + \
m.ClockIO(has_ce=True)

reg = mantle.Register(2, has_ce=True, name="conf_reg")
reg = m.Register(m.Bits[2], has_enable=True)(name="conf_reg")
io.Q @= reg(io.D, CE=io.CE)


Expand All @@ -24,7 +23,7 @@ class SimpleALU(m.Circuit):
) + m.ClockIO()

opcode = ConfigReg(name="config_reg")(io.config_data, CE=io.config_en)
io.c @= mantle.mux(
io.c @= m.mux(
[io.a + io.b, io.a - io.b, io.a * io.b, io.a ^ io.b], opcode)


Expand Down

0 comments on commit 1affb0e

Please sign in to comment.