Altera_Forum
Honored Contributor
14 years agoModelSim Error Undefined variable
Hello,
While i was reading ModelSim Altera tutorial i created module modelSimTut in quartus 11 on verilog. It compiled fine. Then i opened ModelSim and created a project. In directory work i have created test.v with such codemodule test;
reg clock, enable, load;
initial
begin
clock = 1'b0;
forever# 5 clock =~clock;
end
always @ (posedge clock)
begin
modelSimTut mod1 (.start(enable),
.clock(clock),
.load(load));
end
endmodule but when i try to compile, there is an error near modelSimTut mod1 (Undefined variable: modelSimTut). I tried to add modelSimTut.v to project, to copy it to the same with test.v folder. I also tried to add its directory to source directories for ModelSim, but i still can`t compile it becouse an error. Also interesting that modelSimTut is highlited by blue and if open describe there is a path to modelSimTut.v file. Help me please to understand the reason of this problem.