circt icon indicating copy to clipboard operation
circt copied to clipboard

[SCFToCalyx] Memory banking for Calyx

Open jiahanxie353 opened this issue 1 year ago • 5 comments

Breaking down #7409

This patch will support memory banking in Calyx by user specifying the number of available banks for each memory (in the order they are declared in the source .mlir file) in a json file

jiahanxie353 avatar Oct 06 '24 19:10 jiahanxie353

This should be done using attributes on memories. An extra JSON file that lives separate from the source program seems unnecessary

rachitnigam avatar Oct 06 '24 20:10 rachitnigam

This should be done using attributes on memories. An extra JSON file that lives separate from the source program seems unnecessary

I agree, and I have thought of that, too. The cons are users have to go to the source .mlir file and manually insert attributes like {calyx.num_banks = n} to each memref::alloc, memref::alloca, memref::getglobal, etc. I thought JSON could be a automated way, but using attributes does make more sense.

And I'd appreciate it if anyone could let me know that attribute insertion can be automated.

jiahanxie353 avatar Oct 07 '24 03:10 jiahanxie353

And I'd appreciate it if anyone could let me know that attribute insertion can be automated.

Attributes can be automatically inserted by frontends.

rachitnigam avatar Oct 07 '24 14:10 rachitnigam

Attributes can be automatically inserted by frontends.

That's great!

And just removed the needs for passing JSON and now only relies on attributes on memory allocations

jiahanxie353 avatar Oct 07 '24 15:10 jiahanxie353

Cool! Can you add tests and fix the failures? I can review it then and we can merge after the review.

rachitnigam avatar Oct 07 '24 17:10 rachitnigam