KFAFSP / base2-mlir

MLIR dialects for binary number representations.
ISC License
5 stars 0 forks source link

Fixed-point PoC #11

Open KFAFSP opened 1 year ago

KFAFSP commented 1 year ago

We want to create a fixed-point only PoC implementation that incorporates the new design and specification elements.

KFAFSP commented 1 year ago

This would also have to incorporate the change to the limits on E for fixed-point!

HahaLan97 commented 1 year ago

What I've done:

func.func @test(%arg0: !type1, %arg1: !type2) -> !type3 { %0 = base2.fixed.add %arg0, %arg1 : !type1, !type2 return %0 : !type3 }

func.func @test(%arg0: i6, %arg1: i4) -> i7 { %0 = arith.extsi %arg0 : i6 to i7 %1 = arith.extui %arg1 : i4 to i7 %2 = arith.addi %0, %1 : i7 return %2 : i7 }



What still needs to think of:

- [ ] fixed.op's return type
- [ ] #6 -> How to deal with rounding modes.
- [ ] elaborator methods
- [ ] other ops to add