Skip to content

Commit

Permalink
use CHECK DAG to ensure the sequential checking of each line
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahanxie353 committed Nov 15, 2024
1 parent 3e3c508 commit 5e94ef3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion test/Dialect/Calyx/emit.mlir
Original file line number Diff line number Diff line change
Expand Up @@ -286,11 +286,13 @@ module attributes {calyx.entrypoint = "main"} {
module attributes {calyx.entrypoint = "main"} {
// CHECK: import "primitives/float/addFN.futil";
calyx.component @main(%in0: i32, %clk: i1 {clk}, %reset: i1 {reset}, %go: i1 {go}) -> (%out0: i32, %done: i1 {done}) {
// CHECK: std_addFN_0 = std_addFN(8, 24, 32);
// CHECK-DAG: cst_0 = std_float_const(0, 32, 4.200000);
%cst = calyx.constant @cst_0 <4.200000e+00 : f32> : i32
%true = hw.constant true
%false = hw.constant false
// CHECK-DAG: addf_0_reg = std_reg(32);
%addf_0_reg.in, %addf_0_reg.write_en, %addf_0_reg.clk, %addf_0_reg.reset, %addf_0_reg.out, %addf_0_reg.done = calyx.register @addf_0_reg : i32, i1, i1, i1, i32, i1
// CHECK-DAG: std_addFN_0 = std_addFN(8, 24, 32);
%std_addFN_0.clk, %std_addFN_0.reset, %std_addFN_0.go, %std_addFN_0.control, %std_addFN_0.subOp, %std_addFN_0.left, %std_addFN_0.right, %std_addFN_0.roundingMode, %std_addFN_0.out, %std_addFN_0.exceptionalFlags, %std_addFN_0.done = calyx.ieee754.add @std_addFN_0 : i1, i1, i1, i1, i1, i32, i32, i3, i32, i5, i1
%ret_arg0_reg.in, %ret_arg0_reg.write_en, %ret_arg0_reg.clk, %ret_arg0_reg.reset, %ret_arg0_reg.out, %ret_arg0_reg.done = calyx.register @ret_arg0_reg : i32, i1, i1, i1, i32, i1
calyx.wires {
Expand Down Expand Up @@ -338,9 +340,12 @@ module attributes {calyx.entrypoint = "main"} {
module attributes {calyx.entrypoint = "main"} {
// CHECK: import "primitives/float/mulFN.futil";
calyx.component @main(%in0: i32, %clk: i1 {clk}, %reset: i1 {reset}, %go: i1 {go}) -> (%out0: i32, %done: i1 {done}) {
// CHECK-DAG: cst_0 = std_float_const(0, 32, 4.200000);
%cst = calyx.constant @cst_0 <4.200000e+00 : f32> : i32
%true = hw.constant true
// CHECK-DAG: mulf_0_reg = std_reg(32);
%mulf_0_reg.in, %mulf_0_reg.write_en, %mulf_0_reg.clk, %mulf_0_reg.reset, %mulf_0_reg.out, %mulf_0_reg.done = calyx.register @mulf_0_reg : i32, i1, i1, i1, i32, i1
// CHECK-DAG: std_mulFN_0 = std_mulFN(8, 24, 32);
%std_mulFN_0.clk, %std_mulFN_0.reset, %std_mulFN_0.go, %std_mulFN_0.control, %std_mulFN_0.left, %std_mulFN_0.right, %std_mulFN_0.roundingMode, %std_mulFN_0.out, %std_mulFN_0.exceptionalFlags, %std_mulFN_0.done = calyx.ieee754.mul @std_mulFN_0 : i1, i1, i1, i1, i32, i32, i3, i32, i5, i1
%ret_arg0_reg.in, %ret_arg0_reg.write_en, %ret_arg0_reg.clk, %ret_arg0_reg.reset, %ret_arg0_reg.out, %ret_arg0_reg.done = calyx.register @ret_arg0_reg : i32, i1, i1, i1, i32, i1
calyx.wires {
Expand Down

0 comments on commit 5e94ef3

Please sign in to comment.