Browse Prior Art Database

Algorithm for Conversion of M-Width Data Segments into N-Width Data Space When Moving Data between Incompatible Physical, Logical, or Virtual Devices

IP.com Disclosure Number: IPCOM000112886D
Original Publication Date: 1994-Jun-01
Included in the Prior Art Database: 2005-Mar-27
Document File: 6 page(s) / 201K

Publishing Venue

IBM

Related People

Johnson Jr, LE: AUTHOR [+2]

Abstract

Based on the application, the size of a data segment necessary for some operations may differ from that provided in the host architecture. It is therefore desirable to have a portion of the code or logic that facilitates this data segment size translation quickly and efficiently.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 37% of the total text.

Algorithm for Conversion of M-Width Data Segments into N-Width Data
Space When Moving Data between Incompatible Physical, Logical, or
Virtual Devices

      Based on the application, the size of a data segment necessary
for some operations may differ from that provided in the host
architecture.  It is therefore desirable to have a portion of the
code or logic that facilitates this data segment size translation
quickly and efficiently.

      This disclosure solves the data segment size problem by
creating a data format conversion algorithm that utilizes information
regarding the source data size, the destination data size, and the
packet width of the data.  It will be shown that this algorithm can
be efficiently implemented in hardware and software.

      Data format conversion is very important in many applications
in modern computing systems, ranging from graphics rasterization to
memory subsystems.  The presented algorithm allows one to convert
data formatted in M-wise data segments (or blocks) to N-wise data
segments (or blocks).  This is performed by determining the smallest
data segment size (e.g., "byte" or "bit") and then performing the
algorithm.

      Description of Algorithm - Consider a data source that
possesses data stored in M-wise blocks.  Consider a destination that
requires data formatting in N-wise blocks.  The data from the source
is offset into the initial data group by an offset Z (Z can be 0).
The destination may require some offset Y (Y may be 0).  It is
desired by an application to place the source data into the
destination space, adhering to the restrictions of the destination
space in terms of width and block- wise offsets.

The algorithm requires the following 'variables' to be known:
  a) N, the size of the destination block
  b) M, the size of the source block
  c) Z, the source data offset
  d) Y, the destination data offset
  e) W, the width of data to be transferred
  f) B, the number 'widths' of data to be transferred

In addition, the algorithm requires the creation of support
variables:
  a) WR, width of data needing to be transferred
  b) SDL, source data remaining in source block
  c) DDL, destination data needed to fill destination block

Figs. 1 and 2 reflect a clearer illustration of this data
organization.

      It is necessary to create a number of comparisons that will
give information regarding the state of the data transfer.  These
comparisons are:
  WR_GT_DDL occurs when WR is greater than DDL
  WR_GT_SDL occurs when WR is greater than SDL
  DDL_GT_SDL occurs when DDL is greater than SDL

      Additional support variables are created to ensure that the
source data is concatenated onto the end of the previously placed
destination data.  These include MASK, an N wide word that creates a
data mask to prevent corruption of previously placed data, and
ROT_VAL, a calculable number to input into a data rotator, which is
an integral part of the hardware requi...