M
Marty Ryba
Guest
Hello everyone,
After banging our heads for last few weeks (sometimes literally), I
figure I'll query the group of experts here. We have a design that is
functionally correct (ModelSim test bench) but it appears to be very iffy
when it gets on the real chip. I have a couple copies of "identical" boards
with Virtex2-1000 chips on them. I'll check again soon, but I believe they
are -6 parts. We've been synthesizing the design in Synplify Pro (v7.5
though others are available; this design has some history of working fine).
Sometimes it works on one or more boards, other times after I load it (and
verify) with iMPACT this counter acts screwy (it messes up critical timing,
and it also looks all wrong on Chipscope). Today I got brave enough to load
it into the EEPROM; it worked this afternoon but who knows tomorrow (grrr).
Looking at the Synplify timing report (with -4 speed setting in Synplify),
the timing is marginal for a specified clock of 100 MHz around this path,
but the chip is really running at 66 MHz (PCI clock). The key code is very
simple (some syntax may be a bit off since I'm doing it from memory). We
tried trimming the size of the counter from 32 bits down to 20 and it seems
to help some.
signal my_counter : std_logic_vector(COUNT_WIDTH-1 downto 0);
countdown_process: process (CLK)
begin
if rising_edge(CLK) then -- do everything synchronous
if RESET = '1' then
my_counter <= ZEROIZE_COUNT;
elsif counter_load = '1' then
my_counter <= input_bus(COUNT_WIDTH-1 downto 0);
elsif making_data = '1' then
my_counter <= my_counter - '1';
endif
endif -- CLK
end -- process
Another process block checks that this counter is nonzero and a few other
requirements to set the value of making_data true or false.
Ideas/suggestions? My main FPGA engineer has been working with the local
Xilinx FAE but no "Eureka!" moments yet. A very similar (if anything,
somewhat larger) design has never shown this trouble on the same boards. The
current design takes about 45% of the LUTs.
I notice the RTL shows this using an adder (it fans out making_data to
COUNT_WIDTH bits so that it becomes either the 0 or -1 to add). Isn't there
a simpler structure to define a count(down) counter? I sure can buy a simple
counter in 74xx series logic. I notice neither arith_std or numeric_std
define special operators (a la C's ++ and -- operators) to specify
increment/decrement, so maybe there is no simple way to create a counter
structure in fewer FPGA logic elements. Seems odd to me (non-EE).
Thanks in advance for your sagacity.
-Dr. Marty Ryba
Mad GNSS scientist
After banging our heads for last few weeks (sometimes literally), I
figure I'll query the group of experts here. We have a design that is
functionally correct (ModelSim test bench) but it appears to be very iffy
when it gets on the real chip. I have a couple copies of "identical" boards
with Virtex2-1000 chips on them. I'll check again soon, but I believe they
are -6 parts. We've been synthesizing the design in Synplify Pro (v7.5
though others are available; this design has some history of working fine).
Sometimes it works on one or more boards, other times after I load it (and
verify) with iMPACT this counter acts screwy (it messes up critical timing,
and it also looks all wrong on Chipscope). Today I got brave enough to load
it into the EEPROM; it worked this afternoon but who knows tomorrow (grrr).
Looking at the Synplify timing report (with -4 speed setting in Synplify),
the timing is marginal for a specified clock of 100 MHz around this path,
but the chip is really running at 66 MHz (PCI clock). The key code is very
simple (some syntax may be a bit off since I'm doing it from memory). We
tried trimming the size of the counter from 32 bits down to 20 and it seems
to help some.
signal my_counter : std_logic_vector(COUNT_WIDTH-1 downto 0);
countdown_process: process (CLK)
begin
if rising_edge(CLK) then -- do everything synchronous
if RESET = '1' then
my_counter <= ZEROIZE_COUNT;
elsif counter_load = '1' then
my_counter <= input_bus(COUNT_WIDTH-1 downto 0);
elsif making_data = '1' then
my_counter <= my_counter - '1';
endif
endif -- CLK
end -- process
Another process block checks that this counter is nonzero and a few other
requirements to set the value of making_data true or false.
Ideas/suggestions? My main FPGA engineer has been working with the local
Xilinx FAE but no "Eureka!" moments yet. A very similar (if anything,
somewhat larger) design has never shown this trouble on the same boards. The
current design takes about 45% of the LUTs.
I notice the RTL shows this using an adder (it fans out making_data to
COUNT_WIDTH bits so that it becomes either the 0 or -1 to add). Isn't there
a simpler structure to define a count(down) counter? I sure can buy a simple
counter in 74xx series logic. I notice neither arith_std or numeric_std
define special operators (a la C's ++ and -- operators) to specify
increment/decrement, so maybe there is no simple way to create a counter
structure in fewer FPGA logic elements. Seems odd to me (non-EE).
Thanks in advance for your sagacity.
-Dr. Marty Ryba
Mad GNSS scientist