Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17268 Discussions

Memory type for variables

Altera_Forum
Honored Contributor II
1,210 Views

I am modifying the sobel example to find out how to describe the behaviour I want of the system/program. The sobel example has a shift register that holds some of the pixels to be processed. When I change <type> rows to<type> local rows I get a kernel that is too large to compile. I am doing further tests on performance but this caused me to wonder about the memory types the variables are stored in. I know global resides in external ram and local in on-chip ram, but what about the variables that have no memory-space identifier (if this is the correct term) as the first piece of code?

0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
504 Views

I found a configuration in which the only difference is the local keyword before the rows variable. This uses a little more resources, but the difference in performance (time) is more significant. It is significantly slower, 980us where the non-local runs in 700 us. I think this means the addition of local prevents the compiler from inferring a shift register. If that is the case I assume the first piece of code infers registers and thus is private. Am I correct?

0 Kudos
Altera_Forum
Honored Contributor II
504 Views

Found what I wanted to know in a online course from Altera. 

http://wl.altera.com/education/training/courses/oopncl200
0 Kudos
Reply