tancheng / VectorCGRA

CGRA framework with vectorization support.
BSD 3-Clause "New" or "Revised" License
19 stars 11 forks source link

Installation and Data Preloading Issue #11

Open shourovrm opened 1 year ago

shourovrm commented 1 year ago

Hi Tan!

1) Installation instructions considering the current changes

I have been checking your CGRA-Flow repository (alongside its sub-modules like VectorCGRA, CGRA-Mapper etc.) for the past few months. Its great to see that you have integrated vcd generation recently. However, I've noticed that the current installation instructions for both VectorCGRA are outdated due to these new changes.

For example, when testing the TileRTL_test.py, it seems that the mentioned version of pymtl3 in the README does not include the VerilogTranslationPass package (it rather has the TranslationImportPass package).

So, could you please update the installation instructions by specifying the correct pymtl3 version that you are using? It would also be great if the mentioned docker container is also updated to integrate the changes.

2) Preloading data to CGRA

I previously formulated a simpler design flow, which uses the config.json generated by CGRA-Mapper, pass its src_opt following the CGRATemplateRTL_test, and later generate VCD files from it.

However, I'm struggling to figure out how to preload data into the tiles and the SPM. Specifically, I tried preloading constants and input values for the FIR test but was unable to see these values in the generated VCD file. On the other hand, simpler tests like VectorAdderRTL_test show both input and output data clearly in the VCD.

Would you please provide some guidance or documentation on how to preload data into the CGRA tiles and SPM for and test its output?

tancheng commented 1 year ago

Hi shourovrm,

1) We will use the updated PyMTL (i.e., pip install -U git+https://github.com/cornell-brg/pymtl3@yo-struct-list-fix) for modeling and translation. The TileRTL_test.py should be able to generate Verilog, please make sure the --test-verilog is attached after the TileRTL_test.py, for example, pytest --tb=short -sv ../TileRTL_test.py --test-verilog. If it still doesn't work, please let me know. I will update the README next month to make it more clear. For the docker, I am not sure whether it requires this latest change. The docker is just to show the demo with the previous version and it should work with the old version. But I will try to update all the related stuff if i have time.

2) For data preloading into SPM, it should okay if the preload data can be sent through the pytest. However, I didn't test it with the RTL version, the provided FIR test is in CL rather than RTL. Do you try the FIR in RTL simulation? The input/output can be seen in AdderRTL as the data is sent into the port and sent out via the outport. However, in the CGRA modeling, the inputs for now is like constants/wires implicitly writing into the data memory/registers. It is not like a data sent into a port then update the SPM in each cycle. I guess that's why the VCD doesn't include it. In short, the current design doesn't model the data preloading in a good way. We can think about how to make an appropriate design for the data feeding. For your kernel test/verification, you need to check whether the final data/value stored in the specific address/location in the SPM is expected or not, which is similar to the FIR CL test, but I am not sure how to do it by looking into VCD.

Thanks for your questions again. Will update the README.