File tree 2 files changed +7
-9
lines changed
2 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -133,9 +133,7 @@ def algorithm(self):
133
133
xor_output = self ._xor_output )
134
134
135
135
def residue (self ):
136
- """Obtain the residual value left in the CRC register after processing a valid trailing CRC.
137
-
138
- A trailing CRC data word is also known as a codeword."""
136
+ """Obtain the residual value left in the CRC register after processing a valid trailing CRC."""
139
137
# Residue is computed by initialising to (possibly reflected) xor_output, feeding crc_width
140
138
# worth of 0 bits, then taking the (possibly reflected) output without any XOR.
141
139
if self ._reflect_output :
@@ -273,10 +271,10 @@ class Processor(Elaboratable):
273
271
computes every new bit of the CRC in parallel.
274
272
275
273
The :py:`match_detected` output may be used to validate data with a trailing CRC (also known as
276
- a codeword). If the most recently processed data word(s) form the valid CRC of all the previous
277
- data words since :py:`start` was asserted, the CRC register will always take on a fixed value
278
- known as the :meth:`residue <Parameters.residue>`. The :py:`match_detected` output indicates
279
- whether the CRC register currently contains this residue.
274
+ a codeword in coding theory ). If the most recently processed data word(s) form the valid CRC of
275
+ all the previous data words since :py:`start` was asserted, the CRC register will always take on
276
+ a fixed value known as the :meth:`residue <Parameters.residue>`. The :py:`match_detected` output
277
+ indicates whether the CRC register currently contains this residue.
280
278
281
279
Parameters
282
280
----------
Original file line number Diff line number Diff line change @@ -35,11 +35,11 @@ Examples
35
35
from amaranth.lib.crc.catalog import CRC16_CCITT, CRC16_USB
36
36
37
37
38
- # Compute a CRC in hardware using the predefined CRC16-CCITT algorithm and the data word
38
+ # Compute a CRC in hardware using the predefined CRC16-CCITT algorithm and a data word
39
39
# width of 8 bits (in other words, computing it over bytes).
40
40
m.submodules.crc16_ccitt = crc16_ccitt = CRC16_CCITT().create()
41
41
42
- # Compute a CRC in hardware using the predefined CRC16-USB algorithm and the data word
42
+ # Compute a CRC in hardware using the predefined CRC16-USB algorithm and a data word
43
43
# width of 32 bits.
44
44
m.submodules.crc16_usb = crc16_usb = CRC16_USB(32).create()
45
45
You can’t perform that action at this time.
0 commit comments