mirror of
https://github.com/myhdl/myhdl.git
synced 2025-01-24 21:52:56 +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
|
lfsr.next = 1
|
||||||
else:
|
else:
|
||||||
if enable:
|
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[0] = lfsr[23] ^ lfsr[22] ^ lfsr[21] ^ lfsr[16]
|
||||||
lfsr.next[24:1] = lfsr[23:0]
|
|
||||||
|
|
||||||
return logic
|
return logic
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user