Skip to content

Commit

Permalink
mac/crc: Cosmetic cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-digital committed Apr 5, 2024
1 parent fb407ce commit 421e008
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions liteeth/mac/crc.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ class LiteEthMACCRCEngine(LiteXModule):
Cyclic Redundancy Check (CRC) Engine using an asynchronous LFSR.
This module calculates the next CRC value based on the previous CRC value and the current data input.
The CRC calculation is optimized for speed and resource efficiency.
Parameters
----------
Expand Down Expand Up @@ -109,7 +108,12 @@ def __init__(self, data_width):
# Ex for a 32-bit Data-Path, we create 4 engines: 8, 16, 24 and 32-bit engines.
engines = []
for n in range(data_width//8):
engines.append(LiteEthMACCRCEngine((n + 1)*8, self.width, self.polynom))
engine = LiteEthMACCRCEngine(
data_width = (n + 1)*8,
width = self.width,
polynom = self.polynom,
)
engines.append(engine)
self.submodules += engines

# Register Full-Word CRC Engine (last one).
Expand Down

0 comments on commit 421e008

Please sign in to comment.