Unicode PACK Instruction Emulation Using Block-Based Conversion

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for emulating PACK instructions, particularly for Unicode and ASCII strings, are inefficient as they typically operate on a byte-by-byte basis, which is slower compared to block-by-block processing, and do not effectively handle big-endian and small-endian architectures.

Innovation Solution

A block-by-block algorithm is developed to convert Unicode and ASCII strings to packed formats, using specific C language scripts to process data in blocks of 8 bytes, with byte reversal functions to support both big-endian and small-endian architectures, allowing for efficient emulation of PKU and PKA instructions on diverse machine architectures.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If byte-by-byte processing is used for PACK instruction emulation, then compatibility with existing methods is maintained, but processing speed is slow

Engineering Contradiction:
Improveprocessing speedVSAvoidalgorithm complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent divides the PACK instruction processing into block-by-block operations instead of byte-by-byte processing. Each block processes multiple bytes simultaneously, segmenting the work into manageable chunks that can be handled more efficiently. This segmentation allows parallel processing of multiple bytes within each block, significantly improving throughput while maintaining manageable complexity through structured block handling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent merges multiple byte operations into single block operations. By combining the processing of multiple bytes into unified block-handling routines, the implementation reduces the overhead associated with repeated byte-by-byte processing. The merging of operations within each block enables more efficient use of processor resources and improves overall processing speed.

Inventive Principle:
Principle #5Merging (Combining)

2Productivity

If block-by-block processing is implemented, then processing efficiency is improved, but implementation complexity increases

Engineering Contradiction:
Improveprocessing efficiencyVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The implementation segments the block processing into standardized routines that handle fixed-size blocks. This segmentation creates reusable code modules that can be applied consistently across different PACK instruction scenarios. The segmented approach to block processing reduces implementation complexity by providing a systematic framework that can be followed repeatedly.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses parameter changes to control block processing behavior. By varying block size parameters and processing flags, the same core routine can handle different processing scenarios efficiently. This parameter-driven approach reduces implementation complexity by avoiding the need for multiple specialized routines, while still achieving high processing efficiency through optimized block operations.

Inventive Principle:
Principle #35Parameter changes

3Productivity

If endianness-specific code is written for each architecture, then architecture-specific optimization is achieved, but code portability is reduced

Engineering Contradiction:
Improvearchitecture-specific optimizationVSAvoidcode portability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent implements universal block processing routines that can operate on both big-endian and little-endian architectures. The same core block-handling code performs optimally on different architectures by using architecture-neutral data manipulation techniques. This universality achieves architecture-specific optimization without sacrificing portability, as the routines automatically adapt to the host architecture's endianness through standardized interfaces.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent introduces intermediary abstraction layers that mediate between the portable block processing logic and architecture-specific memory access patterns. These intermediaries handle endianness conversions and memory access optimizations transparently, allowing the core algorithm to remain architecture-independent while still achieving optimized performance on specific platforms. The intermediary layer preserves code portability while enabling architecture-specific optimizations.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS7868791B2Pack unicode zSeries instructions
Publication Date: 2011.01.11 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US7868791B2 patent drawing
  • US7868791B2 patent drawing
  • US7868791B2 patent drawing

AI summary

Emulation methods are provided for two PACK instructions, one for Unicode data and the other for ASCII coded data in which processing is carried out in a block-by-block fashion as opposed to a byte-by-byte fashion as a way to provide superior performance in the face of the usual challenges facing the execution of emulated data processing machine instructions as opposed to native instructions.