Skip to content

Commit 6348c2d

Browse files
committed
Fix compilation errors in gainOffCorr.
1 parent a953dc8 commit 6348c2d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/main/scala/examples/gainOffCorr.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import chisel3.core._
66
import chisel3.{Bundle, Module}
77
import dsptools.DspTester
88
import org.scalatest.{Matchers, FlatSpec}
9+
import spire.algebra.Ring
10+
import spire.implicits._
911

1012
//Simple implementation does the following
1113
// 1.Input value can be either real/imag
@@ -15,13 +17,13 @@ import org.scalatest.{Matchers, FlatSpec}
1517

1618
class gainOffCorr[T<:Data:Ring](genIn: => T,genGain: => T,genOff: => T,genOut: => T, numLanes: Int) extends Module {
1719
val io = new Bundle {
18-
val inputVal = Vec(numLames, genIn.asInput)
20+
val inputVal = Vec(numLanes, genIn.asInput)
1921
val gainCorr = Vec(numLanes, genGain.asInput)
2022
val offsetCorr = Vec(numLanes, genOff.asInput)
2123
val outputVal = Vec(numLanes, genOut.asOutput)
2224
}
2325

2426
val inputGainCorr = io.inputVal.zip(io.gainCorr).map{case (in, gain) => in*gain }
25-
io.outputVal = inputGainCorr.zip(io.offsetCorr).map{case (inGainCorr, offset) => inGainCorr + offset }
27+
io.outputVal := inputGainCorr.zip(io.offsetCorr).map{case (inGainCorr, offset) => inGainCorr + offset }
2628
}
2729

0 commit comments

Comments
 (0)