@@ -6,6 +6,8 @@ import chisel3.core._
6
6
import chisel3 .{Bundle , Module }
7
7
import dsptools .DspTester
8
8
import org .scalatest .{Matchers , FlatSpec }
9
+ import spire .algebra .Ring
10
+ import spire .implicits ._
9
11
10
12
// Simple implementation does the following
11
13
// 1.Input value can be either real/imag
@@ -15,13 +17,13 @@ import org.scalatest.{Matchers, FlatSpec}
15
17
16
18
class gainOffCorr [T <: Data : Ring ](genIn : => T ,genGain : => T ,genOff : => T ,genOut : => T , numLanes : Int ) extends Module {
17
19
val io = new Bundle {
18
- val inputVal = Vec (numLames , genIn.asInput)
20
+ val inputVal = Vec (numLanes , genIn.asInput)
19
21
val gainCorr = Vec (numLanes, genGain.asInput)
20
22
val offsetCorr = Vec (numLanes, genOff.asInput)
21
23
val outputVal = Vec (numLanes, genOut.asOutput)
22
24
}
23
25
24
26
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 }
26
28
}
27
29
0 commit comments