summaryrefslogtreecommitdiff
path: root/src/main/scala/Chisel/Core.scala
diff options
context:
space:
mode:
authorHenry Cook2015-08-03 19:28:50 -0700
committerHenry Cook2015-08-03 19:39:24 -0700
commit8e856389bd4a11f7d9a269faf32b47b5afc61a70 (patch)
tree5ec84a1ce3d64108db6197993e26da8f889d9b3e /src/main/scala/Chisel/Core.scala
parentbf72a6a7fd747a267d4264ac2d532bb02407f7c6 (diff)
Improve type-safety of switch/is blocks using macros and SwitchContext. Removed switch key stack.
Diffstat (limited to 'src/main/scala/Chisel/Core.scala')
-rw-r--r--src/main/scala/Chisel/Core.scala12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/main/scala/Chisel/Core.scala b/src/main/scala/Chisel/Core.scala
index d9d7cf38..a3483c82 100644
--- a/src/main/scala/Chisel/Core.scala
+++ b/src/main/scala/Chisel/Core.scala
@@ -16,14 +16,6 @@ class IdGen {
object Builder {
val components = new ArrayBuffer[Component]()
val idGen = new IdGen
- val switchKeyz = new Stack[Stack[Bits]]()
- def switchKeys = switchKeyz.top
- def pushScope = {
- switchKeyz.push(new Stack[Bits]())
- }
- def popScope = {
- switchKeyz.pop()
- }
val modulez = new Stack[Module]()
def pushModule(mod: Module) {
modulez.push(mod)
@@ -993,7 +985,6 @@ object Module {
val m = bc
m.setRefs
val cmd = popCommands
- popScope
popModule
val ports = m.computePorts
val component = Component(m.name, ports, cmd)
@@ -1017,7 +1008,6 @@ abstract class Module(_clock: Clock = null, _reset: Bool = null) extends Id {
val name = globalNamespace.name(getClass.getName.split('.').last)
pushModule(this)
- pushScope
pushCommands
val params = Module.params
@@ -1091,11 +1081,9 @@ abstract class BlackBox(_clock: Clock = null, _reset: Bool = null) extends Modul
object when {
private[Chisel] def execBlock(block: => Unit): Command = {
- pushScope
pushCommands
block
val cmd = popCommands
- popScope
cmd
}
def apply(cond: => Bool)(block: => Unit): when = {