|
M5Utility 0.0.7 git rev:ba71c71
|
Fibonacci LFSRs (right-shift version) More...
#include <lfsr.hpp>
Public Types | |
| using | state_type_t = std::bitset<N> |
| State type. | |
Public Member Functions | |
| const state_type_t & | state () const noexcept |
| Gets the state. | |
| template<typename UL = unsigned long, typename std::enable_if<(sizeof(UL) *CHAR_BIT >=64), std::nullptr_t >::type = nullptr> | |
| uint64_t | value () const |
| Gets the state value. | |
| template<typename UL = unsigned long, typename std::enable_if<(sizeof(UL) *CHAR_BIT< 64), std::nullptr_t >::type = nullptr> | |
| uint64_t | value () const |
| bool | step () noexcept |
| Shift 1 step (Right). Returns output bit (LSB before shift) | |
| uint64_t | step (const uint32_t nbits) noexcept |
| Shift nbit steps and gets. | |
Constructor | |
| FibonacciLFSR_Right (const uint64_t seed) noexcept | |
| FibonacciLFSR_Right (const state_type_t s) noexcept | |
Helper | |
| uint16_t | next16 () noexcept |
| Shift 16 bits and get. | |
| uint32_t | next32 () noexcept |
| Shift 32 bits and get. | |
| uint64_t | next64 () noexcept |
| Shift 64 bits and get. | |
Static Protected Member Functions | |
| template<uint32_t... Ts> | |
| static bool | taps_xor (const std::bitset< N > &s) |
| static bool | taps_xor_all (const state_type_t &s) |
Protected Attributes | |
| state_type_t | _state |
Fibonacci LFSRs (right-shift version)
| N | Value bit width (1..64) |
| Taps | Tap bit indexes (polynomial exponent) |