You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a BlackBox when privateNamespace=true in the SpinalConfig, a prefix is added to the blackboxed module on instantiation.
For example the following code:
class ExBB extends BlackBox {
val io = new Bundle {
val clk = in Bool()
val dout = out Bool()
}
mapClockDomain(clock=io.clk)
}
class APExample extends Component {
val io = new Bundle {
val dout = out Bool()
}
val dut = new ExBB()
io.dout := dut.io.dout
}
object TestConfig extends SpinalConfig(privateNamespace=true)
object Test {
def main(args: Array[String]) {
TestConfig.generateVerilog(new APExample())
}
}
If you use privateNamespace then all components are prefixed to prevent any possible clashes when integrating into another codebase.
If you use globalPrefix instead then Blackboxes won't be prefixed:
When using a BlackBox when
privateNamespace=true
in theSpinalConfig
, a prefix is added to the blackboxed module on instantiation.For example the following code:
Produces the following Verilog file:
I’d have assumed that blackboxed modules would keep their names as-is so that a user could share the module across multiple SpinalHDL projects.
The text was updated successfully, but these errors were encountered: