From: Sebastien Bourdeauducq Date: Sun, 17 Jun 2012 16:29:57 +0000 (+0200) Subject: actorlib/control: use numbers of bits instead of maxima X-Git-Tag: 24jan2021_ls180~2099^2~907 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=75d569a12c8f0bb96bac4359a8406219165ef060;p=litex.git actorlib/control: use numbers of bits instead of maxima --- diff --git a/migen/actorlib/control.py b/migen/actorlib/control.py index 9163bcf5..8520dd99 100644 --- a/migen/actorlib/control.py +++ b/migen/actorlib/control.py @@ -8,14 +8,14 @@ from migen.flow.actor import * # Generates integers from start to maximum-1 class For(Actor): - def __init__(self, *maxima, start=False, step=False): - self.dimensions = len(maxima) + def __init__(self, *nbits, start=False, step=False): + self.dimensions = len(nbits) self.start = start self.step = step params = ["end"] if start: params.append("start") if step: params.append("step") - self.d_bv = [BV(bits_for(dimension)) for dimension in maxima] + self.d_bv = [BV(dimension) for dimension in nbits] l_sink = [("d{0}".format(n), [(p, bv) for p in params]) for n, bv in enumerate(self.d_bv)] l_source = [("d{0}".format(n), bv)