How can i blackbox code for a part in chisel?

193 Views Asked by At

Because we can't generate always @(negedge clock or posedge capture) to chisel. Instead of using blacbox resource to blacbox a file, how can I blackbox one line code always @(negedge clock or posedge capture)

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

There are 1 best solutions below

0
Chick Markley On

There is some documentation on using black boxes in the Chisel3 wiki. And there are a number of examples in chisel3/src/test/scala/chiselTests e.g.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?