calyx icon indicating copy to clipboard operation
calyx copied to clipboard

Improving the Data Gen tool

Open calebmkim opened this issue 2 years ago • 0 comments

Currently, we have a tool in tools/data_gen which can generate a json file of memories from a .futil file. #1003 gives the tool the power to generate just unsigned, 32-bit values in memory, which are initialized to 0. #1154 gives the tool the ability to generate signed, fixed point values in memory, and the numbers are randomly generated (currently it only generates fixed point numbers w/ a frac width of 16), by passing a -f true flag.

This is not ideal. What we would ideally want is for frontends to generate Calyx codes with attributes attached to memory like so:

@fp_width(32) @int_width(16) mem = std_mem_d1(...)

In this scenario, the data_gen tool no longer has to have a flag passed to it to know which memory values to generate. It will know whether the memory values should be signed/unsigned, fixedpoint/bitnum, etc., based on the memory's attributes. Perhaps the only thing that will be passed as a flag is whether data should be 0 or randomized.

calebmkim avatar Sep 04 '22 22:09 calebmkim