diff options
| author | Andrew Waterman | 2016-01-17 17:20:49 -0800 |
|---|---|---|
| committer | Andrew Waterman | 2016-01-23 21:14:19 -0800 |
| commit | 34a1abcd81bd3b2d7d264468345572009edfad27 (patch) | |
| tree | 0dbaa05d8142d370d4df35d6999416325e1c0c99 /src/main/scala/Chisel/internal/Builder.scala | |
| parent | 86a6c6bcdc349f40dcc31bce1931dc7c427da674 (diff) | |
Implement first draft of new FIRRTL changes
Diffstat (limited to 'src/main/scala/Chisel/internal/Builder.scala')
| -rw-r--r-- | src/main/scala/Chisel/internal/Builder.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/scala/Chisel/internal/Builder.scala b/src/main/scala/Chisel/internal/Builder.scala index 991a442f..7e72b5e1 100644 --- a/src/main/scala/Chisel/internal/Builder.scala +++ b/src/main/scala/Chisel/internal/Builder.scala @@ -50,7 +50,8 @@ private[Chisel] trait HasId { private[Chisel] def setRef(imm: Arg) = _refMap.setRef(this, imm) private[Chisel] def setRef(name: String) = _refMap.setRef(this, name) private[Chisel] def setRef(parent: HasId, name: String) = _refMap.setField(parent, this, name) - private[Chisel] def setRef(parent: HasId, index: Int) = _refMap.setIndex(parent, this, index) + private[Chisel] def setRef(parent: HasId, index: Int) = _refMap.setIndex(parent, this, ILit(index)) + private[Chisel] def setRef(parent: HasId, index: UInt) = _refMap.setIndex(parent, this, index.ref) private[Chisel] def getRef = _refMap(this) } @@ -66,7 +67,7 @@ class RefMap { private[Chisel] def setField(parentid: HasId, id: HasId, name: String): Unit = _refmap(id._id) = Slot(Node(parentid), name) - private[Chisel] def setIndex(parentid: HasId, id: HasId, index: Int): Unit = + private[Chisel] def setIndex(parentid: HasId, id: HasId, index: Arg): Unit = _refmap(id._id) = Index(Node(parentid), index) def apply(id: HasId): Arg = _refmap(id._id) |
