简体   繁体   English

我如何为凿子中的零件编写黑盒代码?

[英]How can i blackbox code for a part in chisel?

Because we can't generate always @(negedge clock or posedge capture) to chisel.因为我们不能总是生成@(negedge clock or posedge capture)来凿子。 Instead of using blacbox resource to blacbox a file, how can I blackbox one line code always @(negedge clock or posedge capture)不是使用 blacbox 资源对文件进行 blacbox 操作,我如何always @(negedge clock or posedge capture)一行代码进行黑箱处理always @(negedge clock or posedge capture)

  if (capture)
    out <= 1'b0;
  else
  begin
    if (enable)
      out <= in;
  end

There is some documentation on using black boxes in the Chisel3 wiki . Chisel3 wiki 中有一些关于使用黑匣子的文档。 And there are a number of examples in chisel3/src/test/scala/chiselTests eg chiselTests/BlackBoxImpl.scala . chisel3/src/test/scala/chiselTests 中有许多示例,例如chiselTests/BlackBoxImpl.scala

Do you have questions about how these examples work or is there some functionality you are seeking that you are not finding?您是否对这些示例的工作方式有疑问,或者是否有您正在寻找但没有找到的功能?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM