Skip to content

Commit

Permalink
Remove mantle dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rsetaluri committed Dec 7, 2023
1 parent 3388e11 commit bf45ecb
Show file tree
Hide file tree
Showing 15 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Check out the [fault tutorial](https://github.com/leonardt/fault/tree/master/tut
Here is a simple ALU defined in magma.
```python
import magma as m
import mantle
# import mantle


class ConfigReg(m.Circuit):
Expand Down
2 changes: 1 addition & 1 deletion examples/sv_tb/sv_tb.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import random

import magma as m
import mantle
# import mantle
import fault


Expand Down
2 changes: 1 addition & 1 deletion examples/test_simple_alu.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import magma as m
import mantle
# import mantle
import operator
import fault
import pytest
Expand Down
8 changes: 4 additions & 4 deletions tests/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import shutil
import magma as m
import mantle
# import mantle


def pytest_sim_params(metafunc, *args, exclude=None):
Expand Down Expand Up @@ -93,9 +93,9 @@ class TestPeekCircuit(m.Circuit):

class ConfigReg(m.Circuit):
io = m.IO(D=m.In(m.Bits[2]), Q=m.Out(m.Bits[2])) + \
m.ClockIO(has_ce=True)
m.ClockIO(has_enable=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 @@ -108,7 +108,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(
# udiv not implemented
# [io.a + io.b, io.a - io.b, io.a * io.b, io.a / io.b], opcode)
# use arbitrary fourth op
Expand Down
2 changes: 1 addition & 1 deletion tests/test_env_mod.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fault
import mantle
# import mantle
import magma as m
from .common import pytest_sim_params

Expand Down
2 changes: 1 addition & 1 deletion tests/test_expressions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import fault
import magma as m
import mantle
# import mantle
import hwtypes


Expand Down
4 changes: 2 additions & 2 deletions tests/test_functional_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from hwtypes import BitVector
from fault.functional_tester import FunctionalTester
import magma as m
import mantle
# import mantle
import tempfile
import pytest

Expand All @@ -24,7 +24,7 @@ class Configurable(m.Circuit):
config_en=m.In(m.Enable), O=m.Out(m.Bits[32])
) + m.ClockIO()

reg = mantle.Register(32, has_ce=True)
reg = m.Register(m.Bits[32], has_enable=True)()

reg(io.config_data,
CE=(io.config_addr == m.bits(1, 32)) & m.bit(io.config_en))
Expand Down
2 changes: 1 addition & 1 deletion tests/test_power_domains.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import magma as m
import mantle
# import mantle
import fault
from hwtypes import BitVector
import pytest
Expand Down
2 changes: 1 addition & 1 deletion tests/test_select_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
subcomponents of a DUT)
"""
import magma as m
import mantle
# import mantle
import fault
import hwtypes as ht
import os
Expand Down
2 changes: 1 addition & 1 deletion tests/test_test_vectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import pytest
from hwtypes import Bit
import magma as m
import mantle
# import mantle
from fault.test_vectors import (generate_function_test_vectors,
generate_simulator_test_vectors)
from fault.value import AnyValue
Expand Down
4 changes: 2 additions & 2 deletions tests/test_tester/test_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from ..common import AndCircuit, SimpleALU, TestTupleCircuit, \
TestNestedArraysCircuit, TestNestedArrayTupleCircuit
from hwtypes import BitVector
from mantle import DefineCounter
import magma as m


def test_interactive_basic(capsys):
Expand Down Expand Up @@ -38,7 +38,7 @@ def test_interactive_clock():


def test_counter():
Counter4 = DefineCounter(4)
Counter4 = m.mantle.Counter(4)
tester = PythonTester(Counter4, Counter4.CLK)
tester.CLK = 0
tester.wait_until_high(Counter4.O[3])
Expand Down
6 changes: 3 additions & 3 deletions tutorial/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ Here's an example:

```python
import magma as m
import mantle
# import mantle
import fault


Expand Down Expand Up @@ -307,7 +307,7 @@ Suppose you had the following definition of a simple, configurable ALU in magma
(source: [fault/tutorial/exercise_1.py](./exercise_1.py)):
```python
import magma as m
import mantle
# import mantle


class ConfigReg(m.Circuit):
Expand Down Expand Up @@ -405,7 +405,7 @@ Suppose you have the following two memory modules defined in magma (source:
[fault/tutorial/exercise_2.py](./exercise_2.py)):
```python
import magma as m
import mantle
# import mantle
import fault


Expand Down
2 changes: 1 addition & 1 deletion tutorial/exercise_1.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import magma as m
import mantle
# import mantle


class ConfigReg(m.Circuit):
Expand Down
2 changes: 1 addition & 1 deletion tutorial/exercise_2.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import magma as m
import mantle
# import mantle
import fault
from reset_tester import ResetTester

Expand Down
2 changes: 1 addition & 1 deletion tutorial/tff.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import magma as m
import mantle
# import mantle
import fault


Expand Down

0 comments on commit bf45ecb

Please sign in to comment.