Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Async Reset support for Atomics, FPU, and TLBroadcast #2362

Merged
merged 9 commits into from
Mar 27, 2020
2 changes: 1 addition & 1 deletion chisel3
14 changes: 7 additions & 7 deletions src/main/scala/tile/FPU.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

package freechips.rocketchip.tile

import Chisel._
import Chisel.{defaultCompileOptions => _, _}
import freechips.rocketchip.util.CompileOptions.NotStrictInferReset
import Chisel.ImplicitConversions._

import freechips.rocketchip.config.Parameters
Expand Down Expand Up @@ -392,7 +393,7 @@ trait HasFPUParameters {
}
}

abstract class FPUModule(implicit p: Parameters) extends CoreModule()(p) with HasFPUParameters
abstract class FPUModule(implicit val p: Parameters) extends Module with HasCoreParameters with HasFPUParameters

class FPToInt(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetimed {
class Output extends Bundle {
Expand Down Expand Up @@ -438,7 +439,6 @@ class FPToInt(implicit p: Parameters) extends FPUModule()(p) with ShouldBeRetime
when (!in.ren2) { // fcvt
val cvtType = in.typ.extract(log2Ceil(nIntTypes), 1)
intType := cvtType

val conv = Module(new hardfloat.RecFNToIN(maxExpWidth, maxSigWidth, xLen))
conv.io.in := in.in1
conv.io.roundingMode := in.rm
Expand Down Expand Up @@ -593,10 +593,9 @@ class MulAddRecFNPipe(latency: Int, expWidth: Int, sigWidth: Int) extends Module

//------------------------------------------------------------------------
//------------------------------------------------------------------------
val mulAddRecFNToRaw_preMul =
Module(new hardfloat.MulAddRecFNToRaw_preMul(expWidth, sigWidth))
val mulAddRecFNToRaw_postMul =
Module(new hardfloat.MulAddRecFNToRaw_postMul(expWidth, sigWidth))

val mulAddRecFNToRaw_preMul = Module(new hardfloat.MulAddRecFNToRaw_preMul(expWidth, sigWidth))
val mulAddRecFNToRaw_postMul = Module(new hardfloat.MulAddRecFNToRaw_postMul(expWidth, sigWidth))

mulAddRecFNToRaw_preMul.io.op := io.op
mulAddRecFNToRaw_preMul.io.a := io.a
Expand All @@ -622,6 +621,7 @@ class MulAddRecFNPipe(latency: Int, expWidth: Int, sigWidth: Int) extends Module

//------------------------------------------------------------------------
//------------------------------------------------------------------------

val roundRawFNToRecFN = Module(new hardfloat.RoundRawFNToRecFN(expWidth, sigWidth, 0))

val round_regs = if(latency==2) 1 else 0
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/tilelink/Atomics.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

package freechips.rocketchip.tilelink

import Chisel._
import Chisel.{defaultCompileOptions => _, _}
import freechips.rocketchip.util.CompileOptions.NotStrictInferReset

import TLMessages._
import TLPermissions._
Expand Down
3 changes: 2 additions & 1 deletion src/main/scala/tilelink/Broadcast.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

package freechips.rocketchip.tilelink

import Chisel._
import Chisel.{defaultCompileOptions => _, _}
import freechips.rocketchip.util.CompileOptions.NotStrictInferReset
import freechips.rocketchip.config.Parameters
import freechips.rocketchip.diplomacy._
import freechips.rocketchip.util._
Expand Down
10 changes: 10 additions & 0 deletions src/main/scala/util/CompileOptions.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// See LICENSE.SiFive for license details.

package freechips.rocketchip.util

import chisel3.ExplicitCompileOptions.NotStrict

object CompileOptions {
/** Compatibility mode semantics except Module implicit reset should be inferred instead of Bool */
implicit val NotStrictInferReset = NotStrict.copy(inferModuleReset = true)
}
4 changes: 2 additions & 2 deletions wit-manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[
{
"commit": "f36127349c5303e32dcc97ccdd3b491f51ec60e9",
"commit": "3f88b663c7324cf9a27f9e20b82382908bb4cc11",
"name": "hardfloat",
"source": "git@github.com:ucb-bar/berkeley-hardfloat.git"
},
Expand All @@ -10,7 +10,7 @@
"source": "git@github.com:sifive/api-chisel3-sifive.git"
},
{
"commit": "5ee1efa292394429e603dc878643aa1fed4ac020",
"commit": "7a343dce95a370f6cb7b9cf80e0694ac82dc94f8",
"name": "chisel3",
"source": "git@github.com:freechipsproject/chisel3.git"
},
Expand Down