From 89643bc4346d2f31a3dfb1c7852768ec4a4b550a Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 17 Nov 2012 23:19:40 +0100 Subject: [PATCH] sim/ipc/Message: convert values --- examples/pytholite/uio.py | 2 +- migen/sim/ipc.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/pytholite/uio.py b/examples/pytholite/uio.py index 9ee50868..c4b62eca 100644 --- a/examples/pytholite/uio.py +++ b/examples/pytholite/uio.py @@ -17,7 +17,7 @@ def gen(): r = TRead(i) yield r ds.store = r.data - yield Token("result", {"r": int(ds)}) + yield Token("result", {"r": ds}) class Dumper(SimActor): def __init__(self): diff --git a/migen/sim/ipc.py b/migen/sim/ipc.py index fde8e696..0121a593 100644 --- a/migen/sim/ipc.py +++ b/migen/sim/ipc.py @@ -14,8 +14,7 @@ class Int32(int): class Message: def __init__(self, *pvalues): for parameter, value in zip(self.parameters, pvalues): - assert(isinstance(value, parameter[0])) - setattr(self, parameter[1], value) + setattr(self, parameter[1], parameter[0](value)) def __str__(self): p = [] -- 2.30.2