3.5.3.2.2 Shared-Local Memory

If a memory is accessed by multiple functions, where all the functions that access it are to be compiled to hardware, the memory is designated as a shared-local memory. A shared-local memory is instantiated outside the modules (at the same level of hierarchy as the modules themselves, as shown for functions and FU in the diagram above), and memory ports are created for the modules to connect to the memory. Arbitration is automatically created to handle contention for a shared-local memory. SmartHLS automatically optimizes the arbitration logic, so that if the modules that access the memory are executing sequentially, a simple OR gate is used for arbitration (which consumes only a small amount of area), but if the accessing modules are executing concurrently (with the use of hls::thread), a round robin arbiter is automatically created to handle contention.

The read latency of shared-local memories are determined by ENABLE_AUTOMATIC_MEMORY_LATENCY_SETTING on default setting. The shared-local memory read latency can be changed with set_operation_latency.