J
James Fitzsimons
Guest
Hi all,
thanks with your help on that last problem. I am making progress!
I am now trying to use XST to do the synthesis, but am getting the
following error:
========================================================================
=
* HDL Analysis *
========================================================================
=
Analysis of file <counter.v> succeeded.
Analyzing module <counter>.
ERROR:Xst:899 - counter.v line 23: The logic for <out> does not match a
known FF or Latch template.
Found 1 error(s). Aborting synthesis.
CPU : 0.28 / 3.51 s | Elapsed : 1.00 / 6.00 s
-->
My modified verilog is below. If anyone could shed some light on what's
going on I'd be most appreciative.
Also can someone point me to a place where I might find the part names I
should be using in my XST script? I have looked in the XST users manual,
but it doesn't really provide any help. At the moment for the XC9536
device I am using xc9536-5pc44...
Thanks very much,
James Fitzsimons
module counter(out, clk, reset);
parameter WIDTH = 8;
output [WIDTH-1 : 0] out;
input clk, reset;
reg [3 : 0] count;
reg [WIDTH-1 : 0] out;
wire clk, reset;
always @(posedge clk or posedge reset)
begin
if (reset) // Asynchrous reset
count <= 0;
else if (count < 9)
count <= count + 1;
else
count <= 0;
// now that we have a value for count, we need to convert
// that to a real 8 bit output to drive the display
case (count)
0 : out = 8'b00111111;
1 : out = 8'b00110000;
2 : out = 8'b01101101;
3 : out = 8'b01111001;
4 : out = 8'b01110010;
5 : out = 8'b01011011;
6 : out = 8'b01011110;
7 : out = 8'b00110001;
8 : out = 8'b01111111;
9 : out = 8'b01111011;
default: out = 8'b00000000;
endcase
end
endmodule // counter
module test;
reg reset;
reg clk;
wire [7:0] value;
counter c1 (value, clk, reset);
/* Make a reset that pulses once. */
initial begin
reset = 0;
clk = 0;
#17 reset = 1;
#11 reset = 0;
#29 reset = 1;
#11 reset = 0;
#160 $finish;
end
/* Make a regular pulsing clock. */
always #5 clk = !clk;
initial $monitor("At time %t, value = %b", $time, value);
endmodule // test
thanks with your help on that last problem. I am making progress!
I am now trying to use XST to do the synthesis, but am getting the
following error:
========================================================================
=
* HDL Analysis *
========================================================================
=
Analysis of file <counter.v> succeeded.
Analyzing module <counter>.
ERROR:Xst:899 - counter.v line 23: The logic for <out> does not match a
known FF or Latch template.
Found 1 error(s). Aborting synthesis.
CPU : 0.28 / 3.51 s | Elapsed : 1.00 / 6.00 s
-->
My modified verilog is below. If anyone could shed some light on what's
going on I'd be most appreciative.
Also can someone point me to a place where I might find the part names I
should be using in my XST script? I have looked in the XST users manual,
but it doesn't really provide any help. At the moment for the XC9536
device I am using xc9536-5pc44...
Thanks very much,
James Fitzsimons
module counter(out, clk, reset);
parameter WIDTH = 8;
output [WIDTH-1 : 0] out;
input clk, reset;
reg [3 : 0] count;
reg [WIDTH-1 : 0] out;
wire clk, reset;
always @(posedge clk or posedge reset)
begin
if (reset) // Asynchrous reset
count <= 0;
else if (count < 9)
count <= count + 1;
else
count <= 0;
// now that we have a value for count, we need to convert
// that to a real 8 bit output to drive the display
case (count)
0 : out = 8'b00111111;
1 : out = 8'b00110000;
2 : out = 8'b01101101;
3 : out = 8'b01111001;
4 : out = 8'b01110010;
5 : out = 8'b01011011;
6 : out = 8'b01011110;
7 : out = 8'b00110001;
8 : out = 8'b01111111;
9 : out = 8'b01111011;
default: out = 8'b00000000;
endcase
end
endmodule // counter
module test;
reg reset;
reg clk;
wire [7:0] value;
counter c1 (value, clk, reset);
/* Make a reset that pulses once. */
initial begin
reset = 0;
clk = 0;
#17 reset = 1;
#11 reset = 0;
#29 reset = 1;
#11 reset = 0;
#160 $finish;
end
/* Make a regular pulsing clock. */
always #5 clk = !clk;
initial $monitor("At time %t, value = %b", $time, value);
endmodule // test