circt icon indicating copy to clipboard operation
circt copied to clipboard

SCF To Calyx Support Float Add and Float SeqMemory Read/Write

Open jiahanxie353 opened this issue 1 year ago • 5 comments

This is the second patch stacking on #6952

This patch tries to legalize AddFOp and support floating point SeqMemory read/write in SCFToCalyx.

jiahanxie353 avatar Apr 25 '24 19:04 jiahanxie353

I'd like to hear more about what the story for floating point types is. There's a reason nothing in CIRCT handles them--hardware IRs work very naturally for bitvectors modeled as (signless) integer types. But floating point is a whole beast with very different hardware circuits. How does Calyx handle floats?

mikeurbach avatar Apr 26 '24 00:04 mikeurbach

I'd like to hear more about what the story for floating point types is. There's a reason nothing in CIRCT handles them--hardware IRs work very naturally for bitvectors modeled as (signless) integer types. But floating point is a whole beast with very different hardware circuits. How does Calyx handle floats?

Sure! Calyx plans to introduce floating point adders and multipliers as primitives using HardFloat

hardware IRs work very naturally for bitvectors modeled as (signless) integer types

Suppose Calyx can do floating point manipulations, then the crux lies in lowering Calyx to HW dialect. Can we convert the floating point number to the corresponding bitvector based on IEEE754 and the problem is then solved? Am I oversimplifying the prblem?

jiahanxie353 avatar Apr 26 '24 14:04 jiahanxie353

Thanks for the pointer. Yes, I think the crux of the problem is how Calyx floating points convert to bitvectors in the HW dialect. I don't think anyone in CIRCT has modeled IEEE754 floats, but if you are fine modeling them as a bitvector of the appropriate width, the core CIRCT dialects should support that.

mikeurbach avatar Apr 26 '24 16:04 mikeurbach

Thanks for the pointer. Yes, I think the crux of the problem is how Calyx floating points convert to bitvectors in the HW dialect. I don't think anyone in CIRCT has modeled IEEE754 floats, but if you are fine modeling them as a bitvector of the appropriate width, the core CIRCT dialects should support that.

Sounds good! I'm super excited to try this out!

jiahanxie353 avatar Apr 26 '24 17:04 jiahanxie353

(Hi sorry, I'm just seeing this is in draft mode. Feel free to ignore my comments.)

cgyurgyik avatar May 05 '24 00:05 cgyurgyik