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.

syntax error, unexpected wire, expecting";"

Status
Not open for further replies.

macgradywk

Junior Member level 2
Joined
Sep 24, 2012
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,443
Here is my testbench with syntax error, unexpected wire, expecting";" in line 2, what's wrong?



code:
module test_project1
wire clk,reset;
reg [7:0] port1;
wire [8:0] port2;
reg eof;
integer project1;
initial
project1=$fopen("proj.dat","rb");
always@(posedge clk)
begin
eof=feof(project1);
if(eof==0)
$fscanf(project,"%b",port1);
else
begin
$fclose(project1);
$finish;
end
end
init my_init(clk,reset);
project1 my_project1(port2,port1,clk,reset);
endmodule
 

Module without ports has to be end with semicolon like below line
module test_project1;
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top