Skip to content

Commit

Permalink
Merge pull request #2 from Fraunhofer-IMS/update_v1.0.1
Browse files Browse the repository at this point in the history
Update v1.0.1
  • Loading branch information
hoyer-ims authored Nov 22, 2024
2 parents dabce97 + 097ad83 commit 3130753
Show file tree
Hide file tree
Showing 9 changed files with 1,440 additions and 11 deletions.
15 changes: 15 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
This work is provided under the terms of GNU General Public
License Version 3 (see below). As a special exception, you may
create a larger work that contains
part or all of the tinyHLS hardware compiler and distribute that
work under the terms of your choice, so long as that work is not
itself a hardware compiler or template-based code generator or a
modified version thereof. Alternatively, if you modify or re-
distribute the hardware compiler itself, you may (at your option)
remove this special exception, which will cause the hardware compi-
ler and the resulting output files to be licensed under the GNU
General Public License Version 3 without this special exception.




GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ The conv1D layer is configurable either as a resource-efficient or as performanc
> Contributions and feedback are highly welcome!
## Quickstart
Detailed documentation is available as [HTML](https://fraunhofer-ims.github.io/tinyHLS/) and [PDF](https://github.com/Fraunhofer-IMS/tinyHLS/blob/main/docs/public/pdf/tinyHLS.pdf).


### Conda Installation

Expand All @@ -40,7 +38,6 @@ To setup the environment and activate it, the following commands have to be run
```
$ conda env create -f environment.yml
$ conda activate tinyHLS
$ pip install
```


Expand All @@ -63,14 +60,16 @@ tinyhls.translate_model()
tinyhls.create_testbench()
```

### Example
### Examples

An example of a small CNN is provided in the [`test.py`](test.py) file.
This example is also executed by the project's [GitHub actions workflow](https://github.com/Fraunhofer-IMS/tinyHLS/actions).

> [!TIP]
> See the action's artifacts for tool logs and the generated HDL example.
Further examples are provided under [examples/](https://github.com/Fraunhofer-IMS/tinyHLS/examples), which include the application on PPG and ECG biosignals using public datasets as well as a workaround to use this tool in combination with PyTorch. More details are provided in the userguide.

### Simulation

The generated Verilog code can be simulated using any open-source or commercial HDL simulator tools.
Expand All @@ -94,7 +93,7 @@ modified version thereof. Alternatively, if you modify or re-
distribute the hardware compiler itself, you may (at your option)
remove this special exception, which will cause the hardware compi-
ler and the resulting output files to be licensed under the GNU
General Public License without this special exception.
General Public License Version 3 without this special exception.
```

Expand Down
2 changes: 1 addition & 1 deletion docs/legal.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ modified version thereof. Alternatively, if you modify or re-
distribute the hardware compiler itself, you may (at your option)
remove this special exception, which will cause the hardware compi-
ler and the resulting output files to be licensed under the GNU
General Public License without this special exception.
General Public License Version 3 without this special exception.
----
Binary file modified docs/public/pdf/tinyHLS.pdf
Binary file not shown.
15 changes: 13 additions & 2 deletions docs/ug/content.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ Clone the https://github.com/Fraunhofer-IMS/tinyHLS[tinyHLS] im Github on your c
*Step 5*: Activate the virtual environment

$ conda activate tinyHLS
$ pip install


=== Use
Expand Down Expand Up @@ -184,8 +183,9 @@ About arguments:



=== Test Example
=== Examples

*Simple Test example*:
An example of a small convolutional neural network (CNN) is provided for test in the https://github.com/Fraunhofer-IMS/tinyHLS/test.py[test.py] file. It consists of nine cells that effectively showcase the capabilities of tinyHLS.

. Import the necessary packages.
Expand All @@ -208,6 +208,17 @@ An example of a small convolutional neural network (CNN) is provided for test in

. Generate the testbench for the convolutional neural network (CNN) model with ``tinyhls.create_testbench()``.

*Biosignal (ECG) Example*:
To provide insights into how this can be used in a realistic application an open-source example is provided in the https://github.com/Fraunhofer-IMS/tinyHLS/examples/ecg_example.py[ecg_example.py] file. Please make sure that you tinyHLS conda environment is activated. Then simply execute ``python ecg_example.py`` in the ``examples`` folder.

*PyTorch (PPG) Example*:
Though we recommend the use of TensorFlow Keras and depreciate the use of PyTorch, a PyTorch example was included in the https://github.com/Fraunhofer-IMS/tinyHLS/examples/ppg_example.py[ppg_example.py] file. Since other packages are required, it is neccessary to create a new environment using

$ cd examples/
$ conda env create -f environment_torch.yml
$ conda activate tinyHLS_torch

As usual, the example can then be executed with ``python ppg_example.py``. Please note that the wrapper function ``convert_model_to_json()`` simply exchanges the layer names from PyTorch to the TensorFlow Keras naming scheme. Hence, it is considered experimental and not part of tinyHLS yet.

=== Requirements

Expand Down
Loading

0 comments on commit 3130753

Please sign in to comment.