Altera_Forum
Honored Contributor
11 years agoincrementing an element in an array produces lots of (false) paths
Dear All
In my VHDL I wish to count the number of "leading edges" on certain channels. There are 128 channels and I wish to be able to count up to 2^24. I define type matrix is array (0 to 127) of integer range 0 to 16777216 ;
variable channel_lead_cnt : matrix;
variable element : integer range 0 to 127 := 0 ;
where "element" will hold the channel number. When I receive a leading edge on a given channel, I increment the counter:
channel_lead_cnt(element) := channel_lead_cnt(element)+1;
Having synthesised the code* and P&R it onto my device**, I use the TimeQuest Timing Analyser to look at the paths related to 'channel_lead_cnt', and I see a vast number of paths, for example:
data_counter:PPDATACNT|channel_trail_cnt data_counter:PPDATACNT|channel_trail_cnt
data_counter:PPDATACNT|channel_trail_cnt data_counter:PPDATACNT|channel_trail_cnt
data_counter:PPDATACNT|channel_trail_cnt data_counter:PPDATACNT|channel_trail_cnt
data_counter:PPDATACNT|channel_trail_cnt data_counter:PPDATACNT|channel_trail_cnt
data_counter:PPDATACNT|channel_trail_cnt data_counter:PPDATACNT|channel_trail_cnt
data_counter:PPDATACNT|channel_trail_cnt data_counter:PPDATACNT|channel_trail_cnt
There seem to be paths between element i of the array, and element j of the array. In the full output, i and j take all values from 0 to 127. Given the code I posted above, I don't see a reason why a path is needed if i != j ( I hope that makes sense! In the above examples, i=107 and j=0...5). I am always doing
channel_lead_cnt(i) := channel_lead_cnt(i) + 1;
and never
channel_lead_cnt(i) := channel_lead_cnt(j) + 1;
Is this the expected behaviour? I have tried rewriting the command using a for loop, and using a case statement, but the issue remains. When looking at the data_counter module in the chip planner, I see the routing utilisation is almost 70% in the area of the data_counter module, far higher than any other area. Moreover, many of the paths (real and false) fail timing. Can anyone suggest a way to: 1. Correct my understanding, if I do not understand something. 2. Rewrite the code so that the false paths are not generated. 3. Write SDC false-path commands that remove the false paths but keep the true *** . Unfortunately, I have at least four similar "counter arrays" in the code, some even larger, each of which present the same behaviour! Any help or advice is greatly appreciated Thanks Chris Parkinson * I am using Quartus II 32-bit version 13.1.0 Build 162 ** The device is a Stratix III EP3SL200F1152C4 *** I can easily set ALL of the paths to be false paths. Of course, this is not satisfactory, since many true paths fail timing. I have also tried using for loops within the .sdc file, however TimeQuest did not accept my attempts. Naturally, due to the scale of the problem, its impractical to explicitly set_false_path for each false path, since there are a few hundred thousand of them.