Currying in hardware
问题 I'm trying to implement a simple Address Decoder with a curried function inside. The code below won't compile, could anybody help me with this? class AddrDecoder[T<:UInt] (dType:T, n:Int) extends Module { val io = IO (new Bundle { //val range = (Vec(Seq.fill(n){(dType,dType)})) // This won't compile, how to fix ? val range = (List.fill(n){(dType,dType)}) val addr = Input (dType) val en = Input (Bool()) val sel = Output(Bool()) }) def inside (range:(T,T))(addr:T):Bool = { addr >= range._1 &&