Many people are aware of the basic differences between the
Reduced Instruction Set Computer and Compound Instruction
Set Computer or RISC versus CISC, however, one
concept in chip design known as
sliding windows is one that
is not heard too often.
Traditionally, a word has a fixed size and in its purest sense, a machine word does have a fixed size. For example, an 8 bit word would be shifted into a register either in parallel or serial form. Not traditionally, however, is how all of those bits are used. In a regular window (or frame) format, the parts of the word that matter such as the instruction and any data are used - anything else is dropped off into the bit bucket. For example, if the following 8 bits word came up and it was a move of 4 bits of data. The theoretical instruction is defined by the first word and the second one contains the data:
1011 0110; the instruction 1100 0000; the data and 4 unused bits
It could be argued that the 4 bits being dropped are
The concept of the sliding register window is simple, there is no real predefined word length at the firmware level. While there is at the hardware level for sure, instead of dropping bits, unused bits can be used for the next instruction and/or data.
Initially, it might be thought that the windows would need some sort of framing (and indeed, some architectures do just that) but in theory if there are no hardware problems, the framing should be done automatically and need not be predefined.
Looking at the example from the previous section, here is the same set of bits:
1011 0110; the instruction 1100 0000; the data
When sliding the processor knows that
1011 0110 is
the instruction, it also knows to use only the next four
bits. The next four bits can be used as the first half of the next
instruction, lets say it is the same one but with different data,
now with only one more word, two instructions are completed:
1011 0110; the instruction 1100 1011; the data and first half of the next instruction 0110 0001; the second half of the next instruction and the data
To see the difference side by side really makes it obvious that sliding instructions certainly seem better. In the following, the same theoretical instruction is ran using both methods, fixed versus sliding:
FIXED SLIDING 1011 0110 1011 0110 1100 0000 1100 1011 1011 0110 0110 0001 0001 0000
While at first the comparison is easy to dismiss, when a chip can process millions of instructions in very short periods of time the benefit is pretty clear.