From 9ecbb4c88d4b65fb52171e86be55f43beff7a875 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Wed, 29 Apr 2015 12:56:21 +0800 Subject: [PATCH] gateware/amp/mailbox: simplify --- artiq/gateware/amp/mailbox.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/artiq/gateware/amp/mailbox.py b/artiq/gateware/amp/mailbox.py index 909d53908..687467622 100644 --- a/artiq/gateware/amp/mailbox.py +++ b/artiq/gateware/amp/mailbox.py @@ -12,12 +12,10 @@ class Mailbox(Module): value = Signal(32) for i in self.i1, self.i2: self.sync += [ - i.ack.eq(0), - If(i.cyc & i.stb & ~i.ack, i.ack.eq(1)), - i.dat_r.eq(value), - If(i.cyc & i.stb & i.we, - [If(i.sel[j], value[j*8:j*8+8].eq(i.dat_w[j*8:j*8+8])) - for j in range(4)] + i.ack.eq(0), + If(i.cyc & i.stb & ~i.ack, + i.ack.eq(1), + If(i.we, value.eq(i.dat_w)) ) ]