mirror of
https://github.com/myhdl/myhdl.git
synced 2024-12-14 07:44:38 +08:00
lfsr shift implementation
This commit is contained in:
parent
654b7cd869
commit
68f6a53ae8
@ -8,8 +8,9 @@ def lfsr24(lfsr, enable, clock, reset):
|
||||
lfsr.next = 1
|
||||
else:
|
||||
if enable:
|
||||
# lfsr.next[24:1] = lfsr[23:0]
|
||||
lfsr.next = lfsr[23:0] << 1
|
||||
lfsr.next[0] = lfsr[23] ^ lfsr[22] ^ lfsr[21] ^ lfsr[16]
|
||||
lfsr.next[24:1] = lfsr[23:0]
|
||||
|
||||
return logic
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user