diff options
| author | Jack Koenig | 2020-08-15 10:16:28 -0700 |
|---|---|---|
| committer | GitHub | 2020-08-15 10:16:28 -0700 |
| commit | f1c314e6c7e116df33ffc215ec907212037292dc (patch) | |
| tree | f06060e9fb52f4f5b30bc56db78acb6bd371642d /src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala | |
| parent | 2e5f942d25d7afab79ee1263c5d6833cad9d743d (diff) | |
| parent | 9adbe1ede59f9aeb25e71fd8318a4e7e46c4cc34 (diff) | |
Merge pull request #1852 from freechipsproject/format-src-4
Apply Scalafmt Rewriting
Diffstat (limited to 'src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala')
| -rw-r--r-- | src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala b/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala index 64c30bdb..043c1b3b 100644 --- a/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala +++ b/src/main/scala/firrtl/annotations/LoadMemoryAnnotation.scala @@ -21,7 +21,7 @@ object MemoryLoadFileType { def deserialize(s: String): MemoryLoadFileType = s match { case "h" => MemoryLoadFileType.Hex case "b" => MemoryLoadFileType.Binary - case _ => throw new FirrtlUserException(s"Unrecognized MemoryLoadFileType: $s") + case _ => throw new FirrtlUserException(s"Unrecognized MemoryLoadFileType: $s") } } @@ -31,11 +31,11 @@ object MemoryLoadFileType { * @param hexOrBinary use `\$readmemh` or `\$readmemb` */ case class LoadMemoryAnnotation( - target: ComponentName, - fileName: String, - hexOrBinary: MemoryLoadFileType = MemoryLoadFileType.Hex, - originalMemoryNameOpt: Option[String] = None -) extends SingleTargetAnnotation[Named] { + target: ComponentName, + fileName: String, + hexOrBinary: MemoryLoadFileType = MemoryLoadFileType.Hex, + originalMemoryNameOpt: Option[String] = None) + extends SingleTargetAnnotation[Named] { val (prefix, suffix) = { fileName.split("""\.""").toList match { @@ -57,7 +57,7 @@ case class LoadMemoryAnnotation( def getPrefix: String = prefix + originalMemoryNameOpt.map(n => target.name.drop(n.length)).getOrElse("") - def getSuffix: String = suffix + def getSuffix: String = suffix def getFileName: String = getPrefix + getSuffix def duplicate(newNamed: Named): LoadMemoryAnnotation = { |
