Forum Discussion
Altera_Forum
Honored Contributor
15 years agoincmprehensible error
Hi !! When i compile my programm, I have these errors : --- Quote Start --- Error: Can't pack LABs Error: Can't place node "lpm_counter:control_2_rtl_0|dffs[0]" of type max_...
Altera_Forum
Honored Contributor
15 years ago --- Quote Start --- you may try to use down-counter : which counts from divide_2 downto 0. It is easier to compare a std_logic_vector with 0. The logical comparison is obvious and it needs just some OR gates. --- Quote End --- Not exactly so. What you gain on the swings you loose on the roundabouts. Let's say we have a counter and we have to count X, with X being dynamical. If we count up, we must clear the counter to zero and compare the count to X Clearing is (or can be) cheap, comparing uses a 2-tier of XORs and AND If we count down, we must load the value X into the counter, and compare the count with 0. Loading the counter needs an additional multiplexer at the counter's input, but has a simpler comparison with a single AND. It may be possible that we could make the count loading simpler, but I have to try that out (in my free time?).