Abstract:
The MSMC (Multicore Shared Memory Controller) described is a module designed to manage traffic between multiple processor cores, other mastering peripherals or DMA, and the EMIF (External Memory InterFace) in a multicore SoC. The invention unifies all transaction sizes belonging to a slave previous to arbitrating the transactions in order to reduce the complexity of the arbitration process and to provide optimum bandwidth management among all masters. The two consecutive slots assigned per cache line access are always in the same direction for maximum access rate.

Description:
CLAIM OF PRIORITY 
       [0001]    This application claims priority under 35 U.S.C. 119(e)(1) to Provisional Application No. 61/717,843 filed 24 Oct. 2012. 
     
    
     TECHNICAL FIELD OF THE INVENTION 
       [0002]    The technical field of this invention is multicore processing systems. 
       BACKGROUND OF THE INVENTION 
       [0003]    In a multi-core coherent system, multiple cpu and system components share the same memory resources, such as on-chip and off-chip RAMs. Ideally, if all components had the same cache structure, and would access shared resource through cache transactions, all the accesses would be identical throughout the entire system, aligned with the cache block boundaries. But usually, some components have no caches, or, different components have different cache block sizes. For a heterogeneous system, accesses to the shared resources can have different attributes, types and sizes. On the other hand, the shared resources may also be in different format with respect to banking structures, access sizes, access latencies and physical locations on the chip. 
         [0004]    To maintain data coherency, a coherence interconnect is usually added in between the master components and shared resources to arbitrate among multiple masters&#39; requests and guarantee data consistency when data blocks are modified for each resource slave. With various accesses from different components to different slaves, the interconnect usually handles the accesses in a serial fashion to guarantee atomicity and to meet slaves access requests. This makes the interconnect the access bottleneck for a multi-core multi-slave coherence system. 
         [0005]    To reduce CPU cache miss stall overhead, cache components could issue cache allocate accesses with the request that the lower level memory hierarchy must return the “critical line first” to un-stall the CPU, then the non-critical line to finish the line fill. In a shared memory system, to serve one CPU&#39;s “critical line first” request could potentially extend the other CPU&#39;s stall overhead and reduce the shared memory throughput if the memory access types and sizes are not considered. The problem therefore to solve is how to serve memory accesses from multiple system components to provide low overall CPU stall overhead and guarantee maximum memory throughput. 
         [0006]    Due to the increased number of shared components and expended shareable memory space, to support data consistency while reducing memory access latency for all cores while maintaining maximum shared memory bandwidth and throughput is a challenge. Speculative memory access is one of the performance optimization method adopted in hardware design. 
       SUMMARY OF THE INVENTION 
       [0007]    The invention shown unifies all transaction types to a certain slave before the access commands are arbitrated. This reduces the complexity of the central arbitration and provides the best bandwidth management among all masters. 
         [0008]    The two consecutive slots per cache line access are always in the same direction, guaranteeing maximum and optimal bank access for multicore systems. 
         [0009]    Since off chip memory has longer latency, the critical line of the current cache access has the highest priority. 
         [0010]    A return buffer adjusts the return order of the returned data with no hardware penalty and without a performance loss. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWING 
         [0011]    These and other aspects of this invention are illustrated in the drawing, in which: 
           [0012]    The FIGURE shows a high level block diagram of the Multicore Shared Memory Controller. 
       
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
       [0013]    The MSMC (Multicore Shared Memory Controller) is a module designed to manage traffic between multiple processor cores, other mastering peripherals or DMA, and the EMIF (External Memory InterFace) in a multicore SoC. 
         [0014]    The MSMC provides a shared on-chip memory that can be used either as a shared on-chip SRAM or as a cache for external memory traffic. The MSMC module is implemented to support a cluster of up to eight processor cores and be instantiated in up to four such clusters in a multiprocessor SoC. The MSMC includes a Memory Protection and Address eXtension unit (MPAX), which is used to convert 32-bit virtual addresses to 40-bit physical addresses, and performs protection checks on the MSMC system slave ports. The following features are supported in one implementation of the MSMC: 
         [0015]    Configurable number of CPU cores, 
         [0016]    One 256-bit wide EMIF master port, 
         [0017]    One 256-bit wide System Master port, 
         [0018]    Two 256-bit wide System Slave ports, 
         [0019]    CPU/1 frequency operation in MSM,C 
         [0020]    Level 2 or 3 SRAM shared among connected processor cores and DMA, 
         [0021]    Write transaction merge support for SRAM accesses, 
         [0022]    Supports 8 SRAM banks, each can be accessed in parallel every clock cycle, 
         [0023]    Each SRAM bank has 4 virtual sub-banks, 
         [0024]    Memory protection for EMIF and MSMC SRAM space accesses from system masters, 
         [0025]    Address extension from 32 bits to 40 bits for system master accesses to shared memory and external memory, 
         [0026]    Optimized support for prefetch capabilities, 
         [0027]    System trace monitor support and statistics collection with CP_Tracer (outside MSMC) and AET event export, 
         [0028]    EDC and scrubbing support for MSMC memory (SRAM and cache storage), 
         [0029]    Firewall memory protection for SRAM space and DDR space, 
         [0030]    MPAX support for SES and SMS, 
         [0031]    MPAX provides 32 to 40 bit address extension/translation 
         [0032]    MPAX includes a Main TLB and uTLB memory page attribute caching structure, 
         [0033]    Coherency between A15 L1/L2 cache and EDMA/IO peripherals through SES/SMS port in SRAM space and DDR space. 
         [0034]    The FIGURE shows a high level view of the MSMC module that includes the main interfaces, memory, and subunits. 
         [0035]    The MSMC has a configurable number of slave interfaces  101  for CPU cores, two full VBusM slave interfaces  102  and  103  for connections to the SoC interconnect, one master port  104  to connect to the EMIF and one master port  105  to connect to the chip infrastructure. 
         [0036]    Each of the slave interfaces contains an elastic command buffer to hold one in-flight request when the interface is stalled due to loss of arbitration or an outstanding read data return. During that time, the other slave interfaces can continue to field accesses to endpoints that are not busy. 
         [0037]    The invention described implemented in a Multicore Shared Memory Controller, (MSMC) implements the following features: 
         [0038]    Segmentation of non-cacheline aligned requests for non-cacheable but shared transactions to enable parallel transactions to multiple slaves in atomic fation; 
         [0039]    Segmentation size is optimized to slave access request and master cache line size; 
         [0040]    In the MSMC platform, a shared on-chip SRAM is implemented as scratch memory space for all master components. This SRAM space is split into 8 parallel banks with the data width being the half of the cache line size. The segmentation boundary for the on-chip SRAM space is set to align with the bank data width size, and the MSMC central arbiter for on-chip SRAM banks reserves two back-to-back slots for each command worth of a single cache line fill; 
         [0041]    MSMC also handles all masters&#39; accesses to the off-chip DRAM space. The optimum access size is equal or larger than the cache line size. MSMC segmentation logic takes this slave request into account to split the commands on the cache line boundaries. The MSMC central arbiter for off-chip DRAM reserves two back-to-back slots for two commands worth of two cache line fills; 
         [0042]    If the command is less than a cache line size and couldn&#39;t fill in the clock cycles required for a full cache line allocate command, segmentation logic inserts a dummy command cycle to fill in the dummy bank slot; 
         [0043]    Due to the number of cores, size of on-chip SRAM and number of banks, the physical size of MSMC doesn&#39;t allow the central arbiter function to be completed in a single execution clock cycle. With two reserved cycles per command, the second cycle will take the decision from the first cycle, therefore the central arbiter doesn&#39;t need to be done in a single cycle; 
         [0044]    Memory access order is set to make sure the maximum memory bandwidth is utilized; 
         [0045]    Reverse write dataphases before committing if the critical line first request forces the higher address location dataphase to be written first; 
         [0046]    Reverse read returns if the higher address location dataphase is required to be to returned first by the component; 
         [0047]    Performance benefit in virtually banked SRAM memories since steps are always monotonic between virtual banks; 
         [0048]    Allows simplified virtual banking arbitration by effectively halving the number of virtual banks, and the MSMC central arbiter for off-chip DRAM reserves two back-to-back slots for two commands worth of two cache line fills; 
         [0049]    Each component has a dedicated return buffer which gets force-linear info for read return; 
         [0050]    Reference look-ahead message in distributed data return storage allowing this; 
         [0051]    Off-chip memory return without force-linear returns in different order; 
         [0052]    Each CPU has its own return buffer. The entry number of the return buffer is configurable to address different round trip latencies; 
         [0053]    With the addition of return buffer, MSMC passes each CPU&#39;s memory access request to the slaves without holding and treats them as speculative read requests. Meanwhile, if the request is to shared memory space, MSMC issues snoop request to the corresponding cache components. When both memory response and snoop response are returned, MSMC orders these responses in the return buffer per CPU bases according to data consistence rule; 
         [0054]    To keep a record of the data access ordering for correct data coherence support without performance degradation, pre-data messages in all cases are generated and saved in each entry of return buffer before the memory request and snoop request are issued. This ensures optimum performance of both coherent and non-coherent accesses and avoids protocol hazarding. The metadata and status bits in each entry are 
         [0055]    a. Original memory request identification number; 
         [0056]    b. Ready bit acts are time stamp for the status match of the corresponding entry to kick off the snoop response waiting period. This is very important since MSMC support hit-under-miss if current request overlaps with a previous in-flight memory access. This bit is used to accumulate the correct snoop response sequence for data consistency; 
         [0057]    c. Force_linear bit indicates the order of dataphase returns to support each CPU&#39;s cache miss request for performance purposes; 
         [0058]    d. Shareable bit which indicates if the snoop request therefore the responses will be counted by the return buffer or not; 
         [0059]    e. Memory read valid bit indicates the corresponding memory access responses has landed in the return buffer entry; 
         [0060]    f. Snoop response valid bit indicates the corresponding snoop access responses has landed in the return buffer entry; 
         [0061]    g. Memory access error bit indicates a memory access error has occurred; 
         [0062]    h. Snoop response error bit indicates a snoop response error has occurred; 
         [0063]    The return buffer also records the write respond status for coherence write hazard handling. 
         [0064]    Both error responds from memory access and snoop response will result in an error status return to the initiating master component. 
         [0065]    To support fragmented read returns, byte strobes are stored on a per byte bases. Each bit represents whether a byte lane worth of data is valid or not. All byte lanes have to be merged before valid the bit is asserted.