Skip to content

Commit

Permalink
emit loop flatten off pragmas
Browse files Browse the repository at this point in the history
  • Loading branch information
sgpthomas committed Nov 21, 2019
1 parent e05016a commit 1777f8c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/backends/VivadoBackend.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ private class VivadoBackend extends CppLike {
""".stripMargin.trim)

def unroll(n: Int): Doc = n match {
case 1 => emptyDoc
case n => value(s"#pragma HLS UNROLL factor=$n skip_exit_check") <@> line
case 1 => value(s"#pragma HLS LOOP_FLATTEN off")
case n => value(s"#pragma HLS LOOP_FLATTEN off") <@> value(s"#pragma HLS UNROLL factor=$n skip_exit_check") <@> line
}

def interfaceValid(decls: List[Decl]) =
Expand Down

0 comments on commit 1777f8c

Please sign in to comment.