Shift register direction
************************************************************************** LFSR Fibonacci
************************************************************************** LFSR Fibonacci
Right : _ _ _ /-->|_31_|_30_|_29_|...|2|1|0| | | | | \<--------XOR<-----------XOR<---------/
e.g : val result = LSFR(myBits, Seq(30,2,0))
Left : _ _ _ |_31_|_30_|_29_|...|2|1|0|<-\ | | | | \----------------->XOR-->XOR----------/
e.g : val result = LSFR(myBits, Seq(31,2,1), LFSR_SHIFT_DIR.SHIFT_LEFT)
: Signal to shift
: List of index that must be xor
: Shift direction (SHIFT_RIGHT, SHIFT_LEFT)
************************************************************************** LFSR Galois
************************************************************************** LFSR Galois
Right : _ _ _ _ _ /->|4|3|-XOR->|2|--XOR->|1|0| |_|_||
e.g: val result = LFSR_Galois(myBits, Seq(1,2))
Left : _ _ _ _ _ |4|3|<-XOR-|2|<--XOR-|1|0|<-\ ||_|_|
e.g: val result = LFSR_Galois(myBits, Seq(2,3), LFSR_SHIFT_DIR.SHIFT_LEFT)
: Signal to shift
: List of index that must be xor
: Shift direction (SHIFT_RIGHT, SHIFT_LEFT)
**************************************************************************** Linear feedback shift register (LFSR) There are 2 types of LFSR : Fibonacci and Galois