PS3411-0600 Page 13 of 50
Advanced Hardware Architectures, Inc.
3.8 ALGORITHM
AHA3411 compre ssi on is an ef f ic ient
implementat ion of an a lgor it hm opti mi zed for
bitonal i ma ges. For some com pari son data ref er to
the AHA Application Note ( AN D C13 ) , Compr ession
Performance: StarLiteTM: ENCODEB2 on
Bitonal Images. A software e mulat ion of the
algorit hm i s av ail abl e for evalua tio n.
3.9 COMPRESSION ENGINE
The compression engine supports either
compression or pass-through processes. The
compression engine is enabled with the CO MP bit in
the Compr ession Contr ol register . When the engine is
enabled, it takes data from the CI F I 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 CPAS S bit in the Compression
Control register. The CP ASS bit may only be changed
when CO MP is set to ‘0’. The contents of the
dictionary are preserved when C OMP is changed.
However , when CPAS 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 compressor stops
taking 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 compres sor ha lts at the end
of the multiple-record transfer. The CEMP bit
indicates the compressor has emptied all data.
Compression is res tarted by settin g 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 condi ti ons ca use 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 as it become s available. This dat a 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,
AHA3411 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 multipl e-record transfer.
If the DPOR bit is set, the decompressor stops taking
data out of the DI FIFO immediat ely a ft er t he l ast
byte of a re cor d, and t he DCOMP bit i s cl ear ed. I f
DPOT bit is set the decompr essor hal ts at the end of
the multiple-record transfer . The DEMP bit indicates
the decompres sor has e mptied of all data . Decom-
pression i s r est art ed by settin g the DCOMP bit. If
DPOR or DPOT is set and data from a second record
enters the FIFO immediat ely after t he f ir st r eco rd,
bytes from t he se cond r ecor d wil l ha ve entered the
decompressor pri or t o dec oding the EOR. An impli-
cation of this is that bytes from the second record will
remain in the decompressor and prevent DEMP from
setting after a ll o f t he data from the fi rst record has
left t he decompressor. This diff ers from op eration of
the compress ion e ngine . In e it her mode , a DEOR
interrup t i s ge nerated when t he l ast byte of a de com-
pressed re cor d is r ead out of th e chi p, and DEOT
when the last byte of a transfer is read out of the chip.
The decompressor takes data from the
decompression input FIFO at a maximum rate of
33 MBytes/sec. AHA3411 can maintain this data
rate a s long as the deco mpressi on input FIFO is not
empty or the deco mpressi on output FIFO is not full.
Caveat: Changing the mode for the
decompressor between records or multiple -record
transfers must be done with the data of the following
record or transfer 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 automatically with
prearming.
3.11 PREARMING
Prearming is the ability to write certain
registers that apply to th e next recor d while the
device is processing the current record. These
regist er s may be prearmed for recor d bounda ri es.
Prearming is automat ic, meaning ther e is no way to
disable it. If a prea rmable register is written whil e
the part is busy processing a record, at the end of the
record the part takes its program fr om the regi ster
value last written. Compression Control and
Decompression Control registers each have
separate corresponding prearm registers.