1
我想實例化並使用已在另一個模塊中定義的函數。從Verilog中的另一個模塊調用函數
module simple_function();
function myfunction;
input a, b, c, d;
begin
myfunction = ((a+b) + (c-d));
end
endfunction
endmodule
module function_calling(a, b, c, d, e, f);
input a, b, c, d, e ;
output f;
wire f;
`include "myfunction.v"
assign f = (myfunction (a,b,c,d)) ? e :0;
endmodule
我從http://www.asic-world.com/verilog/task_func1.html 但是這個代碼,當我執行的的ModelSim Altera入門版10.0D一樣,我得到這個錯誤:
Cannot open `include file "myfunction.v".
我要去哪裏錯了?