diff options
| author | jackkoenig | 2015-12-07 20:02:05 -0800 |
|---|---|---|
| committer | jackkoenig | 2015-12-07 20:02:05 -0800 |
| commit | f93f0b2c941960943d84c03ec4a9f0f0ba6c98b5 (patch) | |
| tree | 7461277faa5ec4752cda791a0cab5d86dd177ccf /src | |
| parent | d7642f786882a0b4cb5d7c62d28b3711327d82e7 (diff) | |
Fixed bug, I think transformation works now for the most part
Diffstat (limited to 'src')
| -rw-r--r-- | src/main/scala/firrtl/Driver.scala | 6 | ||||
| -rw-r--r-- | src/main/scala/midas/Fame.scala | 8 |
2 files changed, 9 insertions, 5 deletions
diff --git a/src/main/scala/firrtl/Driver.scala b/src/main/scala/firrtl/Driver.scala index e8ad8d56..7887d87f 100644 --- a/src/main/scala/firrtl/Driver.scala +++ b/src/main/scala/firrtl/Driver.scala @@ -67,7 +67,8 @@ object Driver //writer.close() // Lower-to-Ground with Stanza FIRRTL - val temp1 = genTempFilename(input) + //val temp1 = genTempFilename(input) + val temp1 = input + ".1.tmp" val preCmd = Seq("firrtl-stanza", "-i", input, "-o", temp1, "-b", "firrtl") ++ stanzaPreTransform.flatMap(Seq("-x", _)) println(preCmd.mkString(" ")) preCmd.! @@ -77,7 +78,8 @@ object Driver val ast2 = inferTypes(ast)(logger) // FAME-1 Transformation - val temp2 = genTempFilename(input) + //val temp2 = genTempFilename(input) + val temp2 = input + ".2.tmp" val writer = new PrintWriter(new File(temp2)) val ast3 = Fame1.transform(ast2) writer.write(ast3.serialize()) diff --git a/src/main/scala/midas/Fame.scala b/src/main/scala/midas/Fame.scala index 49cdb613..aedadba5 100644 --- a/src/main/scala/midas/Fame.scala +++ b/src/main/scala/midas/Fame.scala @@ -43,7 +43,8 @@ import firrtl.Utils._ * v. Connect target IO to wrapper IO, except connect target clock to simClock * * TODO - * - Change from clock gating to reg enable, dont' forget to change sequential memory read enable + * - Is it okay to have ready signals for input queues depend on valid signals for those queues? This is generally bad + * - Change sequential memory read enable to work with targetFire * - Implement Flatten RTL * - Refactor important strings/naming to API (eg. "topIO" needs to be a constant defined somewhere or something) * - Check that circuit is in LowFIRRTL? @@ -199,10 +200,11 @@ object Fame1 { val defTargetFire = DefNode(inst.info, targetFire.name, genPrimopReduce(And, targetFireInputs)) val connectTargetFire = Connect(NoInfo, buildExp(Seq(inst.name, targetFire.name)), buildExp(targetFire.name)) - // As a simple RTL module, we're always ready + // Only consume tokens when the module fires + // TODO is it bad to have the input readys depend on the input valid signals? val inputsReady = (connPorts map { port => getFields(port) filter (_.dir == Reverse) map { field => // filter to only take inputs - Connect(inst.info, buildExp(Seq(port.name, field.name, hostReady.name)), UIntValue(1, IntWidth(1))) + Connect(inst.info, buildExp(Seq(port.name, field.name, hostReady.name)), buildExp(targetFire.name)) } }).flatten |
