0
\$\begingroup\$

in a project I've made recently (Quartus, Cyclone 2, altera) I wanted to produce both VGA graphical output, and sound output (via another board). I've noticed a large amount of logic cells went on arrays (which contained a lookup table for sine waves for example). On the other hand, I've made many graphical objects containing bitmaps of great numbers (500X300[*8bit color vector per each cell]) which obviously needed to be saved somewhere, but never took any space (memory bits) on my board.

Needles to say, they should have taken a lot more space than any other array I've had (if I'm merely summing it up bit-wise). I've made all objects by myself from scratch, creating all arrays the same way, so no difference in any definition that I know of, but somehow the Quartus/Chip handles them differently and optimizes the space utilization for them - transferring them to LC combinationals and registers, rather than to Memory bits on the board.

How can I know or control this behaviour beforehand? and how does it "know" the difference between a "color bitmap" array to a "sine-values" array for example (both 8-bit per cell)? in this case, it was a surprised it actually worked (taking only ~15% of memory bits, but ~70% of logic elements). *didn't use any megafunction wizard stuff.

\$\endgroup\$
4
  • \$\begingroup\$ Are the bitmaps complex objects ? Simple shapes can be generated with logic equations. \$\endgroup\$
    – Grabul
    Commented Sep 17, 2017 at 12:27
  • \$\begingroup\$ They were created by hand.. started by 1-0 bit maps and then changed everything to the x"HH" format (with the color i wanted). The fact that it can be done, is rather obvious actually. The real question though, is how and why the program treats a set of 8-bit vector array (representing colors), differently than how it treats 8-bit vector array (representing constant values of sine).. the only difference i could see is the array for sound was 1D while the bitmaps were 2D, but I could make the bitmap 1D to create a simple line for example, and then there would be no difference whatsoever.. \$\endgroup\$
    – XpRick
    Commented Sep 17, 2017 at 13:31
  • \$\begingroup\$ My question was just that Quartus could have transformed the shapes into logic equations, then optimized to fit in a few LUTs. \$\endgroup\$
    – Grabul
    Commented Sep 17, 2017 at 14:00
  • \$\begingroup\$ want's trying to be a tool or something.. I probably didn't express good enough what is it that I'm asking. I get what you're saying, but I see no difference between the two arrays, so can't see why it won't handle them (however it chooses) the same way. \$\endgroup\$
    – XpRick
    Commented Sep 17, 2017 at 14:22

1 Answer 1

2
\$\begingroup\$

There are two likely possibilities:

  • Quartus is VERY good at removing unused logic, so if you have not yet used one or more of those bitmaps, it will quite likely just not generate the logic for them.
  • You may have designed the graphics tables in such a way that Quartus can infer a block ram for them, but have failed to do this for the sine wave LUT. This can be subtle, a close reading of the various report files should revel more.
\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.