2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 11:18:27 +08:00

gateware: fix mailbox.

This commit is contained in:
whitequark 2016-11-01 02:33:00 +00:00
parent 898a716b91
commit 18ae8d54a3

View File

@ -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))
)
]