moustafaali
Member level 2

- Joined
- May 14, 2007
- Messages
- 46
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,286
- Location
- cairo,egypt
- Activity points
- 1,563
salam alikom
hello
i'm new in verilog and need test semple project using logsim
this is the code
/////////////////////////////////////////////////////////////////////////////
//counter project
module counter (clk, reset, enable, count);
input clk, reset, enable;
wire clk, reset, enable;
output count;
reg[3:0] count;
always @ (reset)
begin
if (reset == 1) begin
count <= 0;
end
end
always @ (posedge clk)
begin
if (enable == 1) begin
count <= count + 1;
end
end
endmodule
////////////////////////////////////////////////////////////////////////////
and this is the error appeared
/////////////////////////////////////////////////////////////////////////////
# compilation completed
** Error ** unable to determine top module
hello
i'm new in verilog and need test semple project using logsim
this is the code
/////////////////////////////////////////////////////////////////////////////
//counter project
module counter (clk, reset, enable, count);
input clk, reset, enable;
wire clk, reset, enable;
output count;
reg[3:0] count;
always @ (reset)
begin
if (reset == 1) begin
count <= 0;
end
end
always @ (posedge clk)
begin
if (enable == 1) begin
count <= count + 1;
end
end
endmodule
////////////////////////////////////////////////////////////////////////////
and this is the error appeared
/////////////////////////////////////////////////////////////////////////////
# compilation completed
** Error ** unable to determine top module