반응형
Question
The following messages are displayed when I run simulation with modelsim 6.0.
Warning: (vsim-PLI-3691): Expected a system task, not a system function '$fseek'.
Warning: (vsim-PLI-3691): Expected a system task, not a system function '$sscanf'.
Is this a bug of Modelsim 6.0, or did I miss some files or setting?
Answer
$fseek as a task. It is a function, and returns a value. You must call it as a function.
In other words, you tried to do something like
begin
$fseek(fd,0,0);
end
begin
$sscanf(str,"%s_%d",name,no);
end
You must instead do something like
integer code;
begin
code = $fseek(fd,0,0);
end
integer ret;
begin
ret = $sscanf(str,"%s_%d",name,no);
end
Or actually use the return value as it was intended
begin
if ($fseek(fd,0,0) == -1)
$display("ERROR: fseek failed");
end
반응형
'SoC 설계 > Verilog, SystemVerilog' 카테고리의 다른 글
Verilog/Systemverilog에서 real 과 integer 간 형변환 (0) | 2025.01.10 |
---|---|
배열 시스템 함수들 (0) | 2024.04.21 |
Converting logic to real or real to logic (0) | 2024.04.12 |
SystemVerilog: Procedural blocks (0) | 2023.03.19 |
SystemVerilog: Casting (0) | 2023.03.18 |