semvec/pypi-packages huggingface dataset:
fsr-tools 1.0.0
Linear Feedback Shift Registers in pure Python3
License: MIT
Requires Python: <4.0,>=3.8

# FSR-Tools: Feedback/Feedforward Shift Registers in Python

Designed to test FSR Mathematically for verification of Verilog Design.
This package provides an abstract base class for Feedback/Feedforward Shift Registers (FSRs) and two concrete implementations:  
- **Fibonacci LFSR** (linear feedback)
- **Galois LFSR** (linear feedforward)

Supports:
- Custom characteristic polynomials
- Arbitrary initial states
- State table generation
- Algebraic polynomial form
- Bitwise access to register positions

## Installation

Clone the repo and place the module in your project:

```bash
git clone https://github.com/anubhav-narayan/fsr-tools.git
```

Use `poetry`

```bash
poetry install
```

## Usage

General Usage
```python3
from fsr_tools import Galois_LFSR as LFSR

lfsr = LFSR(poly=0b10011, state=0b1010)

# Get full cycle of states
print(lfsr.state_table)
# Access bits
print(lfsr[0]) # Read a bit
lfsr[4] = lfsr[3] & 0b1 # Write a bit
```
Usage with CoCoTB
```python3
from fsr_tools import Galois_LFSR as LFSR
from cocotb import BinaryValue

lfsr = LFSR(poly=0b10011, state=0b1010)

# Assign state
dut.lfsr.value = BinaryValue(lfsr.state, n_bits=lfsr.field_order)
```

Extend the `FSR` Abstract Class to create custom Feedback/Feedforward Shift Registers. Just override the `round` function.
onsigntv-app-simulator 1.5.0
Assist the development of apps for OnSign TV platform by running them locally.
License: MIT
Requires Python: >=3.8
Keywords: development onsigntv apps

# OnSign TV App Simulator

This simulator makes it easier to develop [OnSign TV Apps][1] by testing your configuration locally, without having to upload your HTML to OnSign TV every time you make a change while developing your app.


##  Installing

This simulator requires Python 3.8 and up. You can optionally install [ffmpeg][2] to determine the duration of video and audio files, but that is not needed unless you plan on using those attributes on your app. If you want ID3 information for audio files, you'll also need to install [mutagen][3].


### Installing from [PyPI](https://pypi.org/)

You can easily install it from PyPI:

```
pip install onsigntv-app-simulator
```


### Installing from this repo

You can also install it from this repo.

After cloning or downloading this repo, just enter the folder, create a new environment and install it.

```
python3 -m venv env
. env/bin/activate

python setup.py install
```


## Using the Simulator

After installing, running the simulator is very simple. The following command should be in your path:

```
onsigntv-app-simulator path/to/apps
```

If you don't specify a path, the app simulator will use your current working directory.

After running, open your browser and navigate to <http://127.0.01:8080/>. Click on your template file, fill in the options and start developing.

The app simulator will automatically track files – like images, CSS or Javascript - used by your app. If any file used changes the app will be automatically reloaded.

> **Heads Up!** If you installed the simulator in a `virtualenv` the command should be running with the `virtualenv` activated!

Report any issues you find [here][4] and keep on working on your apps!


[1]: https://github.com/onsigntv/apps
[2]: https://ffmpeg.org/download.html
[3]: https://mutagen.readthedocs.org
[4]: https://github.com/onsigntv/app-simulator/issues