aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/firrtlTests/ReplSeqMemTests.scala
diff options
context:
space:
mode:
authorJack Koenig2018-02-27 18:07:11 -0800
committerGitHub2018-02-27 18:07:11 -0800
commitc7eb1570dfb1c7701ea32d1209982a053f3cec1d (patch)
tree3f509b202d82841c5dad5588d1f953a25d389b44 /src/test/scala/firrtlTests/ReplSeqMemTests.scala
parentb90fc784a1819c1d7905910130a7da022214bc22 (diff)
Refactor Annotations (#721)
- Old Annotation renamed to deprecated LegacyAnnotation - Annotation is now a trait that can be extended - New JsonProtocol for Annotation [de]serialization - Replace AnnotationMap with AnnotationSeq - Deprecate Transform.getMyAnnotations - Update Transforms - Turn on deprecation warnings - Remove deprecated Driver.compile - Make AnnotationTests abstract with Legacy and Json subclasses - Add functionality to convert LegacyAnnotations of built-in annos This will give a noisy warning and is more of a best effort than a robust solution. Fixes #475 Closes #609
Diffstat (limited to 'src/test/scala/firrtlTests/ReplSeqMemTests.scala')
-rw-r--r--src/test/scala/firrtlTests/ReplSeqMemTests.scala36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/test/scala/firrtlTests/ReplSeqMemTests.scala b/src/test/scala/firrtlTests/ReplSeqMemTests.scala
index 7cbfeafe..dcc23235 100644
--- a/src/test/scala/firrtlTests/ReplSeqMemTests.scala
+++ b/src/test/scala/firrtlTests/ReplSeqMemTests.scala
@@ -63,8 +63,8 @@ circuit Top :
io2.commit_entry.bits.info <- R1
""".stripMargin
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(ReplSeqMemAnnotation("-c:Top:-o:"+confLoc)))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(ReplSeqMemAnnotation.parse("-c:Top:-o:"+confLoc))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
println(res.annotations)
parse(res.getEmittedCircuit.value)
@@ -86,8 +86,8 @@ circuit Top :
write mport T_155 = mem[p_address], clock
""".stripMargin
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(ReplSeqMemAnnotation("-c:Top:-o:"+confLoc)))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(ReplSeqMemAnnotation.parse("-c:Top:-o:"+confLoc))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
parse(res.getEmittedCircuit.value)
(new java.io.File(confLoc)).delete()
@@ -111,8 +111,8 @@ circuit CustomMemory :
skip
""".stripMargin
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(ReplSeqMemAnnotation("-c:CustomMemory:-o:"+confLoc)))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(ReplSeqMemAnnotation.parse("-c:CustomMemory:-o:"+confLoc))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
parse(res.getEmittedCircuit.value)
(new java.io.File(confLoc)).delete()
@@ -136,8 +136,8 @@ circuit CustomMemory :
skip
""".stripMargin
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(ReplSeqMemAnnotation("-c:CustomMemory:-o:"+confLoc)))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(ReplSeqMemAnnotation.parse("-c:CustomMemory:-o:"+confLoc))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
parse(res.getEmittedCircuit.value)
(new java.io.File(confLoc)).delete()
@@ -209,10 +209,10 @@ circuit CustomMemory :
skip
"""
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(
- ReplSeqMemAnnotation("-c:CustomMemory:-o:"+confLoc),
- NoDedupMemAnnotation(ComponentName("mem_0", ModuleName("CustomMemory",CircuitName("CustomMemory"))))))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(
+ ReplSeqMemAnnotation.parse("-c:CustomMemory:-o:"+confLoc),
+ NoDedupMemAnnotation(ComponentName("mem_0", ModuleName("CustomMemory",CircuitName("CustomMemory")))))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
val circuit = parse(res.getEmittedCircuit.value)
val numExtMods = circuit.modules.count {
@@ -249,10 +249,10 @@ circuit CustomMemory :
skip
"""
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(
- ReplSeqMemAnnotation("-c:CustomMemory:-o:"+confLoc),
- NoDedupMemAnnotation(ComponentName("mem_1", ModuleName("CustomMemory",CircuitName("CustomMemory"))))))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(
+ ReplSeqMemAnnotation.parse("-c:CustomMemory:-o:"+confLoc),
+ NoDedupMemAnnotation(ComponentName("mem_1", ModuleName("CustomMemory",CircuitName("CustomMemory")))))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
val circuit = parse(res.getEmittedCircuit.value)
val numExtMods = circuit.modules.count {
@@ -285,8 +285,8 @@ circuit CustomMemory :
skip
"""
val confLoc = "ReplSeqMemTests.confTEMP"
- val aMap = AnnotationMap(Seq(ReplSeqMemAnnotation("-c:CustomMemory:-o:"+confLoc)))
- val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, Some(aMap)))
+ val annos = Seq(ReplSeqMemAnnotation.parse("-c:CustomMemory:-o:"+confLoc))
+ val res = compileAndEmit(CircuitState(parse(input), ChirrtlForm, annos))
// Check correctness of firrtl
val circuit = parse(res.getEmittedCircuit.value)
val numExtMods = circuit.modules.count {