Download ABEL-HDL Reference Manual

Transcript
Combined Logic Descriptions
Design Specification — BJACK
BJACK, the blackjack controller, is technically a state machine (a circuit capable of
storing an internal state reflecting prior events). State machines use sequential logic,
branching to new states and generating outputs on the basis of both the stored states
and external inputs.
In the case of the controller, the state machine stores states that reflect the following
blackjack machine conditions:
■
■
■
The value of Score in one of the decimal value ranges (0 to 16, 17 to 21, or 22+).
The status of the card reader (card in or card out).
The presence of an ace in the card reader.
On the basis of these stored states (and input from each new card), the controller
decides whether or not a +10 or -10 value is sent to the adder.
Design Method — BJACK
Developing a bubble diagram is the first step in describing a state machine.
Figure 4-22 shows a bubble diagram (pictorial state diagram) for the controller. This
bubble diagram indicates state transitions and the conditions that cause those
transitions. Transitions are represented by arrows and the conditions causing the
transitions are written alongside the arrow.
You must express the bubble diagram in the form shown in the state_diagram in
Figure 4-23. There is a one-to-one correlation between the bubble diagram and the
state diagram described in the source file (Figure 4-23). The table below describes
the state identifiers (state machine states) illustrated in the bubble diagram and listed
in the source file.
ABEL-HDL Reference Manual
142