contents.gifindex.gif

Design Method - MUXADD

MUXADD consists of a 3-input multiplexer, a 5-bit ripple adder, and a 5-bit comparator. For the multiplexer inputs, a set named Card defines inputs V0-V4 as the value of the card reader, while inputs ADD10 and SUB10 are used directly in the following equations to define the multiplexer. The multiplexer output to the adder is named Data and is defined by the equations:

DATA = ADD10 & SUB10 & Card
# !ADD10 & SUB10 & ten
# ADD10 & !SUB10 & minus_ten;

The adder is a 5-bit binary ripple adder that adds the current input from the multiplexer to the current score, with carry. The adder is clocked by AddClk from the BJACK controller and is described with the equations:

Score := Data $ Score.fb $ CarryIn;
CarryOut = Data & Score.fb # (Data # Score.fb) & CarryIn;
Reset = !Clr;

In these equations, Score is the sum of Data, Score (the last calculated score), and CarryIn (the shifted value of CarryOut). The new value of Score appears at the S0-S4 outputs of MUXADD at the time of the AddClk pulse from BJACK.

Before the AddClk pulse, an intermediate adder output, labeled C0-C4, appears and is defined as the set named CarryOut. A second set named CarryIn defines the same combinational outputs as CarryOut, but the outputs are shifted one bit to the left, as follows:

CarryIn = [C4..C1, 0];
CarryOut = [X ,C4..C1];

The set declarations define CarryIn and CarryOut with the required shift to the left for application back to the adder input. At the time of the AddClk pulse, CarryIn is added to Score and Data by an exclusive-OR operation.

The comparator of MUXADD is defined with:

is_Ace = Card == 1;

which provides an input to BJACK whenever the value of the card is 1.