The present invention relates generally to data decompression, and more particularly to the decompression of both serial and parallel data.
Many types of electronic devices require that information be loaded from a source and stored in a memory. For example, programmable logic devices are configured to implement a desired logical function based upon configuration data provided by a programming tool. The configuration data may be stored internally for a non-volatile device or externally for a volatile device. Regardless of whether the configuration data is stored internally or externally, the increasing complexity of programmable logic devices requires larger and larger amounts of configuration data. This increased configuration data size produces delays in the configuration process and increases the costs.
During the configuration process, the configuration data is typically serially-shifted into the devices responsive to cycles of a clock signal. For example, it is common to have one bit of the configuration data shift in for each clock cycle. As seen in
To reduce the storage requirement for the configuration data, the configuration data may be compressed. In addition, the compression of the configuration data decreases the amount of time needed to configure the corresponding programmable logic devices. Because a programmable logic device is very sensitive to errors in the configuration data stream, any compression of the data must be lossless or perfect such that the decompressed configuration data is exactly the same as the configuration data before compression. Because of the requirement for perfect compression, only a portion of the configuration data can generally be compressed. Thus, the configuration data being shifted into the device will comprise both uncompressed and compressed data. This mixed nature of the configuration data complicates the configuration data flow described with respect to
Accordingly, there is a need in the art for improved decompression techniques for data streams.
One aspect of the invention relates to a data decompression circuit for a data stream including code words representing compressed data words, the data stream also including uncompressed data, comprising: a translation circuit adapted to identify the code words in the data stream and to translate the identified code words into corresponding decompressed data words; and a shift register operable to serially shift in uncompressed data from the data stream and to shift in parallel the decompressed data words from the translation circuit.
Another aspect of the invention relates to a method of decompressing a serial data stream including code words representing compressed data, the data stream also including uncompressed data, the method comprising: examining the data stream to identify code words therein; if a code word representing compressed data is identified, translating the code word into a decompressed data word; and shifting the decompressed data word in parallel into a shift register.
Another aspect of the invention relates to a data decompression circuit for a data stream including code words representing compressed data and uncompressed data, comprising: a translation circuit operable to receive the data stream and distinguish between code words representing compressed data and uncompressed data therein, the translation circuit further operable to translate code words representing compressed data into decompressed data words; a shift register operable to serially shift in uncompressed data from the data stream in response to a first signal from the translation circuit and to shift in parallel decompressed data words in response to a second signal from the translation circuit.
Use of the same reference symbols in different figures indicates similar or identical items.
An exemplary embodiment of a data decompression circuit 200 is illustrated in
It will be appreciated that translation circuit 204 may be constructed using many alternative embodiments. For example, translation circuit 204 may comprise a decode logic circuit 205 that identifies the code words corresponding to compressed data words and translates the identified code words into address signals 240 provided to a lookup table 250. Lookup table 250 includes a memory such as a ROM or a RAM that stores the decompressed data words. In response to receiving the address signals 240, lookup table 250 “looks up” the corresponding stored decompressed data word at the identified address. Alternatively, translation circuit 204 may comprise a state machine (not illustrated) constructed such that it algorithmically generates the decompressed data words from the corresponding code words. In this fashion, translation circuit 204 need not store the decompressed data words in a memory but could simply generate them in response to receiving the corresponding code words.
A shift register 220 also receives the serial data stream 201. However, because of the presence of code words in the serial data stream 201, the serial data stream 201 cannot simply be blindly shifted into shift register 220 as discussed with respect to
Because shift register 220 may receive both uncompressed data in a serial fashion as well as decompressed data words from lookup table 250 in parallel, shift register 220 should accommodate both types of data reception. Uncompressed data may be serially shifted in a bit at a time in a conventional fashion as discussed with respect to
An exemplary shift register cell 300 is illustrated in
To enable a conventional serial shifting of uncompressed data, multiplexer 310a also receives a DIN signal 315 representing the serial data stream 201 of
When a decompressed data word is loaded in parallel into shift register cell 300, the previous data word stored in shift register cell 300 should be shifted in parallel to another shift register cell so that this previously-stored data word is not lost. Turning now to
To enable serial shifting of uncompressed data, the Q7 signal from register 305h in shift register cell 300a couples as signal DIN to multiplexer 310a of shift register cell 300b. Similarly, the Q7 signal from register 305h in shift register cell 300b couples as signal D1 to multiplexer 310a of shift register cell 300c, and so on. Regardless of whether serial or parallel shifting is enabled according to the state of skip signal 260, data is continually shifted through shift register 220 until it is full of fresh data. When shift register 220 is filled with fresh data, the entire data contents stored in shift register 220 may be transferred in parallel to memory 120 as discussed with respect to
Operation of system 200 may be explained with respect to the following data represented in hexadecimal format as: [0a][2c][45][2c][e3][c4][0a][0a] A compression scheme searches for repetitive patterns in the data and replaces them with code words. An exemplary compression scheme for the data stream just described is:
Code 01=0a
Code 10=2c
Code 11=45
Code 00=no compression.
Applying this compression to the data stream just described produces serial data stream 201 as:
01 10 11 10 00[e3] 00[c4] 01 01
with the leftmost 01 being the beginning of the above data stream.
Decode logic 205 responds to the presence of code word 01 by providing address signals 240 to LUT 250 such that the word [0a] is loaded in parallel into the first shift register cell 300a. The analogous process occurs for the code word sequences 10, 11, and 10. However, when code word [00] is identified by decode logic 205, the eight bits representing [e3] in serial data stream 200 are serially shifted into shift register 220. The analogous process occurs for the processing of 00[c4]. Finally, the code words 01 are identified by decode logic 205 and the decompressed data words [0a] loaded in parallel into shift register cell 300a. The resulting signal flow is:
It will be appreciated that the compression scheme just described uses two-bit code words merely for exemplary purposes. A more practical compression scheme would use more bits in the code words so that more data words could be compressed. For example, the use of 8-bit code words would allow the compression of 256 data words. Moreover, the code words may have varying lengths.
A flowchart for the logic implemented by decode logic 205 is illustrated in
Note the advantages of the data decompression scheme described herein. Code words are continually processed by decode logic 205. Should a processed code word indicate that the associated data is uncompressed, this uncompressed data may be serially shifted into shift register 220 a bit at a time responsive to clock 230. Should a processed code word indicate that the associated data is compressed, the corresponding decompressed data word is provided by LUT 250 to shift register 220 in parallel responsive to clock 230. Thus, as clock 230 cycles, either a bit of uncompressed data serially shifts into shift register 220 or a decompressed data word shifts in parallel into shift register 220. The incoming data rate in shift register 220 is thus kept synchronous with both the compressed and uncompressed data. The data rate change between uncompressed data and decompressed data words is accommodated very efficiently and simply.
The above-described embodiments of the present invention are merely meant to be illustrative and not limiting. It will thus be obvious to those skilled in the art that various changes and modifications may be made without departing from this invention in its broader aspects. For example, the external data stream being decompressed need not be serial. Turning now to
Number | Name | Date | Kind |
---|---|---|---|
3717851 | Cocke et al. | Feb 1973 | A |
4377757 | Konemann et al. | Mar 1983 | A |
5008905 | Lee et al. | Apr 1991 | A |
5220325 | Ackland et al. | Jun 1993 | A |
5394031 | Britton et al. | Feb 1995 | A |
5563592 | Cliff et al. | Oct 1996 | A |
5745734 | Craft et al. | Apr 1998 | A |
5768372 | Sung et al. | Jun 1998 | A |
5872529 | Mejia | Feb 1999 | A |
6028445 | Lawman | Feb 2000 | A |
6327634 | Statovici | Dec 2001 | B1 |
6493862 | Young | Dec 2002 | B1 |
6507943 | Kelem | Jan 2003 | B1 |
6525678 | Veenstra | Feb 2003 | B1 |
6563437 | Landry et al. | May 2003 | B1 |
6714044 | Rangan et al. | Mar 2004 | B1 |
6744388 | Khu | Jun 2004 | B1 |