0

次のエラーが表示されます。しかし、出力されたエラーメッセージから問題を理解できません。

run
[info] Running HyperCell.SwitchTopMain
[info] [0.340] // COMPILING < (class HyperCell.SwitchTop)>(9)
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
Re-running Chisel in debug mode to obtain erroneous line numbers...
[info] [1.120] // COMPILING < (class HyperCell.SwitchTop)>(9)
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2
[error] switchTop.scala:28: := not defined on class Chisel.UInt and class Chisel.Vec in class HyperCell.SwitchTop$$anonfun$2

このエラーを生成しているコードはこちら

//One FIFO at each of the Output
    val fifoClass    = (0 until ports).map(x=>  { Module(new Fifo(0, widthParam, depthParam, ports))}).toList

    for(i<-0 until ports){
        deqWire(i)    := fifoClass(i).io.enqRdy
    }

    //Each iteration represents each FIFO at the output side
    for(i<-0 until ports){
        fifoClass(i).io.enqData    := switchClass.io.outPort(i)
        fifoClass(i).io.deqRdy        := deqWire
    }
4

1 に答える 1

0

問題の核心は、Vec() を UInt() に割り当てようとしているということです。それはうまくいきません。タイプが一致しません。


ただし、他のいくつかの問題があります。まず、行番号が表示されていないため、エラーとコードを一致させることができません。また、deqWire の定義も示していません。それはどのようなものですか?

fifoClassに関するあなたのイディオムもわかりません。うまくいくかもしれませんが、私自身は

val my_array_of_modules = Vec.fill(num_elements) { Module (new Thing()).io }

しかし、それはおそらく問題ではありません。

于 2015-09-15T22:24:48.440 に答える