TL;DR
This paper presents a novel pipelined decompression architecture for embedded systems that sits between the instruction cache and the CPU. By carefully designing this decompression engine, the authors achieve significant performance improvements (up to 46%) and reduced power consumption without modifying the CPU architecture itself.
What Problem Does This Paper Address?
Traditionally, code compression in embedded systems has been primarily used to reduce memory footprint. Instructions are compressed, stored in memory, and then decompressed on-the-fly before reaching the instruction cache. However, with the increasing complexity of System-on-a-Chip (SoC) designs and the growing importance of performance and power efficiency in mobile and communication devices, simply reducing memory size is no longer the sole objective. The challenge lies in decompressing code efficiently close to the CPU to meet high instruction fetch rates and minimize power consumption, without introducing performance bottlenecks. This paper tackles the problem of designing a decompression unit that can keep up with high-performance CPUs and even enhance overall system performance and power efficiency.
Methods
The core of the paper is the design of a pipelined decompression engine (DCE) that acts as a "soft IP core." This means it can be integrated into an SoC design without requiring modifications to the CPU's architecture. Key aspects of their approach include:
- Strategic Placement: The DCE is placed between the instruction cache and the CPU. This allows for compressed code to be transferred to the cache, effectively increasing the cache's capacity and reducing bus traffic.
- Pipelined Architecture: The DCE itself is heavily pipelined, with four distinct pipelines designed to handle different groups of instructions (those with immediates, branch/call instructions, instructions without immediates, and uncompressed instructions). This parallel processing is crucial for achieving high throughput.
- Instruction Grouping: Instructions are categorized into four groups to optimize compression and decompression. This allows for specialized handling within the DCE.
- Input/Output Buffers: Input and output buffers are designed to manage the flow of compressed and decompressed instructions, respectively. The paper discusses strategies for handling out-of-order instruction completion due to variable decompression times.
- Branch Handling: A significant focus is placed on efficiently handling branches. The DCE incorporates an "Instruction Trace Tagging" (ITT) mechanism and a control unit that selectively flushes only necessary instructions from the pipeline when a branch is taken, minimizing performance penalties.
- Simulation and Dimensioning: The architecture was extensively simulated to determine optimal parameters for pipeline stages, buffer sizes, and other design choices.
Datasets
The paper evaluates its architecture using several applications, including "13d," "cpr," "diesel," "key," "mpeg," "smo," and "trick." These are likely representative embedded system benchmarks. The paper does not introduce new benchmark datasets.
Key Insights and Ideas
- Decompression Near the CPU is Key: Placing the decompression unit close to the CPU, rather than just before the main memory, unlocks significant performance and power benefits by reducing bus traffic and effectively increasing cache capacity.
- Pipelining is Essential for Throughput: The multi-pipeline approach, tailored to different instruction types, is critical for keeping pace with the CPU's high instruction fetch rate.
- Efficient Branch Handling is Non-Trivial but Achievable: The ITT mechanism and selective flushing are crucial for mitigating the performance impact of branches in a deeply pipelined system. This is a significant contribution to making compressed code viable in performance-sensitive applications.
- Soft IP Core Advantage: Designing the DCE as a soft IP core makes it highly adaptable and easy to integrate into various SoC designs without requiring CPU modifications, which is a major practical advantage.
- Trade-offs in Cache Size: The paper highlights that while compression reduces cache misses, the optimal cache size for a compressed system might differ from a non-compressed one, and there are trade-offs between cache size, performance, and area.
Key Results
- Performance Increase: The proposed architecture achieves a performance increase of up to 46% compared to non-compressed systems.
- Reduced Power Consumption: The architecture also leads to reduced power consumption due to fewer bus transactions.
- Effective Compression Ratios: The paper reports overall compression ratios (compressed size / original size) ranging from approximately 0.50 to 0.56 across various applications.
- Cache Miss Reduction: For applications like MPEG, cache miss ratios are significantly reduced with code compression, especially for smaller cache sizes.
- Pipeline Utilization: Table 1 shows pipeline statistics, indicating that the Group 1 pipeline (handling instructions with immediates) is the most frequently used, as expected.
Limitations and Future Work
- Software Dependency: The paper notes that the decompression architecture is "only useful in embedded systems where the software running on the system is known a priori." This implies that the compression/decompression algorithms are tailored to specific instruction sets and potentially application characteristics.
- Complexity of Out-of-Order Results: While the architecture handles out-of-order instruction completion, the paper acknowledges that this imposes additional complexity on the design of the DCE.
- Future Work: The paper suggests that similar graphs and analyses can be compiled for other applications to further validate the design. The focus of this paper was on the pipelined architecture itself, with the compression/decompression algorithm detailed in a companion paper.
Summary updated