import "primitives/core.futil"; import "primitives/binary_operators.futil"; /** * Checks to see if the FSM generated for seq activates a component for * exactly the right amount of time. * Regression: https://github.com/cucapra/calyx/pull/446 */ component main() -> () { cells { @external(1) x = std_mem_d1(32, 1, 1); @external(1) y = std_mem_d1(32, 1, 1); @external(1) z = std_mem_d1(32, 1, 1); mult_pipe0 = std_mult_pipe(32); } wires { group let1<"static"=4> { mult_pipe0.left = 32'd10; mult_pipe0.right = 32'd20; mult_pipe0.go = !mult_pipe0.done ? 1'd1; x.write_data = mult_pipe0.out; x.addr0 = 1'd0; x.write_en = mult_pipe0.done; let1[done] = x.done; } group let2<"static"=4> { mult_pipe0.left = 32'd30; mult_pipe0.right = 32'd40; mult_pipe0.go = !mult_pipe0.done ? 1'd1; y.write_data = mult_pipe0.out; y.addr0 = 1'd0; y.write_en = mult_pipe0.done; let2[done] = y.done; } group let3<"static"=4> { mult_pipe0.left = 32'd50; mult_pipe0.right = 32'd60; mult_pipe0.go = !mult_pipe0.done ? 1'd1; z.write_data = mult_pipe0.out; z.addr0 = 1'd0; z.write_en = mult_pipe0.done; let3[done] = z.done; } } control { seq { let1; let2; let3; } } }