PS3431-0500 Page 13 of 50
Advanced Hardware Architectures, Inc.
3.8 ALGORITHM
AHA3431 compress ion is an efficient
implementation of an algorithm optimized for
bitonal images. For some comparison data refer to
the AHA Application Note ( AN DC13), Compr ession
Performance: StarLiteTM: ENCODEB2 on
Bitonal Images. A software emulation of the
algorithm is available for evaluation.
3.9 COMPRESSION ENGINE
The compression engine supports either
compression or pass-through processes. The
compression engine is enabled with the CO M P bit in
the Compr ession Contr ol register . When the engine is
enabled, it takes data from the CI FI F O as it becomes
available. This data is either compressed by the engine
or passed through unaltered. This pass-through mode
is selected with the CPASS bit in the Compression
Control register . The CPASS bit may only be changed
when COM P is set to ‘0’. The contents of the
dictionary are preserved when COMP is changed.
However , when CPA S S is changed, the contents are
lost. Consequently, the device cannot be changed from
pass-through mode to compression mode or vice versa
without losing the contents of the dictionary.
The compress or can be instructed to halt at the
end of a record or an end of multiple-record transfer.
If the CPOR bit is set, the com pressor stops taki ng
data out of the CI FIFO immediately after the last
byte of a record, and the COMP bit is cleared. If the
CPOT bit is set the compressor halts at the end of the
multiple-record transfer. The CEMP bit indicates
the compressor has emptied all data. Compression is
restarted by setting the COMP bit.
The compressi on engi ne t akes data from the
compression input FIFO at a maxi mum r ate of 33
MBytes/sec. Two conditions cause t he data rat e to
drop below the maxi mum. The first is caused by the
compression input FIFO running empty of data to be
compress ed. The seco nd condition i s ca used b y the
output FIFO fi ll ing. When thi s occurs, the engi ne
halts and waits for the FIFO. While halted, the engine
goes into a low power standby mode. Refe r to the
table in Se cti on 7.1 for the exte nt of power savi ngs.
The compression byte counter counts the number
of bytes output from the CO data port. The counter is
valid to read after a compression end of transfer
interrupt (CEOT), or pausing after End-of-Record.
3.10 DECOMPRESSION ENGINE
The decompression engine is enabled with the
DCOMP bit in the Deco mpr ession Contr ol register .
When the engine is enabled , it takes data fro m the
DI FIFO a s it be comes a vailable. This d ata is either
decompressed by the engine or passed through
unaltered. Pass-through mode is selected with the
DPASS bit. DPASS may only be changed when
DCOMP is set to zero an d DEMP is set to one. The
contents of the dictionary are preserved when
DCOMP is changed. However, when DPASS is
changed, the contents are lost. Consequently,
AHA3431 cannot be changed from pass-through
mode to decompression mode or vice versa wi thout
losing the contents of the dictionary.
The decompressor can be instructed to halt at
the end of a record or an end of multiple-record
transfer. If the DPOR bit is set, the decompressor
stops taking data out of the DI FIFO immediately
after the last byte of a record, and the DCOMP bit is
cleared. If DPOT bit is set the decompressor halts at
the end of the multiple-record transfer. The DEMP
bit indicates the decompressor has emptied of all
data. Decompression is restarted by setting the
DCOMP bit. If DPOR or DPOT is set and data from
a second record enters the FIFO immediately after
the first record, bytes from the second record will
have entered the decompressor prior to decoding the
EOR. An im plication of th is is that bytes f rom the
second r eco rd will remai n in t he deco mpres sor an d
prevent DEMP from setting after all of the data from
the first r ecord has le ft the d ecompressor. This
differs from operation of the compression engine. In
either mode, a DEOR interrupt is generated when
the las t byte of a decompressed record is read out of
the chip, and DEOT when the last byte of a transfer
is read out of th e chip .
The decompressor takes data from the
decompres sio n input FIFO at the maximum clock
rate. AHA3431 can maintain this data rate as long as
the decompression input FIFO is not empty or the
decompression output FIFO is not full.
Caveat: Changing the mode for the decompressor
between reco rds or multipl e-record t ransfers must be
done with the data of the following record or tr ansfer
held off until the DEOR status bit is true for the current
record and the Decompression Control registers have
been reprogrammed . This reprogramming can occur
automatic ally wi th prearming.
3.11 PREARMING
Prearming i s the ability to wri te certa in regist ers
that apply to t he next record whi le the device is
processing the c urrent rec ord. Prea rming occurs
automatic ally at the end of a record. I f a prearmable
register i s written whil e the part i s busy pro cessing a
record, at the end of the record the part takes its program
from the regist er valu e last written. Com pression
Control and Decompressio n Control register s each
have separate cor responding pr earm registe rs.