1

次のように SystemVerilog クラス内で定義されたタスクを C にエクスポートすることは可能でしょうか?

class packet_bfm_t;
    int id = 0;

    export "DPI-C" task send; // Is this possible and legal to call from C code?

    function new (int my_id = 0);
      id = my_id;
    endfunction : new

    task send (int data);
      #1ns;
      $display ("data = %h", data);
    endtask : send

endclass : packet_bfm_t
4

1 に答える 1