<commit_before># Clash utils

A random collection of reusable [Clash](http://www.clash-lang.org/) designs/examples.

## Includes:
* [Binary to BCD conversion](https://en.wikipedia.org/wiki/Double_dabble)
* [CORDIC](https://en.wikipedia.org/wiki/CORDIC) for calculating trigonometric functions
* [CRC](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) calculation
* A FIFO
* [FIR](https://en.wikipedia.org/wiki/Finite_impulse_response), [IIR](https://en.wikipedia.org/wiki/Infinite_impulse_response) filters
* A [bitonic sorting network](https://en.wikipedia.org/wiki/Bitonic_sorter)
* Divider
* [FFTs](https://en.wikipedia.org/wiki/Fast_Fourier_transform)
* [Gray code](https://en.wikipedia.org/wiki/Gray_code) conversion
* [Hamming code](https://en.wikipedia.org/wiki/Hamming_code) encoding/decoding
* [LFSRs](https://en.wikipedia.org/wiki/Linear-feedback_shift_register)
* [Scrambler](https://en.wikipedia.org/wiki/Scrambler)
* [Pseudo LRU trees](https://en.wikipedia.org/wiki/Pseudo-LRU)

Each design has a [HSpec](https://hspec.github.io/) testsuite in the [/tests](https://github.com/adamwalker/clash-utils/tree/master/tests) subdirectory.

## Status

Most of these designs are not FPGA proven (yet). Designs that have actually been tested on an FPGA are:
* the CRCs
* the FIFOs<commit_msg>readme tweak<commit_after># Clash utils

A random collection of reusable [Clash](http://www.clash-lang.org/) designs/examples.

## Includes:
* [Binary to BCD conversion](https://en.wikipedia.org/wiki/Double_dabble)
* [CORDIC](https://en.wikipedia.org/wiki/CORDIC) for calculating trigonometric functions
* [CRC](https://en.wikipedia.org/wiki/Cyclic_redundancy_check) calculation
* A FIFO
* [FIR](https://en.wikipedia.org/wiki/Finite_impulse_response), [IIR](https://en.wikipedia.org/wiki/Infinite_impulse_response) filters
* A [bitonic sorting network](https://en.wikipedia.org/wiki/Bitonic_sorter)
* Divider
* [FFTs](https://en.wikipedia.org/wiki/Fast_Fourier_transform)
* [Gray code](https://en.wikipedia.org/wiki/Gray_code) conversion
* [Hamming code](https://en.wikipedia.org/wiki/Hamming_code) encoding/decoding
* [LFSRs](https://en.wikipedia.org/wiki/Linear-feedback_shift_register)
* [Scrambler](https://en.wikipedia.org/wiki/Scrambler)
* [Pseudo LRU trees](https://en.wikipedia.org/wiki/Pseudo-LRU)

Each design has a [Hspec](https://hspec.github.io/) testsuite/specification in the [/tests](https://github.com/adamwalker/clash-utils/tree/master/tests) subdirectory.

## Status

Most of these designs are not FPGA proven (yet). Designs that have actually been tested on an FPGA are:
* the CRCs
* the FIFOs
{'fraction_non_alphanumeric': 0.1557596632223498, 'fraction_numerical': 0.0, 'mean_word_length': 5.5187032418952615, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 28, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1000228', 'n_tokens_mistral': 925, 'n_tokens_neox': 881, 'n_words': 156}