From 41674d5e130f64d7489fdb8583b8f4ad88b64aeb Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Thu, 28 Jan 2016 12:05:03 -0800 Subject: Use FIRRTL is invalid construct --- src/main/scala/Chisel/Data.scala | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'src/main/scala/Chisel/Data.scala') diff --git a/src/main/scala/Chisel/Data.scala b/src/main/scala/Chisel/Data.scala index 1011fe47..0ac3ee32 100644 --- a/src/main/scala/Chisel/Data.scala +++ b/src/main/scala/Chisel/Data.scala @@ -119,7 +119,7 @@ object Wire { if (init != null) { x := init } else { - x.flatten.foreach(e => e := e.fromInt(0)) + pushCommand(DefInvalid(x.ref)) } x } @@ -141,11 +141,3 @@ sealed class Clock(dirArg: Direction) extends Element(dirArg, Width(1)) { case _ => this badConnect that } } - -// TODO: check with FIRRTL specs, how much official implementation flexibility -// is there? -/** A source of garbage data, used to initialize Wires to a don't-care value. */ -private object Poison extends Command { - def apply[T <: Data](t: T): T = - pushCommand(DefPoison(t.cloneType)).id -} -- cgit v1.2.3