From: Sebastien Bourdeauducq Date: Fri, 14 Dec 2012 14:55:38 +0000 (+0100) Subject: Move Token to migen.flow.transactions X-Git-Tag: 24jan2021_ls180~2099^2~717 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6f992415852ef8d4d2c10a597b51b2ad72c43723;p=litex.git Move Token to migen.flow.transactions --- diff --git a/examples/dataflow/dma.py b/examples/dataflow/dma.py index 8e221edc..dad3d47a 100644 --- a/examples/dataflow/dma.py +++ b/examples/dataflow/dma.py @@ -1,6 +1,7 @@ from random import Random from migen.flow.network import * +from migen.flow.transactions import * from migen.actorlib import dma_wishbone, dma_asmi from migen.actorlib.sim import * from migen.bus import wishbone, asmibus diff --git a/examples/dataflow/misc.py b/examples/dataflow/misc.py index a4dc71d6..c8c0b734 100644 --- a/examples/dataflow/misc.py +++ b/examples/dataflow/misc.py @@ -1,4 +1,5 @@ from migen.flow.network import * +from migen.flow.transactions import * from migen.actorlib import misc from migen.actorlib.sim import * from migen.sim.generic import Simulator diff --git a/examples/dataflow/structuring.py b/examples/dataflow/structuring.py index 2a6dd24e..9551e375 100644 --- a/examples/dataflow/structuring.py +++ b/examples/dataflow/structuring.py @@ -4,6 +4,7 @@ import networkx as nx import matplotlib.pyplot as plt from migen.flow.network import * +from migen.flow.transactions import * from migen.actorlib import structuring from migen.actorlib.sim import * from migen.sim.generic import Simulator diff --git a/examples/pytholite/basic.py b/examples/pytholite/basic.py index 921b0e5e..d00b1ddc 100644 --- a/examples/pytholite/basic.py +++ b/examples/pytholite/basic.py @@ -1,4 +1,5 @@ from migen.flow.network import * +from migen.flow.transactions import * from migen.actorlib.sim import * from migen.pytholite.compiler import make_pytholite from migen.sim.generic import Simulator diff --git a/examples/pytholite/uio.py b/examples/pytholite/uio.py index 1a0690cd..9a55856c 100644 --- a/examples/pytholite/uio.py +++ b/examples/pytholite/uio.py @@ -1,5 +1,5 @@ from migen.flow.network import * -from migen.actorlib.sim import * +from migen.flow.transactions import * from migen.bus import wishbone from migen.bus.transactions import * from migen.uio.ioo import UnifiedIOSimulation diff --git a/examples/sim/dataflow.py b/examples/sim/dataflow.py index 318206a2..172d2b9b 100644 --- a/examples/sim/dataflow.py +++ b/examples/sim/dataflow.py @@ -1,5 +1,6 @@ from migen.fhdl.structure import * from migen.flow.actor import * +from migen.flow.transactions import * from migen.flow.network import * from migen.actorlib.sim import * from migen.sim.generic import Simulator diff --git a/migen/actorlib/sim.py b/migen/actorlib/sim.py index e6885225..153dbe13 100644 --- a/migen/actorlib/sim.py +++ b/migen/actorlib/sim.py @@ -1,12 +1,8 @@ from migen.fhdl.structure import * from migen.flow.actor import * +from migen.flow.transactions import * from migen.sim.generic import PureSimulable -class Token: - def __init__(self, endpoint, value=None): - self.endpoint = endpoint - self.value = value - # Generators yield None or a tuple of Tokens. # Tokens for Sink endpoints are pulled and the "value" field filled in. # Tokens for Source endpoints are pushed according to their "value" field. diff --git a/migen/flow/transactions.py b/migen/flow/transactions.py new file mode 100644 index 00000000..5c3ceab8 --- /dev/null +++ b/migen/flow/transactions.py @@ -0,0 +1,5 @@ +class Token: + def __init__(self, endpoint, value=None): + self.endpoint = endpoint + self.value = value + diff --git a/migen/pytholite/io.py b/migen/pytholite/io.py index 973a33ef..66efa6e2 100644 --- a/migen/pytholite/io.py +++ b/migen/pytholite/io.py @@ -3,7 +3,8 @@ from itertools import zip_longest from migen.fhdl.structure import * from migen.uio.ioo import UnifiedIOObject -from migen.actorlib.sim import * +from migen.flow.actor import Source, Sink +from migen.flow.transactions import * from migen.bus import wishbone from migen.bus.transactions import * from migen.pytholite.fsm import * diff --git a/migen/uio/ioo.py b/migen/uio/ioo.py index 2759eb7c..35500e69 100644 --- a/migen/uio/ioo.py +++ b/migen/uio/ioo.py @@ -1,6 +1,7 @@ from migen.fhdl.structure import * from migen.flow.actor import * -from migen.actorlib.sim import TokenExchanger, Token +from migen.flow.transactions import * +from migen.actorlib.sim import TokenExchanger from migen.bus import wishbone, memory from migen.bus.transactions import * from migen.uio.trampoline import Trampoline