T
Ted Larson
Guest
I am trying to learn Verilog. I got myself a couple of books on it, and I
have written a few small, designs that work. Anyway, now I am trying to do
something more useful, and I am getting stuck. I have been using the Xilinx
WebPack ISE 6.2 for synthesis, and it constantly is giving me all kinds of
warnings.
What I am trying to do is a counter, where I can set it to a shift register,
and then shift the bits of the current count out serially using a clock.
Here is what I have:
module sercount4(clk,flick,set,reset,sout);
input clk;
input flick;
input set;
input reset;
output sout;
reg [7:0] count;
reg [7:0] tbuf;
always @(posedge clk or posedge reset)
begin
if(reset)
count<=8'b00000000;
else
tbuf <= {tbuf[6:0], 1'b0};
end
always @(posedge flick)
begin
count<=count+1;
end
always @(posedge set)
tbuf <= count;
assign sout = tbuf[7];
endmodule
Seems simple enough....although I get warnings like the following, and I
can't synthesize it:
WARNING:Xst:1426 - The value init of the FF/Latch count_0 hinder the
constant cleaning in the block sercount4.
You should achieve better results by setting this init to 1.
WARNING:Xst:1710 - FF/Latch <count_5> (without init value) is constant in
block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_7>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_6>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_1>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_2>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_3>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_4>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <tbuf_0>
(without init value) is constant in block <sercount4>.
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_7> not
replaced by logic
Sources are: tbuf_ren_7:Q, tbuf_7:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <count_0> not
replaced by logic
Signal is stuck at GND
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_2> not
replaced by logic
Sources are: tbuf_ren_2:Q, tbuf_2:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_ren_0>
not replaced by logic
Sources are: count<5>:count<5>, count<7>:count<7>, count<6>:count<6>,
count<1>:count<1>, count<2>:count<2>, count<3>:count<3>, count<4>:count<4>,
tbuf_ren_0:Q
Signal is stuck at GND
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_1> not
replaced by logic
Sources are: tbuf_ren_1:Q, tbuf_1:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_3> not
replaced by logic
Sources are: tbuf_ren_3:Q, tbuf_3:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_6> not
replaced by logic
Sources are: tbuf_ren_6:Q, tbuf_6:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_5> not
replaced by logic
Sources are: tbuf_ren_5:Q, tbuf_5:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_4> not
replaced by logic
Sources are: tbuf_ren_4:Q, tbuf_4:Q
ERROR:Xst:415 - Synthesis failed
Can someone make some suggestions on what I am doing wrong?
Thanks,
- Ted
ted@larsonland.com
have written a few small, designs that work. Anyway, now I am trying to do
something more useful, and I am getting stuck. I have been using the Xilinx
WebPack ISE 6.2 for synthesis, and it constantly is giving me all kinds of
warnings.
What I am trying to do is a counter, where I can set it to a shift register,
and then shift the bits of the current count out serially using a clock.
Here is what I have:
module sercount4(clk,flick,set,reset,sout);
input clk;
input flick;
input set;
input reset;
output sout;
reg [7:0] count;
reg [7:0] tbuf;
always @(posedge clk or posedge reset)
begin
if(reset)
count<=8'b00000000;
else
tbuf <= {tbuf[6:0], 1'b0};
end
always @(posedge flick)
begin
count<=count+1;
end
always @(posedge set)
tbuf <= count;
assign sout = tbuf[7];
endmodule
Seems simple enough....although I get warnings like the following, and I
can't synthesize it:
WARNING:Xst:1426 - The value init of the FF/Latch count_0 hinder the
constant cleaning in the block sercount4.
You should achieve better results by setting this init to 1.
WARNING:Xst:1710 - FF/Latch <count_5> (without init value) is constant in
block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_7>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_6>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_1>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_2>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_3>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <count_4>
(without init value) is constant in block <sercount4>.
WARNING:Xst:1895 - Due to other FF/Latch trimming, FF/Latch <tbuf_0>
(without init value) is constant in block <sercount4>.
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_7> not
replaced by logic
Sources are: tbuf_ren_7:Q, tbuf_7:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <count_0> not
replaced by logic
Signal is stuck at GND
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_2> not
replaced by logic
Sources are: tbuf_ren_2:Q, tbuf_2:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_ren_0>
not replaced by logic
Sources are: count<5>:count<5>, count<7>:count<7>, count<6>:count<6>,
count<1>:count<1>, count<2>:count<2>, count<3>:count<3>, count<4>:count<4>,
tbuf_ren_0:Q
Signal is stuck at GND
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_1> not
replaced by logic
Sources are: tbuf_ren_1:Q, tbuf_1:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_3> not
replaced by logic
Sources are: tbuf_ren_3:Q, tbuf_3:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_6> not
replaced by logic
Sources are: tbuf_ren_6:Q, tbuf_6:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_5> not
replaced by logic
Sources are: tbuf_ren_5:Q, tbuf_5:Q
WARNING:Xst:528 - Multi-source in Unit <sercount4> on signal <tbuf_4> not
replaced by logic
Sources are: tbuf_ren_4:Q, tbuf_4:Q
ERROR:Xst:415 - Synthesis failed
Can someone make some suggestions on what I am doing wrong?
Thanks,
- Ted
ted@larsonland.com