myjoe1026
Junior Member level 3
Hi, I'm using Lattice Diamond to compile the following code.
I've written reg [11:0] Data = 12'hABC;
But it keep showing:
WARNING - : using initial value of Data since it is never assigned. VERI-1220
Can anyone tell me how to modify it? Thanks!
I've written reg [11:0] Data = 12'hABC;
But it keep showing:
WARNING - : using initial value of Data since it is never assigned. VERI-1220
Can anyone tell me how to modify it? Thanks!
Code:
module counter_6(clkin,clkout,dataO);
input clkin;
output reg clkout;
//output wire clk6;
output reg dataO;
reg [15:0] count=16'd0;
reg [4095:0] Dcount =4096'd0;
reg [11:0] Data = 12'hABC;
always @(posedge clkin)
begin
if (count < 3'b011)
begin
clkout = 1'b1;
dataO = Data[Dcount];
end
if (count == 3'b011)
begin
clkout = 1'b0;
dataO = Data[Dcount];
end
if (count == 3'b110)
begin
count = 3'b000;
clkout = 1'b1;
Dcount = Dcount + 1'b1;
dataO = Data[Dcount];
end
if (Dcount == 4096'd12)
begin
Dcount=4096'd0;
end
count = count + 1'b1;
end
endmodule
Last edited: