From 18ae8d54a39a495afa09802fe27ef6bf5183032f Mon Sep 17 00:00:00 2001 From: whitequark Date: Tue, 1 Nov 2016 02:33:00 +0000 Subject: [PATCH] gateware: fix mailbox. --- artiq/gateware/amp/mailbox.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/artiq/gateware/amp/mailbox.py b/artiq/gateware/amp/mailbox.py index 6f4a8987f..4c93557df 100644 --- a/artiq/gateware/amp/mailbox.py +++ b/artiq/gateware/amp/mailbox.py @@ -12,10 +12,10 @@ class Mailbox(Module): values = Array([Signal(32) for _ in range(size)]) for i in self.i1, self.i2: self.sync += [ - i.dat_r.eq(values[i.adr]), + i.dat_r.eq(values[i.adr & 0xff]), i.ack.eq(0), If(i.cyc & i.stb & ~i.ack, i.ack.eq(1), - If(i.we, values[i.adr].eq(i.dat_w)) + If(i.we, values[i.adr & 0xff].eq(i.dat_w)) ) ]