From 7e20320b9d61fcb7d39a9e15806b19873740965a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 27 Jul 2013 15:38:48 +0200 Subject: [PATCH] pytholite/io: len -> flen --- migen/pytholite/io.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/migen/pytholite/io.py b/migen/pytholite/io.py index 01f168af..64821f2e 100644 --- a/migen/pytholite/io.py +++ b/migen/pytholite/io.py @@ -101,7 +101,7 @@ def _gen_wishbone_io(compiler, modelname, model, to_model, from_model, bus): ] sel = to_model["sel"] if isinstance(sel, ast.Name) and sel.id == "None": - nbytes = (len(bus.dat_w) + 7)//8 + nbytes = (flen(bus.dat_w) + 7)//8 state.append(bus.sel.eq(2**nbytes-1)) else: state.append(bus.sel.eq(compiler.ec.visit_expr(sel))) @@ -121,7 +121,7 @@ def _gen_memory_io(compiler, modelname, model, to_model, from_model, port): s1.append(port.dat_w.eq(compiler.ec.visit_expr(to_model["data"]))) sel = to_model["sel"] if isinstance(sel, ast.Name) and sel.id == "None": - nbytes = (len(port.dat_w) + 7)//8 + nbytes = (flen(port.dat_w) + 7)//8 s1.append(port.we.eq(2**nbytes-1)) else: s1.append(port.we.eq(compiler.ec.visit_expr(sel))) -- 2.30.2