Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 3 commits
  • 3 files changed
  • 0 commit comments
  • 1 contributor
View
9 migen/bus/wishbone.py
@@ -1,6 +1,6 @@
from migen.fhdl.structure import *
from migen.corelogic import roundrobin
-from migen.corelogic.misc import multimux, optree
+from migen.corelogic.misc import optree
from migen.bus.simple import *
from migen.bus.transactions import *
from migen.sim.generic import Proxy, PureSimulable
@@ -37,10 +37,9 @@ def get_fragment(self):
comb = []
# mux master->slave signals
- m2s_names = _desc.get_names(M_TO_S)
- m2s_masters = [[getattr(m, name) for name in m2s_names] for m in self.masters]
- m2s_target = [getattr(self.target, name) for name in m2s_names]
- comb += multimux(self.rr.grant, m2s_masters, m2s_target)
+ for name in _desc.get_names(M_TO_S):
+ choices = Array(getattr(m, name) for m in self.masters)
+ comb.append(getattr(self.target, name).eq(choices[self.rr.grant]))
# connect slave->master signals
for name in _desc.get_names(S_TO_M):
View
14 migen/corelogic/misc.py
@@ -1,20 +1,6 @@
from migen.fhdl.structure import *
from migen.fhdl.structure import _Operator
-# multimux is deprecated - use Array instead
-# TODO: remove uses of multimux
-def multimux(sel, inputs, output):
- n = len(inputs)
- i = 0
- statements = []
- for osig in output:
- choices = [x[i] for x in inputs]
- cases = [[Constant(j, sel.bv), osig.eq(choices[j])] for j in range(n)]
- cases[n-1][0] = Default()
- statements.append(Case(sel, *cases))
- i += 1
- return statements
-
def optree(op, operands, lb=None, ub=None, default=None):
if lb is None:
lb = 0
View
2  migen/fhdl/tools.py
@@ -132,7 +132,7 @@ def value_bv(v):
elif isinstance(v, Signal):
return v.bv
elif isinstance(v, _Operator):
- obv = map(value_bv, v.operands)
+ obv = list(map(value_bv, v.operands))
if v.op == "+" or v.op == "-":
return BV(max(obv[0].width, obv[1].width) + 1,
obv[0].signed and obv[1].signed)

No commit comments for this range

Something went wrong with that request. Please try again.