[Verilog] XLS-Based Arith/Math Unit Generator #265
Replies: 5 comments
-
|
Thank you for your suggestion! I have two questions:
Another point is that FloPoCo developers are currently working on a Verilog version. However, there is no precise timeline. A concern would be an additional dependency which might not be useful in the long run. |
Beta Was this translation helpful? Give feedback.
-
|
Flopoco: Other than frequency regulation/XLS only for FPU: |
Beta Was this translation helpful? Give feedback.
-
|
Yeah for the first point in any case yes. For the second point, it could also not be a dependency. Dynamatic could also work without the presence of XLS. The dynamic/static integration would be a plug-in. |
Beta Was this translation helpful? Give feedback.
-
Yeah it is more like a plugin: we just need to download the pre-compiled releases (no need to include anything). |
Beta Was this translation helpful? Give feedback.
-
|
Also just want to note: Flopoco also doesn't cover all the arith/math ops we need, it misses implementations for |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
[Verilog] XLS-Based Arith/Math Unit Generator
Overview
Unlike flopoco for VHDL, there is no dedicated arith/math generator for Verilog. XLS is a solid synthesis tool for mid-level synthesis. We write DSL (called "dslx") to generate Verilog there. It has some extremely useful features for Dynamatic:
communicate with external world using the same handshake protocol as we do.
XLS is also extensively fuzzed and has very few bugs.
As an example, consider the following XLS proc written in dslx, which implements an FP adder (thanks @schilkp for writing this):
XLS can automatically convert it into a dataflow unit that works out of the box in our circuit (except the port names are not exactly the same):
Currently, all the FP units have fixed implementation (only one circuit instance that might only work for one frequency); we could utilize XLS to customize the generation of those units for required maximum frequency.
Proposed Changes
Here is an overview on how we are going to use XLS in our HLS flow:
addf,mulf, etc.).Detail 1: Unit Generator for Everything
Now it is more sensible to have a generator per each module. For instance, in the
rtl-config-verilog.json, we could have something like:{ "name": "handshake.addf", "parameters": [ { "name": "PIPELINE_STAGES", "type": "unsigned" }, { "name": "DATA_WIDTH", "type": "unsigned", "generic": true } ], "generator": "\"$DYNAMATIC/bin/generators/addf-generator-verilog\" \"$OUTPUT_DIR/$MODULE_NAME.v\" $PIPELINE_STAGES", "hdl": "verilog" },Which calls the generator to generate a Verilog adapter and to generate FP cores using XLS:
Detail 2: Extra Dependency
Adding XLS as a dependency in Dynamatic wouldn't make the build process much more complex: we could fetch a specific XLS release when building Dynamatic.
Challenges / Discussions
Tasks:
These tasks are necessary for the circuit functionality:
rtl-config-verilog.json.These tasks are necessary for the circuit quality:
numStages = getNumPipelineStages(handshakeOp, Fmax).Beta Was this translation helpful? Give feedback.
All reactions