soc/cores/code_8b10b: add K helper.

This commit is contained in:
Florent Kermarrec 2020-10-21 09:49:38 +02:00
parent e91ec2ed83
commit ad04365e20
1 changed files with 3 additions and 0 deletions

View File

@ -28,6 +28,9 @@ from litex.soc.interconnect import stream
# Helpers ------------------------------------------------------------------------------------------ # Helpers ------------------------------------------------------------------------------------------
def K(x, y):
return (y << 5) | x
def disparity(word, nbits): def disparity(word, nbits):
n0 = 0 n0 = 0
n1 = 0 n1 = 0