summaryrefslogtreecommitdiff
path: root/src/test/scala/chiselTests/AnnotatingExample.scala
diff options
context:
space:
mode:
authorJim Lawson2016-12-02 12:51:03 -0800
committerGitHub2016-12-02 12:51:03 -0800
commitd3ec37edd39799e8cf039e5caed915c00dff7eeb (patch)
tree03329ddc11ca15b9d6c7f832354a9cba20c87843 /src/test/scala/chiselTests/AnnotatingExample.scala
parent1b53d893816d349f5ea18fa0ed13325b9f1b6917 (diff)
parenteba224e524b249207b47a3b378458c61c9b66e2c (diff)
Merge branch 'master' into exceptionfix
Diffstat (limited to 'src/test/scala/chiselTests/AnnotatingExample.scala')
-rw-r--r--src/test/scala/chiselTests/AnnotatingExample.scala26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/test/scala/chiselTests/AnnotatingExample.scala b/src/test/scala/chiselTests/AnnotatingExample.scala
index c84edf86..0be3ba59 100644
--- a/src/test/scala/chiselTests/AnnotatingExample.scala
+++ b/src/test/scala/chiselTests/AnnotatingExample.scala
@@ -24,8 +24,8 @@ import scala.util.DynamicVariable
class SomeSubMod(param1: Int, param2: Int) extends Module {
val io = new Bundle {
- val in = UInt(INPUT, 16)
- val out = SInt(OUTPUT, 32)
+ val in = Input(UInt(16.W))
+ val out = Output(SInt(32.W))
}
val annotate = MyBuilder.myDynamicContext.annotationMap
@@ -36,18 +36,18 @@ class SomeSubMod(param1: Int, param2: Int) extends Module {
class AnnotatingExample extends Module {
val io = new Bundle {
- val a = UInt(INPUT, 32)
- val b = UInt(INPUT, 32)
- val e = Bool(INPUT)
- val z = UInt(OUTPUT, 32)
- val v = Bool(OUTPUT)
+ val a = Input(UInt(32.W))
+ val b = Input(UInt(32.W))
+ val e = Input(Bool())
+ val z = Output(UInt(32.W))
+ val v = Output(Bool())
val bun = new Bundle {
- val nested_1 = UInt(INPUT, 12)
- val nested_2 = Bool(OUTPUT)
+ val nested_1 = Input(UInt(12.W))
+ val nested_2 = Output(Bool())
}
}
- val x = Reg(UInt(width = 32))
- val y = Reg(UInt(width = 32))
+ val x = Reg(UInt(32.W))
+ val y = Reg(UInt(32.W))
val subModule1 = Module(new SomeSubMod(1, 2))
val subModule2 = Module(new SomeSubMod(3, 4))
@@ -141,5 +141,5 @@ object MyDriver extends BackendCompilationUtilities {
/**
* illustrates a chisel3 style driver that, annotations can only processed within this structure
*/
- def buildAnnotatedCircuit[T <: Module](gen: () => T): Map[String, String] = MyBuilder.build(Module(gen()))
-} \ No newline at end of file
+ def buildAnnotatedCircuit[T <: Module](gen: () => T): Map[String, String] = MyBuilder.build(gen())
+}