From b72903cfdb21146b078048f4fc336dbf6b9f7f90 Mon Sep 17 00:00:00 2001 From: Lekcyjna <309016@uwr.edu.pl> Date: Thu, 5 Oct 2023 18:13:51 +0200 Subject: [PATCH] Fix tests. --- coreblocks/params/keys.py | 3 ++- transactron/lib/adapters.py | 1 + transactron/lib/methods.py | 4 ++-- transactron/lib/transactions.py | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/coreblocks/params/keys.py b/coreblocks/params/keys.py index 8cd97a9b7..ec11adb4f 100644 --- a/coreblocks/params/keys.py +++ b/coreblocks/params/keys.py @@ -2,7 +2,8 @@ from typing import TYPE_CHECKING from coreblocks.params.dependencies import SimpleKey, UnifierKey -from transactron.lib import MethodTryProduct, Collector, Method +from transactron import Method +from transactron.lib import MethodTryProduct, Collector from coreblocks.peripherals.wishbone import WishboneMaster if TYPE_CHECKING: diff --git a/transactron/lib/adapters.py b/transactron/lib/adapters.py index cea3a159c..d367fe577 100644 --- a/transactron/lib/adapters.py +++ b/transactron/lib/adapters.py @@ -4,6 +4,7 @@ from typing import Optional __all__ = [ + "AdapterBase", "AdapterTrans", "Adapter", ] diff --git a/transactron/lib/methods.py b/transactron/lib/methods.py index 87acd93a6..9b9bfdf9b 100644 --- a/transactron/lib/methods.py +++ b/transactron/lib/methods.py @@ -3,7 +3,7 @@ from ..core import RecordDict from typing import Optional, Callable, Tuple from coreblocks.utils import ValueLike, assign, AssignType -from .transactions import ManyToOneConnectTrans +from . import transactions from .connections import Forwarder __all__ = [ @@ -260,7 +260,7 @@ def elaborate(self, platform): m.submodules.forwarder = forwarder = Forwarder(self.method.data_out.layout) - m.submodules.connect = ManyToOneConnectTrans( + m.submodules.connect = transactions.ManyToOneConnectTrans( get_results=[get for get in self.method_list], put_result=forwarder.write ) diff --git a/transactron/lib/transactions.py b/transactron/lib/transactions.py index e8ec217b1..87a85d8f0 100644 --- a/transactron/lib/transactions.py +++ b/transactron/lib/transactions.py @@ -2,7 +2,7 @@ from ..core import * from ..core import RecordDict from typing import Optional, Callable -from .methods import MethodTransformer +from . import methods __all__ = [ "ConnectTrans", @@ -84,7 +84,7 @@ def __init__( def elaborate(self, platform): m = TModule() - m.submodules.transformer = transformer = MethodTransformer( + m.submodules.transformer = transformer = methods.MethodTransformer( self.method2, i_transform=(self.method1.data_out.layout, self.i_fun), o_transform=(self.method1.data_in.layout, self.o_fun),