Skip to content

Commit

Permalink
soc/cores/uart: use reset_less on accumulator, reg, bitcount to reduce.
Browse files Browse the repository at this point in the history
This reduces logic a bit. It does not make large difference on usual design with
only 1 UART, but is interesting on designs with hundreds of UARTs used to "document"
FPGA boards :) (similar to https://github.com/enjoy-digital/camlink_4k/blob/master/ios_stream.py)
  • Loading branch information
enjoy-digital committed Mar 31, 2020
1 parent 8716005 commit 91981b9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions litex/soc/cores/uart.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def __init__(self, pads, tuning_word):
# # #

uart_clk_rxen = Signal()
phase_accumulator_rx = Signal(32)
phase_accumulator_rx = Signal(32, reset_less=True)

rx = Signal()
rx_r = Signal()
rx_reg = Signal(8)
rx_bitcount = Signal(4)
rx_reg = Signal(8, reset_less=True)
rx_bitcount = Signal(4, reset_less=True)
rx_busy = Signal()
rx_done = self.source.valid
rx_data = self.source.data
Expand Down Expand Up @@ -87,12 +87,12 @@ def __init__(self, pads, tuning_word):
# # #

uart_clk_txen = Signal()
phase_accumulator_tx = Signal(32)
phase_accumulator_tx = Signal(32, reset_less=True)

pads.tx.reset = 1

tx_reg = Signal(8)
tx_bitcount = Signal(4)
tx_reg = Signal(8, reset_less=True)
tx_bitcount = Signal(4, reset_less=True)
tx_busy = Signal()
self.sync += [
self.sink.ready.eq(0),
Expand Down

0 comments on commit 91981b9

Please sign in to comment.