mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 03:08:27 +08:00
gateware/amp/mailbox: simplify
This commit is contained in:
parent
e5f7fcc339
commit
9ecbb4c88d
@ -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))
|
||||
)
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user