Skip to content

Commit

Permalink
Add the queue to the loop rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
ymherklotz committed Jan 27, 2025
1 parent c205c7c commit ad6f64f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions DataflowRewriter/Rewrites/LoopRewrite.lean
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ def lhs (T : Type) [Inhabited T] (Tₛ : String) (f : T → T × Bool)
o_out [type = "io"];

mux [typeImp = $(⟨_, mux T⟩), type = $("mux " ++ Tₛ)];
condition_fork [typeImp = $(⟨_, fork2 Bool ⟩), type = "fork2 Bool"];
condition_fork [typeImp = $(⟨_, fork Bool 2 ⟩), type = "fork Bool 2"];
branch [typeImp = $(⟨_, branch T⟩), type = $("branch " ++ Tₛ)];
tag_split [typeImp = $(⟨_, split T Bool⟩), type = $("split " ++ Tₛ ++ " Bool")];
mod [typeImp = $(⟨_, pure f⟩), type = "pure f"];
loop_init [typeImp = $(⟨_, init Bool false⟩), type = "init Bool false"];
bag [typeImp = $(⟨_, bag T⟩), type = $("bag " ++ Tₛ)];
queue [typeImp = $(⟨_, queue T⟩), type = $("queue " ++ Tₛ)];

i_in -> mux [to="in3"];
bag -> o_out [from="out1"];
Expand All @@ -51,7 +52,8 @@ def lhs (T : Type) [Inhabited T] (Tₛ : String) (f : T → T × Bool)
tag_split -> branch [from="out1", to="in1"];
tag_split -> condition_fork [from="out2", to="in1"];
mux -> mod [from="out1", to="in1"];
branch -> mux [from="out1", to="in2"];
branch -> queue [from="out1", to="in1"];
queue -> mux [from="out1", to="in2"];
branch -> bag [from="out2", to="in1"];
]

Expand Down

0 comments on commit ad6f64f

Please sign in to comment.