Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

how to compile test bench on iverilog compiler over linux environment

Status
Not open for further replies.

shiven

Newbie level 4
Joined
Jul 6, 2012
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
New Delhi
Activity points
1,325
i had written following simple verilog code of and gate and its test bench and m using iverilog compiler over linux

main module:

module AND(y,a,b);
output y;
input a,b;
and(y,a,b);
endmodule

test bench:

module testAND;
wire y;
reg a,b;
AND (y,a,b);
initial
begin
a=0;b=0;
#5
a=0;b=1;
#5
a=1;b=0;
#5
a=1;b=1;
end
endmodule
problem is that main module gets compiled properly but when i compile test bench it throws following error msg

:~/Desktop/verilog$ iverilog -o test tand.v
tand.v:5: error: Unknown module type: AND
2 error(s) during elaboration.
*** These modules were missing:
AND referenced 1 times.
***
please tell me how to overcome this as soon as possible i am waiting for help
 

Hi,

there is an error in the creation of the AND instance: you should define both the instance name and the instance module as follows:

Code:
AND myAND(y, a, b);

Try this way and get us back!

Cheers
 

its still throwing the same message i tried the same code over modelsim on windows its working could you please help me on this
 

i had written following simple verilog code of and gate and its test bench and m using iverilog compiler over linux


problem is that main module gets compiled properly but when i compile test bench it throws following error msg

:~/Desktop/verilog$ iverilog -o test tand.v
tand.v:5: error: Unknown module type: AND
2 error(s) during elaboration.
*** These modules were missing:
AND referenced 1 times.
***

Try following command and let me know if it works.

iverilog -o test tand.v test.v

Thanks,
Fpgadsgnr
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top