aboutsummaryrefslogtreecommitdiff
path: root/src/main/scala
diff options
context:
space:
mode:
authorCarlos Eduardo2021-11-23 22:22:55 -0300
committerGitHub2021-11-23 17:22:55 -0800
commit82da33135fcac1a81e8ea95f47626e80b4e80fd1 (patch)
tree5a219f37de33e4c25290f08fd99858b44042f0b6 /src/main/scala
parent19bfd946d5e8b19ee713d70686bba942471cfb6f (diff)
Enable memory initialization in synthesis for FPGA targets (#2430)
Diffstat (limited to 'src/main/scala')
-rw-r--r--src/main/scala/firrtl/stage/FirrtlCompilerTargets.scala6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/main/scala/firrtl/stage/FirrtlCompilerTargets.scala b/src/main/scala/firrtl/stage/FirrtlCompilerTargets.scala
index 662f3dc0..e31acbbf 100644
--- a/src/main/scala/firrtl/stage/FirrtlCompilerTargets.scala
+++ b/src/main/scala/firrtl/stage/FirrtlCompilerTargets.scala
@@ -5,6 +5,7 @@ package firrtl.stage
import firrtl.transforms._
import firrtl.passes.memlib._
import firrtl.options.{HasShellOptions, ShellOption}
+import firrtl.annotations.MemorySynthInit
/**
* This flag enables a set of options that guide the FIRRTL compilation flow to ultimately generate Verilog that is
@@ -31,6 +32,8 @@ import firrtl.options.{HasShellOptions, ShellOption}
* 5) Add a [[firrtl.passes.memlib.PassthroughSimpleSyncReadMemsAnnotation]] to allow some synchronous-read memories
* and readwrite ports to pass through [[firrtl.passes.memlib.VerilogMemDelays]] without introducing explicit
* pipeline registers or splitting ports.
+ *
+ * 6) Add a [[firrtl.annotations.MemorySynthInit]] to enable memory initialization values to be synthesized.
*/
object OptimizeForFPGA extends HasShellOptions {
private val fpgaAnnos = Seq(
@@ -40,7 +43,8 @@ object OptimizeForFPGA extends HasShellOptions {
DefaultReadFirstAnnotation,
RunFirrtlTransformAnnotation(new SetDefaultReadUnderWrite),
RunFirrtlTransformAnnotation(new SimplifyMems),
- PassthroughSimpleSyncReadMemsAnnotation
+ PassthroughSimpleSyncReadMemsAnnotation,
+ MemorySynthInit
)
val options = Seq(
new ShellOption[Unit](