HLS writer (& others) rewrite
Created by: vloncar
This includes a major rewrite of most components of the translation, discussed in #120 (closed). It introduces a new object model in hls_model.py
which will (hopefully) simplify adding support for new nets/layers. As a result, hls_writer.py
is now a significantly simpler.
The changes include support for multiple inputs/outputs (#104 (closed)), move to flattened arrays everywhere, treating of all activations as layers and I also removed sublayer support (in anticipation of a better alternative). As a result, keras-to-hls.py
has also seen some cleanups.
I have tested it and it produces the same results in C simulation and same usage/latency numbers in synthesis.
I am sorry this is all one big changeset, but it was very hard to track all upstream changes and rebase every time, so I have mostly developed this as separate files which were then just renamed and placed over existing ones in the end.