Skip to content

Commit

Permalink
Split transactron core (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
lekcyjna123 authored Mar 17, 2024
1 parent 1c273ff commit 044b125
Show file tree
Hide file tree
Showing 28 changed files with 1,618 additions and 1,550 deletions.
2 changes: 1 addition & 1 deletion coreblocks/structs_common/rs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from amaranth.lib.coding import PriorityEncoder
from transactron import Method, def_method, TModule
from coreblocks.params import RSLayouts, GenParams, OpType
from transactron.core import RecordDict
from transactron.utils import RecordDict
from transactron.utils.transactron_helpers import make_layout

__all__ = ["RS"]
Expand Down
3 changes: 2 additions & 1 deletion scripts/core_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
from transactron.graph import TracingFragment # noqa: E402
from test.test_core import CoreTestElaboratable # noqa: E402
from coreblocks.params.configurations import basic_core_config # noqa: E402
from transactron.core import TransactionManagerKey, TransactionModule # noqa: E402
from transactron.core import TransactionModule # noqa: E402
from transactron.core.keys import TransactionManagerKey # noqa: E402

gp = GenParams(basic_core_config)
elaboratable = CoreTestElaboratable(gp)
Expand Down
2 changes: 1 addition & 1 deletion test/regression/pysim.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from amaranth.utils import exact_log2
from amaranth import *

from transactron.core import TransactionManagerKey
from transactron.core.keys import TransactionManagerKey

from .memory import *
from .common import SimulationBackend, SimulationExecutionResult
Expand Down
4 changes: 2 additions & 2 deletions test/transactions/test_branches.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from amaranth import *
from itertools import product
from transactron.core import (
CtrlPath,
MethodMap,
TModule,
Method,
Transaction,
TransactionManager,
TransactionModule,
def_method,
)
from transactron.core.tmodule import CtrlPath
from transactron.core.manager import MethodMap
from unittest import TestCase
from transactron.testing import TestCaseWithSimulator
from transactron.utils.dependencies import DependencyContext
Expand Down
3 changes: 1 addition & 2 deletions test/transactions/test_transaction_lib.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@

from amaranth import *
from transactron import *
from transactron.core import RecordDict
from transactron.lib import *
from coreblocks.utils import *
from transactron.utils._typing import ModuleLike, MethodStruct
from transactron.utils._typing import ModuleLike, MethodStruct, RecordDict
from transactron.utils import ModuleConnector
from transactron.testing import (
SimpleTestCircuit,
Expand Down
9 changes: 3 additions & 6 deletions test/transactions/test_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,9 @@
from transactron.lib import Adapter, AdapterTrans
from transactron.utils import Scheduler

from transactron.core import (
Priority,
TransactionScheduler,
trivial_roundrobin_cc_scheduler,
eager_deterministic_cc_scheduler,
)
from transactron.core import Priority
from transactron.core.schedulers import trivial_roundrobin_cc_scheduler, eager_deterministic_cc_scheduler
from transactron.core.manager import TransactionScheduler
from transactron.utils.dependencies import DependencyContext


Expand Down
11 changes: 1 addition & 10 deletions transactron/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1 @@
from .core import *

__all__ = [
"TModule",
"TransactionManager",
"TransactionModule",
"Transaction",
"Method",
"def_method",
]
from .core import * # noqa: F401
Loading

0 comments on commit 044b125

Please sign in to comment.