mohi@608
Member level 4
Code:
module counter(input [31:0] baud_rate_req,input [31:0] sys_freq,input clk,input reset,output [31:0] count_out);
reg [31:0] count_value;
count_value =(sys_freq/baud_rate_reg);
always@(posedge clk or negedge reset)
begin
if(reset==1)
count_out=32'b0;
else
while(count_out<count_value)
count_out=count_out+32'b1;
end
endmodule
Code:
rfs@rfs-virtual-machine:~/brg$ vlog counter.v
Model Technology ModelSim SE vlog 6.5b Compiler 2009.05 May 21 2009
-- Compiling module counter
** Error: counter.v(7): near "=": syntax error, unexpected '='
rfs@rfs-virtual-machine:~/brg$ gvim counter.v
i am not able to identify the error ????