From d0d3cd4ec4348eea381fe463ac9c96956fdd5eba Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Date: Thu, 1 Apr 2021 18:55:03 -0300 Subject: Add memory initialization options for synthesis (#2166) This PR adds options for memory initialization inside or outside the `ifndef SYNTHESIS` block.--- src/main/scala/firrtl/annotations/MemoryInitAnnotation.scala | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/scala/firrtl/annotations/MemoryInitAnnotation.scala') diff --git a/src/main/scala/firrtl/annotations/MemoryInitAnnotation.scala b/src/main/scala/firrtl/annotations/MemoryInitAnnotation.scala index 62dc96f4..1e81301d 100644 --- a/src/main/scala/firrtl/annotations/MemoryInitAnnotation.scala +++ b/src/main/scala/firrtl/annotations/MemoryInitAnnotation.scala @@ -52,3 +52,9 @@ case class MemoryFileInlineAnnotation( override def initValue: MemoryInitValue = MemoryFileInlineInit(filename, hexOrBinary) override def isRandomInit: Boolean = false } + +/** Initializes the memory inside the `ifndef SYNTHESIS` block (default) */ +case object MemoryNoSynthInit extends NoTargetAnnotation + +/** Initializes the memory outside the `ifndef SYNTHESIS` block */ +case object MemorySynthInit extends NoTargetAnnotation -- cgit v1.2.3