Last active
December 6, 2023 14:32
-
-
Save sampsyo/65caf754d5dfa851699dae9767281448 to your computer and use it in GitHub Desktop.
partially reduced test case for a Calyx pretty printer bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "primitives/core.futil"; | |
component stats(flow: 0, @go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { | |
cells { | |
count_0_sto = std_reg(0); | |
eq_1 = std_eq(0); | |
} | |
wires { | |
group count_0_sto_incr_group { | |
count_0_sto.write_en = 1'd1; | |
} | |
comb group eq_1_group { | |
} | |
} | |
control { | |
if eq_1.out with eq_1_group { | |
count_0_sto_incr_group; | |
} else { | |
seq { | |
} | |
} | |
} | |
} | |
component e(@go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { | |
cells { | |
stats = stats(); | |
flow = std_reg(0); | |
len = std_reg(0); | |
eq_4 = std_eq(0); | |
} | |
wires { | |
group len_incr_group { | |
len_incr_group[done] = len.done; | |
} | |
} | |
control { | |
par { | |
if eq_4.out { | |
if eq_4.out { | |
seq { | |
if flow.out { | |
par { | |
len_incr_group; | |
invoke stats( | |
flow = flow.out | |
)(); | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
} | |
component main(@go go: 1, @clk clk: 1, @reset reset: 1) -> (@done done: 1) { | |
cells {} | |
wires {} | |
control {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment