From: Sebastien Bourdeauducq Date: Sat, 17 Nov 2012 22:19:40 +0000 (+0100) Subject: sim/ipc/Message: convert values X-Git-Tag: 24jan2021_ls180~2099^2~773 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=89643bc4346d2f31a3dfb1c7852768ec4a4b550a;p=litex.git sim/ipc/Message: convert values --- 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 = []