Calculation times & placing test data included ...

master
kaqu 2020-09-24 13:13:05 +02:00
parent f6fa3950f3
commit e56f154623
3 changed files with 20 additions and 11 deletions

View File

@ -308,7 +308,7 @@ class BaseSoC(SoCCore):
l2_cache_reverse = True
)
# Ethernet / Etherbone ---------------------------------------------------------------------
# Ethernet / Etherbone ---------------------------------------------------------------------
if with_ethernet or with_etherbone:
self.submodules.ethphy = LiteEthPHYRGMII(
clock_pads = self.platform.request("eth_clocks", eth_phy),

View File

@ -22,17 +22,26 @@ from litex.soc.interconnect.csr import AutoCSR, CSRStatus, CSRStorage, CSRField
class NeoPixelEngine(Module, AutoCSR):
"""NeoPixelEngine class provides the protocol logic to drive NeoPixel LED strips
Inputs:
b24Data2Load New data to be loaded (24 bits)
b8LoadOffset (0..255) Offset into b24GRBArray to load b24Data2Load to
b8Len (0..255) Length of actual 24-bit data entries (i.e. # of NeoPixels)
bEnable To enable running (after data preparation)
**Inputs**:
:param b24Data2Load int24: New data to be loaded (24 bits)
:param b8LoadOffset int8: Offset (0..255) into b24GRBArray to load b24Data2Load to
:param b8Len int8: Length (0..255) of actual 24-bit data entries (i.e. # of NeoPixels)
:param bEnable bool: To enable running (after data preparation)
Output:
bDataPin NeoPixel 'Din' pin output
**Output**:
:return bDataPin bool: NeoPixel 'Din' pin output
"""
def __init__(self):
self.b24GRBArray = Array(Signal(24) for word24 in range(27)) # Local 24-bit data Array
def __init__(self):
# On Colorlight-5A-75B/Lattice ECP5-25 (@i7/4th gen.):
# 256 NeoPixel LEDs will use 95% of TRELLIS_SLICES & REQUIRE ether_net & ether_bone being DISABLED! Calc. time >2h
# 192 NeoPixel LEDs w/ ethernet/etherbone will use 95% of TRELLIS_SLICES & take approx. 2:20h to calculate
# 27 NeoPixels LEDs w/ ethernet/etherbone used for any tests will require 73% of TRELLIS_SLICES & take less than 0:10h to calculate
n_LEDs = 27
self.b24GRBArray = Array(Signal(24) for word24 in range(n_LEDs)) # Local 24-bit data Array
# Inputs
self.b24Data2Load = CSRStorage(24, reset_less=True, description="Load value (GRB)")
self.b8LoadOffset = CSRStorage(8, reset_less=True, description="Offset to store (GRB) value")

View File

@ -17,7 +17,7 @@ def test(csr_csv):
wb = RemoteClient(csr_csv=csr_csv) # Access wishbone bus
wb.open() # to remote client
print("NeoPixel #0 on & off test: ")
print("NeoPixel on & off test: ")
for i in range(10):
print(".",end="")
#You may add manually: ~/fpga/litex/litex/litex/tools/remote/csr_builder.py