Skip to content

Commit

Permalink
Merge pull request #243 from SingularityKChen/master
Browse files Browse the repository at this point in the history
fix: chisel3 pr #2758
  • Loading branch information
jerryz123 authored Jan 4, 2023
2 parents bf7d0a8 + 66d803f commit 5b1e733
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import chisel3.experimental.BundleLiterals.AddBundleLiteralConstructor
object DspComplex {

def apply[T <: Data:Ring](gen: T): DspComplex[T] = {
if (gen.isLit()) throw DspException("Cannot use Lit in single argument DspComplex.apply")
if (gen.isLit) throw DspException("Cannot use Lit in single argument DspComplex.apply")
apply(gen.cloneType, gen.cloneType)
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/dsptools/numbers/rounding/Saturate.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ case class SaturateChiselAnnotation(target: SaturateDummyModule[_ <: Data], op:
def transformClass: Class[SaturateTransform] = classOf[SaturateTransform]
}

trait SaturateModule[T <: Data] extends MultiIOModule {
trait SaturateModule[T <: Data] extends Module {
val a: T
val b: T
val c: T
Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/dsptools/ShiftRegisterDelaySpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class AbsCircuitWithDelays[T <: Data : Signed](gen: T, val delays: Int) extends

DspContext.withNumAddPipes(delays) {
val con = io.in.context_abs()
printf("io.in %d con %d\n", io.in.asUInt(), con.asUInt())
printf("io.in %d con %d\n", io.in.asUInt, con.asUInt)
io.outContextAbs := con
}
}
Expand Down
7 changes: 4 additions & 3 deletions src/test/scala/dsptools/numbers/SaturateSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import dsptools.numbers.rounding.Saturate
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers

class SaturateUIntMod(val add: Boolean) extends MultiIOModule {

class SaturateUIntMod(val add: Boolean) extends Module {
val a = IO(Input(UInt(8.W)))
val b = IO(Input(UInt(8.W)))
val c = IO(Output(UInt()))
Expand Down Expand Up @@ -53,7 +54,7 @@ class SaturateUIntTester(dut: SaturateUIntMod) extends PeekPokeTester(dut) {
}
}

class SaturateSIntMod(val add: Boolean) extends MultiIOModule {
class SaturateSIntMod(val add: Boolean) extends Module {
val a = IO(Input(SInt(8.W)))
val b = IO(Input(SInt(8.W)))
val c = IO(Output(SInt()))
Expand Down Expand Up @@ -96,7 +97,7 @@ class SaturateSIntTester(dut: SaturateSIntMod) extends PeekPokeTester(dut) {
}
}

class SaturateFixedPointMod(val add: Boolean, val aBP: Int = 0, val bBP: Int = 0) extends MultiIOModule {
class SaturateFixedPointMod(val add: Boolean, val aBP: Int = 0, val bBP: Int = 0) extends Module {
val cBP = aBP max bBP
val a = IO(Input(FixedPoint(8.W, aBP.BP)))
val b = IO(Input(FixedPoint(8.W, bBP.BP)))
Expand Down

0 comments on commit 5b1e733

Please sign in to comment.