mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
7 lines
192 B
Python
7 lines
192 B
Python
def nextLn(Ln):
|
|
""" Return Gray code Ln+1, given Ln. """
|
|
Ln0 = ['0' + codeword for codeword in Ln]
|
|
Ln1 = ['1' + codeword for codeword in Ln]
|
|
Ln1.reverse()
|
|
return Ln0 + Ln1
|