无驱动检测(No driver on)
简介
SpinalHDL 将检查所有对设计有影响的组合信号是否被赋值。
示例
下面的代码:
class TopLevel extends Component {
val result = out(UInt(8 bits))
val a = UInt(8 bits)
result := a
}
会报错:
NO DRIVER ON (toplevel/a : UInt[8 bits]), defined at
***
Source file location of the toplevel/a definition via the stack trace
***
一个可能的修复方法是:
class TopLevel extends Component {
val result = out(UInt(8 bits))
val a = UInt(8 bits)
a := 42
result := a
}