Actions

Difference between revisions of "Sx instruction decision tree"

From Just in Time

 
m
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
The image below shows a decision tree that can be used by an SX instruction decoder. Such a decoder could examine the bits of an instruction word from most significant (left) to least significant (right), starting at the root of the tree. Depending on the bit value found, the decoder takes either the '1' or the '0' branch. When the decoder reaches a labeled node, we have decoded enough bits to identify the instruction. Example: when the encoder finds the bit values 0, 1, 0, 1, we've identified the 'setb_fr_bit' ('''SETB <fr>.<bit>''') instruction.
 +
 +
Instead of '1' and '0', there are a few 'x', or don't-care values in this tree. This means that an instruction decoder that is only interested in documented instructions does not have to look at the corresponding bit, because either the 0, or 1-branch don't lead to known instructions. I've used one of those branches to introduce a ''BREAKPOINT''-instruction, just for the SX emulator.
 +
 
[[Image:Sx instruction decision tree.png]]
 
[[Image:Sx instruction decision tree.png]]

Latest revision as of 21:36, 24 January 2015

The image below shows a decision tree that can be used by an SX instruction decoder. Such a decoder could examine the bits of an instruction word from most significant (left) to least significant (right), starting at the root of the tree. Depending on the bit value found, the decoder takes either the '1' or the '0' branch. When the decoder reaches a labeled node, we have decoded enough bits to identify the instruction. Example: when the encoder finds the bit values 0, 1, 0, 1, we've identified the 'setb_fr_bit' (SETB <fr>.<bit>) instruction.

Instead of '1' and '0', there are a few 'x', or don't-care values in this tree. This means that an instruction decoder that is only interested in documented instructions does not have to look at the corresponding bit, because either the 0, or 1-branch don't lead to known instructions. I've used one of those branches to introduce a BREAKPOINT-instruction, just for the SX emulator.

Sx instruction decision tree.png