threshold-lfsr / README.md
phanerozoic's picture
Upload folder using huggingface_hub
5b2e5df verified
---
license: mit
tags:
- pytorch
- safetensors
- threshold-logic
- neuromorphic
- sequential
- lfsr
- prng
---
# threshold-lfsr
4-bit Linear Feedback Shift Register with maximal-length polynomial x^4 + x + 1.
## Circuit
```
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ β”‚
β–Ό β”‚
[XOR] ──► [Q3] ──► [Q2] ──► [Q1] ──► [Q0]
β–² β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Feedback = Q3 XOR Q0
```
## Sequence
Period = 2^4 - 1 = 15 (all non-zero states)
## Applications
- Pseudo-random number generation
- Built-in self-test (BIST)
- Scrambling/descrambling
- CRC computation
## Parameters
| | |
|---|---|
| Inputs | 4 |
| Outputs | 4 |
| Neurons | 6 |
| Parameters | 30 |
| Magnitude | 14 |
## License
MIT