uart: use data instead of d on endpoint's layouts (coherency with others cores)

This commit is contained in:
Florent Kermarrec 2015-03-01 16:56:48 +01:00
parent 1e6d1deae8
commit 096e95cb59
4 changed files with 17 additions and 17 deletions

View File

@ -16,12 +16,12 @@ class UART(Module, AutoCSR):
self.sync += [
If(self._rxtx.re,
phy.tx.sink.stb.eq(1),
phy.tx.sink.d.eq(self._rxtx.r),
phy.tx.sink.data.eq(self._rxtx.r),
).Elif(phy.tx.sink.ack,
phy.tx.sink.stb.eq(0)
),
If(phy.rx.source.stb,
self._rxtx.w.eq(phy.rx.source.d)
self._rxtx.w.eq(phy.rx.source.data)
)
]
self.comb += [

View File

@ -5,7 +5,7 @@ from migen.flow.actor import Sink, Source
class UARTPHYSerialRX(Module):
def __init__(self, pads, tuning_word):
self.source = Source([("d", 8)])
self.source = Source([("data", 8)])
###
uart_clk_rxen = Signal()
phase_accumulator_rx = Signal(32)
@ -17,7 +17,7 @@ class UARTPHYSerialRX(Module):
rx_bitcount = Signal(4)
rx_busy = Signal()
rx_done = self.source.stb
rx_data = self.source.d
rx_data = self.source.data
self.sync += [
rx_done.eq(0),
rx_r.eq(rx),
@ -54,7 +54,7 @@ class UARTPHYSerialRX(Module):
class UARTPHYSerialTX(Module):
def __init__(self, pads, tuning_word):
self.sink = Sink([("d", 8)])
self.sink = Sink([("data", 8)])
###
uart_clk_txen = Signal()
phase_accumulator_tx = Signal(32)
@ -67,7 +67,7 @@ class UARTPHYSerialTX(Module):
self.sync += [
self.sink.ack.eq(0),
If(self.sink.stb & ~tx_busy & ~self.sink.ack,
tx_reg.eq(self.sink.d),
tx_reg.eq(self.sink.data),
tx_bitcount.eq(0),
tx_busy.eq(1),
pads.tx.eq(0)

View File

@ -5,14 +5,14 @@ class UARTPHYSim(Module):
def __init__(self, pads):
self.dw = 8
self.tuning_word = Signal(32)
self.sink = Sink([("d", 8)])
self.source = Source([("d", 8)])
self.sink = Sink([("data", 8)])
self.source = Source([("data", 8)])
self.comb += [
pads.source_stb.eq(self.sink.stb),
pads.source_d.eq(self.sink.d),
pads.source_data.eq(self.sink.data),
self.sink.ack.eq(pads.source_ack),
self.source.stb.eq(pads.sink_stb),
self.source.d.eq(pads.sink_d)
self.source.data.eq(pads.sink_data)
]

View File

@ -80,11 +80,11 @@ class LiteScopeUART2WB(Module, AutoCSR):
tx_data_ce = Signal()
self.sync += [
If(cmd_ce, cmd.eq(uart.source.d)),
If(length_ce, length.eq(uart.source.d)),
If(address_ce, address.eq(Cat(uart.source.d, address[0:24]))),
If(cmd_ce, cmd.eq(uart.source.data)),
If(length_ce, length.eq(uart.source.data)),
If(address_ce, address.eq(Cat(uart.source.data, address[0:24]))),
If(rx_data_ce,
data.eq(Cat(uart.source.d, data[0:24]))
data.eq(Cat(uart.source.data, data[0:24]))
).Elif(tx_data_ce,
data.eq(self.wishbone.dat_r)
)
@ -102,8 +102,8 @@ class LiteScopeUART2WB(Module, AutoCSR):
timeout.reset.eq(1),
If(uart.source.stb,
cmd_ce.eq(1),
If( (uart.source.d == self.cmds["write"]) |
(uart.source.d == self.cmds["read"]),
If( (uart.source.data == self.cmds["write"]) |
(uart.source.data == self.cmds["read"]),
NextState("RECEIVE_LENGTH")
),
byte_counter.reset.eq(1),
@ -168,7 +168,7 @@ class LiteScopeUART2WB(Module, AutoCSR):
)
)
self.comb += \
chooser(data, byte_counter.value, uart.sink.d, n=4, reverse=True)
chooser(data, byte_counter.value, uart.sink.data, n=4, reverse=True)
fsm.act("SEND_DATA",
uart.sink.stb.eq(1),
If(uart.sink.ack,