control.For -> misc.IntSequence

This commit is contained in:
Sebastien Bourdeauducq 2012-06-22 15:01:47 +02:00
parent 8142c4f0d9
commit 1edaec0d75
2 changed files with 3 additions and 3 deletions

View file

@ -1,5 +1,5 @@
from migen.flow.network import *
from migen.actorlib import control
from migen.actorlib import misc
from migen.actorlib.sim import *
from migen.sim.generic import Simulator
from migen.sim.icarus import Runner
@ -18,7 +18,7 @@ def sink_gen():
def main():
source = ActorNode(SimActor(source_gen(), ("source", Source, [("value", BV(32))])))
loop = ActorNode(control.For(32))
loop = ActorNode(misc.IntSequence(32))
sink = ActorNode(SimActor(sink_gen(), ("sink", Sink, [("value", BV(32))])))
g = DataFlowGraph()
g.add_connection(source, loop)

View file

@ -4,7 +4,7 @@ from migen.corelogic.fsm import *
from migen.flow.actor import *
# Generates integers from start to maximum-1
class For(Actor):
class IntSequence(Actor):
def __init__(self, nbits, step=1):
self.nbits = nbits
self.step = step