You are on page 1of 47

Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

DESIGN EXAMPLES demonstrate some coprocessor like functions consecutive D flip-flop fusing images. Note
Most designers tend to view a PLD as a as well as homemade “standard products”. that asynchronous sets and resets may be
mechanism for collecting logical glue within a achieved for free, in this version. In both
The method of associating gates within the
system. That is, those pieces which tie Figures 1 and 2 the gates are numbered in a
NAND foldback structure is depicted in
together the larger LSI microprocessors, one-to-one arrangement. As well, the
Figure 1 wherein a simple three to eight
controllers, RAMs, ROMs, UARTs, etc. accompanying equations are in the format
decoder is fused into the array. The
However, there is a tendency of viewing a used by Philips SNAP design software. For
corresponding inputs are on the left and
gate array as an entire system on a chip. clarity, consider the gate labeled 2A in
outputs at the top. This figure shows inputs
PML based products will fit well in either Figure 1. Schematically, this is shown as a
and their inverse formed in the array resulting
casting as will be demonstrated by a series of 3 input NAND. However, in the fused
in a solution that requires 6 inverting NANDs
small but straightforward examples. For depiction, it combines from three intermediate
that would probably be best generated at the
starters, we shall examine how the fusing output points with the dot intersect
input receivers. Hence, this diagram could be
process embeds function, progress to designation. Hence, all gates are drawn as
trimmed by six gates, down to eight to
glue-like decoding operations and finally single input NANDs whose inputs span the
achieve the function. Figure 2 shows two
complete NAND gate foldback structure.

1 OF 8 DECODER/DEMULITPLEXER

BNN
ANN CNN
8 E 0 Y0 CN T
EN BN
AN 7 6 54 3 21 0 E

1 Y1 A 9

B 10

2 Y2 C 11

12
3 Y3
13

14
4 Y4
7
ANN
9 12 5 Y5 6
AN
A
5
BNN
10 13 6 Y6
BN 4
B
CNN
3
11 14 7 Y7
CN
C
2

0
@LOGIC EQUATION
AN = /A;
8
BN = /B;
CN = /C;
ANN = /AN; EN
BNN = /BN;
CNN = /CN;
E = /EN;
Y0 = / (AN * BN * CN * E);
Y1 = / ANN * BN * CN * E);
Y2 = / AN * BNN * CN * E);
Y3 = / ANN * BNN * CN * E);
Y4 = / AN * BN * CNN * E);
Y5 = / ANN * BN * CNN * E);
Y6 = / AN * BNN * CNN * E);
Y7 = / ANN * BNN * CNN * E);

Figure 1. Decoder Implementation in NAND Foldback Structure

October 1993 27
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

4A DA2 1B DA1

SN2 SN1
4B 1B
6A Q2 3A Q1

CLOCK2 CLOCK1
RN2 6B QN2 RN1 3B QN1
5A 2A

5B DN2 2B DN1
DATA2 DATA1

Q2 QN2 Q1 QN1

@LOGIC EQUATION /CLOCK2


DA1 = / (DN1 * SN1);
SN1 = / (DA * CLOCK1) /CLOCK1
RN1 = / (SN1 * CLOCK1 * DN1);
DN1 = / (DATA1 * RN1);
6A
Q1 = / (SN1 * QN1);
QN1 = / (RN1 * Q1);
6B
DA2 = / (DN2 * SN2);
SN2 = / (DA2 * CLOCK2) 4A
RN2 = / (SN2 * CLOCK2 * DN2);
DN2 = / (DATA2 * RN2); 4B
Q2 = / (SN2 * QN1);
QN2 = / (RN2 * Q2); 5A

DATA2 5B

3A

3B

1A

1B

2A

DATA1 2B

Figure 2. Two Flip-Flops Implemented in the NAND Foldback Strucutre

One straightforward example of using a selection. As well, the designer could


PLHS501 is shown in Figure 3. Here, the transform the bidirectionals to inputs and
A23 SEL0
device is configured to accept the 23 upper decode over a 32 bit space, selecting
address lines generated by a 68000 combinations off of a 32 bit wide address PLHS501
microprocessor. By selecting the direct and bus. Because this simple level of design 68000 SEL1
complemented variables, at least 16 distinct requires only NAND output terms plus 4 A1 SEL15
address selections can be made using only NAND gates in the foldback array (for AS 8 BIDIRECTIONAL
the dedicated outputs. The designer can inversion of signals connected to O3.O0), PINS
combine additional VME bus strobes, or other there may be as many as 68 remaining gates
control signals to qualify the decode or, to accomplish additional handshaking or
define 8 additional outputs for expanded logical operations on the input variables.
Figure 3. 68000 Microprocessor
Address Decode

October 1993 28
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

A0
A1
A2
A3
A4
A5
A6
A7

110
111
101
100
011
010
001
000

SHIFT0
SHIFT1
SHIFT2

/LE

B7 OUT7 B6 OUT6 B5 OUT5 B4 OUT4 B3 OUT3 B2 OUT2 B1 OUT1 B0 OUT0

Figure 4. 8-Bit Barrel Shifter Implemented with the PLHS501

An eight bit barrel shifter exploits most of the data, mirror imaged data (bit reversal) or byte be generated with remaining NAND functions
PLHS501 as depicted in Figure 4. This swapping to name a few. to achieve additional arithmetic operations.
implementation utilizes all 72 internal This application should make the reader
Part of an eight bit, look-ahead parallel adder
foldback NANDs in a relatively brute force aware of a new class of applications
is shown in Figure 5. Gates necessary to
configuration as well as 8 output NANDs to achievable with third generation PLDs - user
form the level-0 generate and propagate, as
generate transparent latched and shifted definable I/O coprocessors. The approach of
well as the XOR output gates generating the
results. The shift position here is generated increasing microprocessor performance by
resulting sum are not shown. The reader
by the shift 0, shift 1 and shift 2 inputs which designing dedicated task coprocessors is
should be aware that this solution exploits
are distinguished and selected from the input now within the grasp of user definable single
four layers of pyramided gates and only
cells. Variations on this idea of data chip solutions.
utilizes a total of about 58 gates. Additional
manipulation could include direct passing
comparison or Boolean operations could still

October 1993 29
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

An example of one of the least efficient


P8 structures realizable on the PLHS501 is
G7
shown in Figure 6. Here, a cascade of 12
P8
P7 C6
flip-flops are formed into a toggle chain that
G6 used all available NAND gates in the main
P8
P7 logic array. In the PLHS501 simple cross-
P5
G5 coupled latches or transparent D latches are
/G2I
/G6 preferred over edge triggered flip-flops simply
P8 because they conserve NAND gates.
P7 /P2I Applications for structures like this include
P6
P1I P5 timing generators, rate multiplication, etc.
C0 C4
P1I Rearranging Figure 6 as a 12-bit shifter,
/G1I G1I picking off states at the output terms could
P5 result in a general purpose sequence
P2I
G1I P1I C8
recognizer capable of recognizing binary
C0
P1I /G2I string sequences. These strings could be up
P6 C5
C0 to 13 bits long (in a Mealy configuration) and
/G5 24 distinct sequences could be sensed and
P1I detected.
P6
C0 C1
G5
Figure 7 shows a 32 to 5-bit priority encoder.
G1I /G1I
P5 C6
This sort of device could generate encoded
P6 P2
vector interrupts for 32 contending devices.
P1I G1
P6 Of particular interest is the fact that ordinary
P5 P2
C0 P1 C2 encoders are not this wide. The designer is,
/G6 C0 of course, not constrained to generating
/G2
P7 combinational functions in even powers of
P6 two. Thus, the PLHS501 can easily perform
G6
G5 customized functions like a 5 to 27 decoder
P7 P3
P6 C7 P2 or a 14 to 4 encoder or, even an 18 to 7
G5 C3
P1
G1I C0 multiplexor. For the sake of optimization, the
P7 P3
P6 P2 designer is encouraged to implement
P5 G1 precisely the function he needs, no more and
/G5
/G3 no less!
P7
P6 The design examples given are illustrative of
P4
P5
C0 G3 some typical operations used in ordinary
P1I P4 systems. In each case, the example could be
P3
P2 G1I thought of as simply an “off the shelf”
P4 standard solution to an every day problem
P3
P2 (i.e., a de facto standard product).
G1
O1 O2
/G4 O3 O4 O5 O6

P4
P3 /P1I
P2
D Q D Q P1 D Q D Q D Q D Q

CLK Figure 5.CLK


Partial NAND Gate CLK
Equivalence of the 8-Bit
CLK Look-Ahead Adder
CLK CLK CLK

RST QN RST QN RST QN RST QN RST QN RST QN

RST

QN RST QN RST QN RST QN RST QN RST QN RST

CLK CLK CLK CLK CLK CLK

Q D Q D Q D Q D Q D Q D

O12 O11 O10 O9 O8 O7

Figure 6. 12-Bit Ripple Counter

October 1993 30
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

1 A0N

1 A1N

1 A2N

1 A3N

A4N

EON

GSN
INPUT NAND OUTPUT
BUFFERS ARRAY TERMS

Figure 7. Encoder

October 1993 31
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

DEVELOPMENT SUPPORT The top portion of the shell depicts the paths It should be noted that the output of the
available for design entry. Any design may be “merger” block represents the composite
SNAP implemented in any one or a blend of all design, but as yet is not associated to a PML
Because the architecture encourages deep methods. For instance, a shift register might device. This occurs in the compiler portion
functional nesting, a new support tool has best be described schematically but a wherein association to the device occurs and
been developed. Synthesis, Netlist, Analysis decoder by logic equations. These may be a fusemap is compiled. This is analogous to
and Program (SNAP) software defines a gate united with a multiplexor described by a text placement and routing in a gate array
array type development environment. SNAP netlist as well. Ultimately, each form of input environment. Because of the inter-
permits several forms of design capture will be transformed to a function netlist and connectibility of PML, this is not difficult.
(schematic, Boolean equations, state passed either to the simulation section or to Once compiled, the exact assignment of pins,
equations, etc.), a gate array simulator with the compiler section. Waveform entry is for gates and flip-flops is known, so timing
back annotation, waveform display and a simulation stimuli. parameters may be associated and a new
complete fault analyzer and final fusemap simulation model generated with exact
The simulator portion of SNAP is a 5-State
compilation and model extraction. SNAP detailed timing embedded. The design may
gate array simulator with full timing
comes with a library of cells, and designs be simulated very accurately at this point,
information, setup and hold time checking,
may be captured independently of the and if correct, a part should be programmed.
toggle and fault grade analysis and the ability
ultimate device that will implement the
to display in a wide range of formats, any set To facilitate future migration to workstations,
design. This permits the designer to migrate
of nodes within the design. This permits a SNAP has been written largely in C. The
his design among a family of PML devices
designer to zoom in with a synthetic logic internal design representation is EDIF
just as gate array designs can be moved to
state analyzer and view the behavior of any (Electronic Design Interchange Format)
larger foundations when they do not route on
point in the design. Simulations can occur compatible which permits straightforward
smaller ones. Figure 8 shows the SNAP user
with unit delays, estimations or exact delays. porting to many commercially viable
interface “Shell” which dictates one sequence
The sequence of operations depicted in environments. SNAP currently utilizes
of operations to complete a design. Other
Figure 8 is entirely arbitrary, as many other OrCAD for schematic entry with eminent
sequences may be used.
paths exist. availability of FutureNetTM DASH.

ScCapture Abel2Snap Equations Minimizer

MacSel NetGen Edif NetConv

Merger

Waveforms SimNet Compiler

TestVector SimScl SimFlt ModGen DPI

SimPrt Plot Use cursor keys to select module


Use function keys to enter command

Figure 8. SNAP Shell Design

FutureNet and DASH are trademarks of DATA I/O

October 1993 32
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

PLHS501 EXAMPLES USING


************************************************************
SNAP * PLHS501 52–Pin PLCC Package Pin Layout *
• 8-bit barrel shifter * Date: 10/15/93 Time: 17:32:41 *
************************************************************
• 12-bit comparator with dual 1 of 8 decoders
C
• 8-bit carry look-ahead adder O
• 32 to 5 priority encoder S S S M
H H H P P
• 4-bit synchronous counter I I I L
F F F M
I
N
• VME EPROM interface A A T T T T L 5
1 0 2 1 0 O E 2
• Microchannel interface +–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
• NuBus interface |7|6|5|4|3|2|1|2|1|0|9|8|7|
• Data bus parity generator +––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
• 16-bit comparator |
|
1 1 1 1 1 1 1 1 9 8 7 6 5
7 6 5 4 3 2 1 0
|
|
| |
Following are example applications for the
[ 8|VCC VCC|46]
PLHS501 using SNAP. They should not be A2 [ 9|I18 I4|45]
viewed as showing all possible capabilities of A3 [10|I19 I3|44]
the device. They have been designed to A4 [11|I20 I2|43]
demonstrate some of the PLHS501 features, A5 [12|I21 I1|42]
syntax of SNAP, and to give the reader some A6 [13|I22 I0|41]
ideas for possible circuit implementations. A7 [14|I23 /B3|40] L0
L4 [15|B4 /B2|39] L1
Note that these examples were written using L5 [16|B5 /B1|38] L2
SNAP Rev. 1.90. Although Philips will try to L6 [17|B6 /B0|37] L3
keep succeeding versions of SNAP L7 [18|B7 X7|36] OUT7
[19|O0 X6|35] OUT6
compatible, it may be necessary to change
[20|GND GND|34]
some syntax rules. Therefore, please refer to | |
your SNAP manual for any notes on | / / / / |
differences, if using a revision later than | O O O O O O O X X X X X X |
Rev. 1.90. | 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
8-BIT BARREL SHIFTER +–+–+–+–+–+–+–+–+–+–+–+–+–+
This 8-bit shifter will shift to the right, data O O O O O O
applied to A7 – A9 with the result appearing U U U U U U
on OUT7 – OUT0. Data may be shifted by 1 T T T T T T
to 7 places by indicating the desired binary 0 1 2 3 4 5
count on pins SHIFT2 – SHIFT0. Data
applied to the OUT0 position for a shift of 1.
For a shift of 0, A7 will appear on OUT7. Figure 9. Barrel Shifter Pin List
Also included is a transparent latch for the
output bits. The input ‘COMPLMTO’ will invert
all output bits simultaneously and input /OE
will 3-State all outputs.
This design was done by using OrCAD’s SDT
with SNAP. The top level drawing is shown in
Figure 11. The PLHS501 has various output
structures. For the best fit, it was necessary
to alter the portion of the schematic
connecting to pins 15 – 18 compared to pins
37–40. This is shown in Figures 12 and 13.

October 1993 33
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

A0
A1
A2
A3
A4
A5
A6
A7

110
111
101
100
011
010
001
000

SHIFT0
SHIFT1
SHIFT2

/LE
COMPLMT0

/OE

OUT7 OUT6 OUT5 OUT4 OUT3 OUT2 OUT1 OUT0

Figure 10. 8-Bit Barrel Shifter Schematic

October 1993 34
BS BS1
D0 D1 U20

October 1993
D1 D0 O0 D2 D0 O7 1 2
D2 D1 INT D3 D1 INT
D3 D2 D4 D2 NIN
D4 D3 LE D5 D3 LE O7 1 U9
D5 D4 NLE D6 D4 NLE 3
D5 D5 2 OUT7
U1 D6 D7
D7 D6 D0 D6 U19
2 1 SA2 D7 D7 EX2 1 2
SA0n D0 SA0 D7
IN SA1n A0 SA1 A0 NIN
SHIFT2 A1 A1 O6 1 U10
SA2n SA2 3
U2 A2 A2
2 OUT6
2 1 SA2n
U18
EX2 1 2
NIN BS BS1
D7 D2
D0 D0 O1 D3 D0 O6 NIN
D1 INT D1 INT O5 1 U11
D1 D4 3
D2 D2 D5 D2 OUT5
D3 LE D3 LE 2
D3 D6
D4 D4 NLE D7 D4 NLE EX2
PLHS501 design examples

D5 D5 U17
U3 D5 D0
D6 D6 D1 D6 1 2
Philips Semiconductors Programmable Logic Devices

2 1 SA1 D7 D7
O4 1 U12
SA0 D1 SA0n D6 3 NIN
IN A0 A0 2 OUT4
SHIFT1 SA1n SA1
SA2n A1 SA2 A1
U4 A2 A2 EX2
2 1 SA1n

NIN BS BS1 O3 1 U13


D6 D3 3
D7 D0 O2 D4 D0 O5 2 OUT3
D0 D1 INT D5 D1 INT

35
D1 D2 D6 D2 EX2
D2 D3 LE D7 D3 LE
D3 D4 NLE D0 D4 NLE
D4 D5 D1 D5 O2 1 U14
U5 D6 D6
D5 D2 3
2 1 SA0 D7 D7 2 OUT2
SA0n D2 SA0 D5
IN A0 A0 EX2
SA1 SA1n
SHIFT0 A1 A1
SA2n SA2
U6 A2 A2
2 1 SA0n O1 1 U15
3
2 OUT1
NIN BS BS1

Figure 11. Barrel Shifter Top Level Drawing


D5 D4 EX2
D6 D0 O3 D5 D0 O4
D7 D1 INT D6 D1 INT
D0 D2 D7 D2
D3 LE D3 LE O0 1 U16
D1 D0
D2 D4 NLE D1 D4 NLE 3
D5 D5 2 OUT0
D3 D2
D4 D6 D3 D6
EX2
D7 D7
SA0 D3 SA0n D4
SA1 A0 SA1n A0
SA2n A1 SA2 A1
A2 A2

D0
A0
D1 U7 O7
A1 I7
D2 2 1 O6
A2 I6
D3 O5
A3 I5
D4 IN O4
A4 I4
O2 LE O3
A5 I3
O1 U8 O2
A6 I2
O0 2 1 O1
A7 I1 COMPLMTO
O0
NIN I0
AN049
Application Note
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

1 U10
2
3 6
4
D0
5
LE
NA5

1 U9
A0
2
3 6
4
D1
5
NA5

1 U8
2
A1 6
3
4
D2
5
NA5

1 U7
2
3 6
A2
4
D3
5
NA5

1 U6
2
3 6 1 U1
4 2
D4
5 3
NA5 4
5 10
1 U5 INT
6
2 7
3 6 8
4 9
D5
5
NA9
NA5

1 U4
U2
2
6 2
3 3
4
D6 1
5
NA5
NA2
1 U3
2
3 6
4
D7
5
NA5

DNLE

Figure 12. Portion of Shifter to Connect to NAND Output Pins

October 1993 36
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

1 U10
2
3 6
4
D0
5
LE
NA5

1 U9
A0
2
3 6
4
D1
5
NA5

1 U8
2
A1 6
3
4
D2
5
NA5

1 U7
2
3 6
A2
4
D3
5
NA5

1 U6
2
3 6 1 U1
4 2
D4
5 3
NA5 4
5 10
1 U5 INT
6
2 7
3 6 8
4 9
D5
5
NA9
NA5

1 U4 U99
U2
2
6 2 2 1
3 3
4
D6 1
5 NIN
NA5
NA2
1 U3
2
3 6
4
D7
5
NA5

DNLE

Figure 13. Portion of Shifter to Connect to AND Output Pins

October 1993 37
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

12-BIT COMPARATOR WITH


************************************************************ DUAL 1-OF-8 DECODERS
* PLHS501 52–Pin PLCC Package Pin Layout *
Two functions that are very often associated
* Date: 10/15/93 Time: 17:44:04 *
************************************************************ with controlling I/O parts are address
comparison and address decoding. In this
A A example, both functions are programmed into
A A A 1 1 A A B B B B B B a PLHS501 using 52 out of the 72 foldback
4 3 2 1 0 1 0 9 8 7 6 5 4 NAND terms.
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4| The comparator compares 12 bits on inputs
|7|6|5|4|3|2|1|2|1|0|9|8|7| A11 – A0 to inputs B11 – B0 when the input
+––––––––––––––––––––––––––––––––––+ ‘ENCMP’ is High. Output ‘CMPOUT’ will
| I I I I I I I I I I I I I | become Active-Low when all 12 bits of the A
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 | input match the B. Selection between the two
| | decoders is done with input ‘R/W’. Only one
[ 8|VCC VCC|46] output may be active (Low) at a time.
A5 [ 9|I18 I4|45] B3 Although currently separate functions, the
A6 [10|I19 I3|44] B2 decoder enable may be derived internally
A7 [11|I20 I2|43] B11 from ‘CMPOUT’ freeing 2 bidirectional pins
A8 [12|I21 I1|42] B10 which together with available foldback NAND
A9 [13|I22 I0|41] B1
B0 [14|I23 /B3|40] CMPOUT terms, may be used to incorporate a third
[15|B4 /B2|39] DA2 function.
ENCOMP [16|B5 /B1|38] DA1
DCDREN [17|B6 /B0|37] DA0
RW [18|B7 X7|36] R7
W0 [19|O0 X6|35] R6
[20|GND GND|34] A11 – A0
| | COMPARE CMPOUT
| / / / / |
| O O O O O O O X X X X X X | B11 – B0
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3| ENCOMP
+–+–+–+–+–+–+–+–+–+–+–+–+–+
W W W W W W W R R R R R R
1 2 3 4 5 6 7 0 1 2 3 4 5

DA2 W7 – W0
DA1 DUAL
DA0 1 OF 8
Figure 14. 12-Bit Comparator Pin List DECODERS
RW R7 – R0

DCDREN

Figure 15. 12-Bit Comparator with


Dual 1 – 8 Decoders Block Diagram

October 1993 38
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”FILENAME: CMP12BIT.EQN”
” 12–bit address comparator and dual 1 of 8 decoders”
@PINLIST
B0 I;
B1 I;
B2 I;
B3 I;
B4 I;
B5 I;
B6 I;
B7 I;
B8 I;
B9 I;
B10 I;
B11 I;
A0 I;
A1 I;
A2 I;
A3 I;
A4 I;
A5 I;
A6 I;
A7 I;
A8 I;
A9 I;
A10 I;
A11 I;
DA0 I;
DA1 I;
DA2 I;
RW I;
DCDREN I;
ENCOMP I;
W0 O;
W1 O;
W2 O;
W3 O;
W4 O;
W5 O;
W6 O;
W7 O;
R0 O;
R1 O;
R2 O;
R3 O;
R4 O;
R5 O;
R6 O;
R7 O;
CMPOUT O;
@LOGIC EQUATION
”COMMON PRODUCT TERM”
ad0=/da2*/da1*/da0*dcdren;
ad1=/da2*/da1* da0*dcdren;
ad2=/da2* da1*/da0*dcdren;
ad3=/da2* da1* da0*dcdren;
ad4= da2*/da1*/da0*dcdren;
ad5= da2*/da1* da0*dcdren;
ad6= da2* da1*/da0*dcdren;
ad7= da2* da1* da0*dcdren;

Figure 16. 12-Bit Comparator Boolean Equations (1 of 2)

October 1993 39
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”12–Bit Address Comparator”


axb0 = a0*/b0 + /a0*b0;
axb1 = a1*/b1 + /a1*b1;
axb2 = a2*/b2 + /a2*b2;
axb3 = a3*/b3 + /a3*b3;
axb4 = a4*/b4 + /a4*b4;
axb5 = a5*/b5 + /a5*b5;
axb6 = a6*/b6 + /a6*b6;
axb7 = a7*/b7 + /a7*b7;
axb8 = a8*/b8 + /a8*b8;
axb9 = a9*/b9 + /a9*b9;
axb10 = a10*/b10 + /a10*b10;
axb11 = a11*/b11 + /a11*b11;
cmpout = /(/axb0*/axb1*/axb2*/axb3*/axb4*/axb5*/axb6*/axb7*/axb8*/axb9*
/axb10*/axb11*encomp);
”Dual 1 of 8 decoders
– da2–da0 are address inputs
– dcdren is an enable input
– rw selects which group of 8 outputs r7–r0 or w7–w0
will have the decoded active low output”
w7 = /(ad7*/rw);
w6 = /(ad6*/rw);
w5 = /(ad5*/rw);
w4 = /(ad4*/rw);
w3 = /(ad3*/rw);
w2 = /(ad2*/rw);
w1 = /(ad1*/rw);
w0 = /(ad0*/rw);
r7 = /(ad7* rw);
r6 = /(ad6* rw);
r5 = /(ad5* rw);
r4 = /(ad4* rw);
r3 = /(ad3* rw);
r2 = /(ad2* rw);
r1 = /(ad1* rw);
r0 = /(ad0* rw);

Figure 16. 12-Bit Comparator Boolean Equations (2 of 2)

October 1993 40
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

8-BIT CARRY LOOK-AHEAD


***********************************************************
ADDER *
This function may be used as part of an ALU * PLHS501 52–Pin PLCC Package Pin Layout
design or simply to off-load a microprocessor. *
Figure 18 is a block diagram showing the * Date: 10/15/93 Time: 17:50:08
individual components needed for each bit. *
***********************************************************
A carry input (C0) is provided along with a *
carry output (C8). The result of an addition
between the inputs A7 – A0 and B7 – B0 A A A A A A A
6 5 4 3 2 1 0
occurs on outputs SUM7 – SUM0. +–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
A7 [ 9|I18 I4|45]
B0 [10|I19 I3|44] C0
B1 [11|I20 I2|43] B7
B2 [12|I21 I1|42] B6
B3 [13|I22 I0|41] B5
B4 [14|I23 /B3|40]
[15|B4 /B2|39]
[16|B5 /B1|38]
[17|B6 /B0|37]
[18|B7 X7|36]
SUM7
C8 [19|O0 X6|35]
SUM6
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
Figure 17. 8-Bit Adder
S Pin
S SList
S S S
U U U U U U
M M M M M M
0 1 2 3 4 5 ADDEND
AUGEND

8 7 6 5 4 3 2 1 LEVEL-0 FUNCTIONS

G8 P8 G7 P7 G6 P6 G5 P5 G4 P4 G3 P3 G2 P2 G1 P1

LEVEL-1
P2’ G2’ P2’ G2’ AUXILIARY
FUNCTIONS
GROUP 2 GROUP 1

5 9 7 5 3 7 5 3
C8 C7 C6 C5 C4 C3 C2 C1 CARRY
INFORMATION
C0
ADDEND
AUGEND

∑8 ∑7 ∑6 ∑5 ∑4 ∑3 ∑2 ∑1

NOTES:
G1’ = G4 + P4 * G3 + P4 * P3 * G2 + P4 * P3 * P2 * G1; C1 = G1 + P1 * C0;
P1’ = P4 * P3 * P2 * P1 C2 = G2 + P2 * G1 + P2 * P1 * C0;
G2’ = G8 + P8 * G7 + P8 * P7 * G6 + P8 * P7 * P6 * G5; C3 = G3 + P3 * G2 + P3 * P2 * G1 + P3 * P2 * P1 * C0;
P2’ = P8 * P7 * P6 * P5 C4 = G1’ + P1’ * C0;
C5 = G5 + P5 * G1’ +P5 * P1’ * C0;
C6 = G6 + P6 * G5 + P6 * P5 * G1’ + P6 * P5 * P1’ * C0;
C7 = G7 + P7 * G6 + P7 * P6 * G5 + P7 * P6 * P5 * G1’ +P7 * P6 * P5 * P1’ * C0;
C8 = G2’ + P2’ * G1’ + P2’ * P1’ * C0;

Figure 18. 8-Bit Carry Look-Ahead Adder Block Diagram and Equations

October 1993 41
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”FILENAME: ADDR8BIT.EQN
8 Bit Carry Look–Ahead Adder”
@PINLIST
A0 I;
A1 I;
A2 I;
A3 I;
A4 I;
A5 I;
A6 I;
A7 I;
B0 I;
B1 I;
B2 I;
B3 I;
B4 I;
B5 I;
B6 I;
B7 I;
C0 I;
C8 O;
SUM0 O;
SUM1 O;
SUM2 O;
SUM3 O;
SUM4 O;
SUM5 O;
SUM6 O;
SUM7 O;
@LOGIC EQUATION
”level–0 functions”
gn1 = /(a0*b0);
p1 = /(/a0*/b0);
g1 = /gn1;
gn2 = /(a1*b1);
p2 = /(/a1*/b1);
g2 = /gn2;
gn3 = /(a2*b2);
p3 = /(/a2*/b2);
g3 = /gn3;
gn4 = /(a3*b3);
p4 = /(/a3*/b3);
g4 = /gn4;
gn5 = /(a4*b4);
p5 = /(/a4*/b4);
g5 = /gn5;
gn6 = /(a5*b5);
p6 = /(/a5*/b5);
g6 = /gn6;
gn7 = /(a6*b6);
p7 = /(/a6*/b6);
g7 = /gn7;
gn8 = /(a7*b7);
p8 = /(/a7*/b7);
g8 = /gn8;
”level–1 functions”
g1_1 = g4 + p4*g3 + p4*p3*g2 + p4*p3*p2*g1;
g2_1 = g8 + p8*g7 + p8*p7*g6 + p8*p7*p6*g5;

Figure 19. 8-Bit Adder Boolean Equations (1 of 2)

October 1993 42
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”carry information”
c1 = g1 + p1*c0;
c2 = g2 + p2*g1 + p2*p1*c0;
c3 = g3 + p3*g2 + p3*p2*g1 + p3*p2*p1*c0;
c4 = g1_1 + p4*p3*p2*p1*c0;
c5 = g5 + p5*g1_1 + p5*p4*p3*p2*p1*c0;
c6 = g6 + p6*g5 + p6*p5*g1_1 + p6*p5*p4*p3*p2*p1*c0;
c7 = g7 + p7*g6 + p7*p6*g5 + p7*p6*p5*g1_1 + p7*p6*p5*p4*p3*p2*p1*c0;
c8 = g2_1 + p8*p7*p6*p5*g1_1 + p8*p7*p6*p5*p4*p3*p2*p1*c0;
”addition functions”
sum0 = c0 :+: (p1 * gn1);
sum1 = c1 :+: (p2 * gn2);
sum2 = c2 :+: (p3 * gn3);
sum3 = c3 :+: (p4 * gn4);
sum4 = c4 :+: (p5 * gn5);
sum5 = c5 :+: (p6 * gn6);
sum6 = c6 :+: (p7 * gn7);
sum7 = c7 :+: (p8 * gn8);

Figure 19. 8-Bit Adder Boolean Equations (2 of 2)

October 1993 43
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

32- to 5-BIT PRIORITY ENCODER


*********************************************************** This relatively simple example demonstrates
* the capability of the PLHS501 to be
* PLHS501 52–Pin PLCC Package Pin Layout
* programmed with functions that are not
* Date: 10/15/93 Time: 17:58:06 available in ‘standard’ device libraries. The
* equations may look difficult at first glance.
*********************************************************** However, there is a pattern to the encoding.
* Referring to Figure 21, Lab4 – Lab1 are
terms that are common to several outputs
I I I I I I I I I I I (A4n – A0n). Separating them from the main
1 1 1 1 1 3 I 3 I 2 2 2 2
5 4 3 2 1 1 0 0 2 9 8 7 6 equations allows a total reduction in the
+–+–+–+–+–+–+–+–+–+–+–+–+–+ numbers of gates used.
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
32 to 5
[ 8|VCC VCC|46] I31 – I0 PRIORITY A4 – A0
I16 [ 9|I18 I4|45] I25 ENCODER
I17 [10|I19 I3|44] I24 GSN
I18 [11|I20 I2|43] I23 ECN
I19 [12|I21 I1|42] I22
I1 [13|I22 I0|41] I21
I20 [14|I23 /B3|40] I10
I3 [15|B4 /B2|39] I9 Figure 21. 32 to 5 Priority Encoder
I4 [16|B5 /B1|38] I8 Block Diagram
I5 [17|B6 /B0|37] I7
I6 [18|B7 X7|36]
A0 [19|O0 X6|35]
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
Figure
A A A 20.
A Encoder
E Pin
G List
1 2 3 4 O S

October 1993 44
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”FILENAME: ENCODER.EQN
32 TO 5 PRIORITY ENCODER”
@PINLIST
I0 I;
I1 I;
I2 I;
I3 I;
I4 I;
I5 I;
I6 I;
I7 I;
I8 I;
I9 I;
I10 I;
I11 I;
I12 I;
I13 I;
I14 I;
I15 I;
I16 I;
I17 I;
I18 I;
I19 I;
I20 I;
I21 I;
I22 I;
I23 I;
I24 I;
I25 I;
I26 I;
I27 I;
I28 I;
I29 I;
I30 I;
I31 I;
A0 O;
A1 O;
A2 O;
A3 O;
A4 O;
GS O;
EO O;
@LOGIC EQUATION
”COMMON PRODUCT TERM”
cpt1 = i26*i27*i28*i29*i30*i31;
cpt2 = i20*i21*i22*i23*i24*i25;
cpt3 = i14*i15*i16*i17*i18*i19;
cpt4 = i8*i9*i10*i11*i12*i13;
A0=/( /i31
+/i29*i30*i31
+/i27*i28*i29*i30*i31
+/i25*cpt1
+/i23*i24*i25*cpt1
+/i21*i22*i23*i24*i25*cpt1
+/i19*cpt2*cpt1
+/i17*i18*i19*cpt2*cpt1
+/i15*i16*i17*i18*i9*cpt2*cpt1
+/i13*cpt3*cpt2*cpt1
+/i11*i12*i13*cpt3*cpt2*cpt1
+/i9 *i10*i11*i12*i13*cpt3*cpt2*cpt1
+/i7 *cpt4*cpt3*cpt2
+/i5 *i6*i7*cpt4*cpt3*cpt2*cpt1
+/i3 *i4*i5*i6*i7*cpt4*cpt3*cpt2*cpt1
+/i1 *i2*i3*i4*i5*i6*i7*cpt4*cpt3*cpt2*cpt1);
A1=/( /i31
+/i30*i31
+/i27*i28*i29*i30*i31
+/i26*i27*i28*i29*i30*i31

Figure 22. Encoder Boolean Equations (1 of 2)

October 1993 45
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

+/i23*i24*i25*cpt1
+/i22*i23*i24*i25*cpt1
+/i19*cpt2*cpt1
+/i18*i19*cpt2*cpt1
+/i15*i16*i17*i18*i19*cpt2*cpt1
+/i14*i15*i16*i17*i18*i19*cpt2*cpt1
+/i11*i12*i13*cpt3*cpt2*cpt1
+/i10*i11*i12*i13*cpt3*cpt2*cpt1
+/i7 *cpt4*cpt3*cpt2*cpt1
+/i6 *i7*cpt4*cpt3*cpt2*cpt1
+/i3 *i4*i5*i6*i7*cpt4*cpt3*cpt2*cpt1
+/i2 *i3*i4*i5*i6*i7*cpt4*cpt3*cpt2*cpt1);
A2=/( /i31
+/i30*i31
+/i29*i30*i31
+/i28*i29*i30*i31
+/i23*i24*i25*cpt1
+/i22*i23*i24*i25*cpt1
+/i21*i22*i23*i24*i25*cpt1
+/i20*i21*i22*i23*i24*i25*cpt1
+/i15*i16*i17*i18*i19*cpt2*cpt1
+/i14*i15*i16*i17*i18*i19*cpt2*cpt1
+/i13*cpt3*cpt2*cpt1
+/i12*i13*cpt3*cpt2*cpt1
+/i7 *cpt4*cpt3*cpt2*cpt1
+/i6 *i7*cpt4*cpt3*cpt2*cpt1
+/i5 *i6*i7*cpt4*cpt3*cpt2*cpt1
+/i4 *i5*i6*i7*cpt4*cpt3*cpt2*cpt1);
A3=/( /i31
+/i30*i31
+/i29*i30*i31
+/i28*i29*i30*i31
+/i27*i28*i29*i30*i31
+/i26*i27*i28*i29*i30*i31
+/i25*cpt1
+/i24*i25*cpt1
+/i15*i16*i17*i18*i19*cpt2*cpt1
+/i14*i15*i16*i17*i18*i19*cpt2*cpt1
+/i13*cpt3*cpt2*cpt1
+/i12*i13*cpt3*cpt2*cpt1
+/i11*i12*i13*cpt3*cpt2*cpt1
+/i10*i11*i12*i13*cpt3*cpt2*cpt1
+/i9 *i10*i11*i12*i13*cpt3*cpt2*cpt1
+/i8 *i9*i10*i11*i12*i13*cpt3*cpt2*cpt1);
A4=/( /i31
+/i30*i31
+/i29*i30*i31
+/i28*i29*i30*i31
+/i27*i28*i29*i30*i31
+/i26*i27*i28*i29*i30*i31
+/i25*cpt1
+/i24*i25*cpt1
+/i23*i24*i25*cpt1
+/i22*i23*i24*i25*cpt1
+/i21*i22*i23*i24*i25*cpt1
+/i20*i21*i22*i23*i24*i25*cpt1
+/i19*cpt2*cpt1
+/i18*i19*cpt2*cpt1
+/i17*i18*i19*cpt2*cpt1
+/i16*i17*i18*i19*cpt2*cpt1);
eo = /(i0*i1*i2*i3*i4*i5*i6*i7
*i8*i9*i10*i11*i12*i13*i14*i15
*i16*i17*i18*i19*i20*i21*i22*i23
*i24*i25*cpt1);
gs = /eo;

Figure 22. Encoder Boolean Equations (2 of 2)

October 1993 46
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

4-BIT SYNCHRONOUS COUNTER


This counter produces a binary count on ************************************************************
outputs Count3 – Count0. Note the required * PLHS501 52–Pin PLCC Package Pin Layout *
reset (RST) input to initialize all of the * Date: 10/18/93 Time: 09:51:23 *
flip-flops. The inputs for each flip-flop were ************************************************************
first determined by drawing the desired
R C
output waveforms. Next, Karnaugh maps S L
were used to reduce the number of terms and T K
determine the logic equations for the input to +–+–+–+–+–+–+–+–+–+–+–+–+–+
each flip-flop. This technique could be used | | | | | | | |5|5|5|4|4|4|
to construct a counter whose outputs |7|6|5|4|3|2|1|2|1|0|9|8|7|
produce some count other than binary. +––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
The simulation only consists of a reset, | 1 1 1 1 1 1 1 1 9 8 7 6 5 |
followed by a number of clocks to count from | 7 6 5 4 3 2 1 0 |
0 through 15 and back to 0. | |
[ 8|VCC VCC|46]
[ 9|I18 I4|45]
[10|I19 I3|44]
[11|I20 I2|43]
[12|I21 I1|42]
[13|I22 I0|41]
[14|I23 /B3|40]
COUNT0 [15|B4 /B2|39]
COUNT1 [16|B5 /B1|38]
COUNT2 [17|B6 /B0|37]
COUNT3 [18|B7 X7|36]
TC [19|O0 X6|35]
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+

Figure 23. 4-Bit Counter Pin List

October 1993 47
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”4 bit synchronous counter”


@PINLIST
CLK I;
RST I;
COUNT0 O;
COUNT1 O;
COUNT2 O;
COUNT3 O;
TC O;
@LOGIC EQUATION
”INPUTS FOR EACH FLIP–FLOP”
DATA1 = ((CQ1*CQN0)+(CQN1*CQ0));
DATA2 = ((CQ0*CQ1*CQN2)+(CQN0*CQ2)+(CQN1*CQ2));
DATA3 = ((CQN2*CQ3)+(CQN0*CQ3)+(CQ0*CQ1*CQ2*CQN3)+(CQN1*CQ3));
”4 D–TYPE FLIP FLOPS CONNECTED AS A SYNCHRONOUS COUNTER”
CSN0 = /(CLK*RST*(/(CSN0*(/(CQN0*RST*CRN0)))));
CRN0 = /(CSN0*CLK*(/(CQN0*RST*CRN0)));
CQ0 = /(CSN0*CQN0);
CQN0 = /(CRN0*CQ0*RST);
CSN1 = /(CLK*RST*(/(CSN1*(/(DATA1*RST*CRN1)))));
CRN1 = /(CSN1*CLK*(/(DATA1*RST*CRN1)));
CQ1 = /(CSN1*CQN1);
CQN1 = /(CRN1*CQ1*RST);
CSN2 = /(CLK*RST*(/(CSN2*(/(DATA2*RST*CRN2)))));
CRN2 = /(CSN2*CLK*(/(DATA2*RST*CRN2)));
CQ2 = /(CSN2*CQN2);
CQN2 = /(CRN2*CQ2*RST);
CSN3 = /(CLK*RST*(/(CSN3*(/(DATA3*RST*CRN3)))));
CRN3 = /(CSN3*CLK*(/(DATA3*RST*CRN3)));
CQ3 = /(CSN3*CQN3);
CQN3 = /(CRN3*CQ3*RST);
”Connection to output pins”
count0=cq0;
count1=cq1;
count2=cq2;
count3=cq3;
”TERMINAL COUNT PIN”
TC=(CQ0*CQ1*CQ2*CQ3);

Figure 24. 4-Bit Counter Boolean Equations

October 1993 48
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

VME Bus EPROM Interface package (Figures 25, 26, and 27). It was then As suggested in the original article, the circuit
The idea for this VMEbus EPROM board converted to logic equations using SNAP could be expanded to access up to eight
came from WIRELESS WORLD CIRCUIT (Figures 29 and 30) and then assembled into ROM banks (Figure 28B). This was achieved
IDEAS, January, 1988. The implementation a PLHS501. by editing the logic equation file and adding
was done by a Philips’ FAE, John McNally. extra equations (Figure 32). Modifying the
This application, which originally needed
drawing, although fairly easy to do, was not
The board contains two banks of EPROMs. eight ICs, used forty-four of the available
considered necessary as the object was to
Each bank consists of either two 27128s or seventy-two NAND Foldback Terms and forth
design with PML and not TTL. The expanded
two 27256s; each of which can be enabled by of the available fifty-two pins. As the
circuit would require another three TTL IC
comparing the address location fo the board. PLHS501 contains no registers, an
packages, brining the total to eleven if done
Decoding three other address bits selects edge-triggered D-type flip-flop was designed
using TTL devices. The number of foldback
which of the banks is accessed. A 4-bit shift using NAND gates and this is used as a soft
terms increased to fifty-five, with the number
register combined with four jumpers provide macro in order to implement the shift register
of pins rising to fifty. Figure 28 shows the
wait states. function (Figure 27).
pinout of both versions.
The circuit drawing was entered onto a PC
using FutureNet DASH, a schematic capture

740
1 2 ENADO

74521 G1
/A5 1 VCC
A17 2 19 /MASEL
S17 3 18 GND 1 7432
3 ENDATLO
A18 4 17 GND 2
S18 5 16 S23 G2
A19 6 15 A23
S19 7 14 S22
A20 8 13 A22
S20 9 12 S21
1 7432
GND 11 A21 7404 3 1 7432
1 2 2 3 ENDATHI
M1 2
G3 G4
G5

74138 /R–W
A16 1
2 15 ROM0
3 14 ROM1 1 7432 1 7432
3 /ROM1LO 3 /ROM1LO
4 13 NC 2 2
5 12 NC G6 G7
6 11 NC
NC 7 10 NC
NC 1 7432 1 7432
3 /ROM1HI 3 /ROM1HI
2 2
M2
G8 G9

/DS0 /DTACK
/DS1
R–WN

1 7400 7404
7495 2 7402 3 1 2 DTAK
1 G10 2
1 14 WAIT 3
G11 G12
2 13 O0 G10
3 12 O1
4 11 O2
5 10 O3 (SOURCE: WIRELESS WORLD, JAN. 1988, CIRCUIT IDEAS)
6
7 8

M3
CKBMZ

Figure 25. VME – EPROM Interface

October 1993 49
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

1 7410
2
13
G1 DA

1 7400
SN 1 7410
2 2 12 Q
G2 13
G3

PN 1 1 7400
2 7420 3 QN
CK 4 6 PN 2
5 G5
G4

1 7400 DN
7
D 2
G6

Figure 26. Edge-Triggered D Flip-Flop (DFFS)

7404
EL 1 2 SET

G1
DFFS DFFS DFFS DFFS
Q Q0 Q Q1 Q Q2 Q Q3
PN QN QN0 PN QN QN1 PN QN QN2 PN QN QN3
GND D RN RO0 D RN RO1 D RN RO2 D RN RO3
SN SO0 SN SO1 SN SO2 SN SO3
CLBMZ CK DN DO0 CK DN DO1 CK DN DO2 CK DN DO3

FF1 FF2 FF3 FF4

Figure 27. 4-Bit Shifter (7495)

October 1993 50
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

A. 2 ROM BANKS AS ORIGINAL CIRCUIT.


REPLACES 8 PACKAGES – USES 46 FOLDBACK TERMS

S17
/A5 S18
A16 S19
A17 S20
A18 S21
A19 S22
A20 S23

7 6 5 4 3 2 1 52 51 50 49 48 47
VCC 8 46 VCC
A21 9 45 WAIT
A22 10 44 N/C
A23 11 43 CKBMZ
/DS0 12 42 N/C
/DS1 13 PLHS501 41 N/C
R–WN 14 40 /R–W
Q0 15 39 DTAK
Q1 16 38 /DTACK
Q2 17 37 /MASEL
Q3 18 36 N/C
/ROM0LO 19 35 N/C
GND 20 VMEEXP 34 GND

21 22 23 24 25 26 27 28 29 30 31 32 33
/ROM0HI N/C
/ROM1LO N/C
/ROM1HI N/C
N/C ENDATHI
N/C ENDATLO
N/C ENADD
N/C

B. EXPANDED TO 8 ROM BANKS


REPLACES 11 PACKAGES – USES 55 FOLDBACK TERMS

S17
/A5 S18
A16 S19
A17 S20
A18 S21
A19 S22
A20 S23

7 6 5 4 3 2 1 52 51 50 49 48 47
VCC 8 46 VCC
A21 9 45 W2
A22 10 44 W1
A23 11 43 CKBMZ
/DS0 12 42 N/C
/DS1 13 PLHS501 41 N/C
R–WN 14 40 /R–W
REG 15 39 DTAK
ENADD 16 38 /DTACK
ENDATLO 17 37 /MASEL
ENDATHI 18 36 /ROM7HI
/ROM0LO 19 35 /ROM7LO
GND 20 FULLEXP 34 GND

21 22 23 24 25 26 27 28 29 30 31 32 33
/ROM0HI /ROM6HI
/ROM1LO /ROM6LO
/ROM1HI /ROM5HI
/ROM2LO /ROM5LO
/ROM2HI /ROM4HI
/ROM3LO /ROM4LO
/ROM3HI

Figure 28. VMEEXP and FULLEXP

October 1993 51
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

************************************************************
* PLHS501 52–Pin PLCC Package Pin Layout *
* Date: 10/24/93 Time: 17:24:59 *
************************************************************

A A A A A S S S S S S S
2 1 1 1 1 A 1 1 1 2 2 2 2
0 9 8 7 6 5 7 8 9 0 1 2 3
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
A21 [ 9|I18 I4|45] WAIT
A22 [10|I19 I3|44]
A23 [11|I20 I2|43] CKBMZ
DS0 [12|I21 I1|42]
DS1 [13|I22 I0|41]
RWN [14|I23 /B3|40] RW
Q0 [15|B4 /B2|39] DTACK
Q1 [16|B5 /B1|38] NDTACK
Q2 [17|B6 /B0|37] MASEL
Q3 [18|B7 X7|36]
ROM0LO [19|O0 X6|35]
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
R R R E E E
O O O N N N
M M M A D D
0 1 1 D A A
H L H D T T
I O I L H
O I

Figure 29. VMEEXP PLHS501 Pinlist

October 1993 52
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

@PINLIST
WAIT I;
CKBMZ I;
DS[1..0] I;
RWN I;
A5 I;
A[16..23] I;
S[17..23] I;
Q[0..3] O; ENDATLO O;
ROM0LO O; ENDATHI O;
ROM0HI O; RW O;
ROM1LO O; NDTACK O;
ROM1HI O; DTACK O;
ENADD O; MASEL O;
@LOGIC EQUATIONS
RO3 = (/(MASEL*SO3*CKBMZ*DO3));
SO3 = (/(CKBMZ*(/(SO3*DO3*MASEL))));
DO3 = (/(Q2*RO3));
RO2 = (/(MASEL*SO2*CKBMZ*DO2));
SO2 = (/(CKBMZ*(/(SO2*DO2*MASEL))));
DO2 = (/(Q1*RO2));
RO1 = (/(MASEL*SO1*CKBMZ*DO1));
SO1 = (/(CKBMZ*(/(SO1*DO1*MASEL))));
DO1 = (/(Q0*RO1));
RO0 = (/(MASEL*SO0*CKBMZ*DO0));
SO0 = (/(CKBMZ*(/(SO0*DO0*MASEL))));
DO0 = (/(0*RO0));
ROM0LO = (/DS0+(/(/A16*MASEL)));
ROM0HI = (/DS1+(/(/A16*MASEL)));
ROM1LO = (/DS0+(/( A16*MASEL)));
ROM1HI = (/DS1+(/( A16*MASEL)));
Q0 = (/((/(RO0*Q0))*SO0*(MASEL)));
Q1 = (/((/(RO1*Q1))*SO1*(MASEL)));
Q2 = (/((/(RO2*Q2))*SO2*(MASEL)));
Q3 = (/((/(RO3*Q3))*SO3*(MASEL)));
MASEL = /(/(/(/((A17*S17+/A17*/S17)
*(A18*S18+/A18*/S18)
*(A19*S19+/A19*/S19)
*(A20*S20+/A20*/S20)
*(A21*S21+/A21*/S21)
*(A22*S22+/A22*/S22)
*(A23*S23+/A23*/S23)
*(A5)))));
NDTACK = /((/(MASEL+WAIT))*RWN);
DTACK = /NDTACK;
RW = /(RWN);
ENADD = A5;
ENDATLO = ((RW+MASEL)+/DS0);
ENDATHI = ((RW+MASEL)+/DS1);

Figure 30. VMEEXP PLHS501 .BEE File

October 1993 53
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

************************************************************
* PLHS501 52–Pin PLCC Package Pin Layout *
* Date: 10/24/93 Time: 16:42:18 *
************************************************************

A A A A A S S S S S S S
2 1 1 1 1 A 1 1 1 2 2 2 2
0 9 8 7 6 5 7 8 9 0 1 2 3
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
A21 [ 9|I18 I4|45] W0
A22 [10|I19 I3|44] W1
A23 [11|I20 I2|43] CKBMZ
DS0 [12|I21 I1|42]
DS1 [13|I22 I0|41]
RWN [14|I23 /B3|40] RW
REG [15|B4 /B2|39] DTACK
ENADD [16|B5 /B1|38] NDTACK
ENDATLO [17|B6 /B0|37] MASEL
ENDATHI [18|B7 X7|36] ROM7HI
ROM0LO [19|O0 X6|35] ROM7LO
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
R R R R R R R R R R R R R
O O O O O O O O O O O O O
M M M M M M M M M M M M M
0 1 1 2 2 3 3 4 4 5 5 6 6
H L H L H L H L H L H L H
I O I O I O I O I O I O I

Figure 31. FULLEXP Pinlist

October 1993 54
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

@PINLIST
CKBMZ I;
DS[1..0] I;
RWN I;
A5 I;
A[16..23] I;
S[17..23] I;
W[1..0] I;
ENDATLO O;
ROM0LO O; ENDATHI O;
ROM0HI O; RW O;
ROM1LO O; NDTACK O;
ROM1HI O; DTACK O;
ENADD O; MASEL O;
@GROUPS
ADDR = A[18..16];
@LOGIC EQUATIONS
RO3 = (/(MASEL*SO3*CKBMZ*DO3));
SO3 = (/(CKBMZ*(/(SO3*DO3*MASEL))));
DO3 = (/(Q2*RO3));
RO2 = (/(MASEL*SO2*CKBMZ*DO2));
SO2 = (/(CKBMZ*(/(SO2*DO2*MASEL))));
DO2 = (/(Q1*RO2));
RO1 = (/(MASEL*SO1*CKBMZ*DO1));
SO1 = (/(CKBMZ*(/(SO1*DO1*MASEL))));
DO1 = (/(Q0*RO1));
RO0 = (/(MASEL*SO0*CKBMZ*DO0));
SO0 = (/(CKBMZ*(/(SO0*DO0*MASEL))));
DO0 = (/(0*RO0));
ROM0LO = (/DS0+(/((addr == 0h)*MASEL)));
ROM0HI = (/DS1+(/((addr == 0h)*MASEL)));
ROM1LO = (/DS0+(/((addr == 1h)*MASEL)));
ROM1HI = (/DS1+(/((addr == 1h)*MASEL)));
ROM2LO = (/DS0+(/((addr == 2h)*MASEL)));
ROM2HI = (/DS1+(/((addr == 2h)*MASEL)));
ROM3LO = (/DS0+(/((addr == 3h)*MASEL)));
ROM3HI = (/DS1+(/((addr == 3h)*MASEL)));
ROM4LO = (/DS0+(/((addr == 4h)*MASEL)));
ROM4HI = (/DS1+(/((addr == 4h)*MASEL)));
ROM5LO = (/DS0+(/((addr == 5h)*MASEL)));
ROM5HI = (/DS1+(/((addr == 5h)*MASEL)));
ROM6LO = (/DS0+(/((addr == 6h)*MASEL)));
ROM6HI = (/DS1+(/((addr == 6h)*MASEL)));
ROM7LO = (/DS0+(/((addr == 7h)*MASEL)));
ROM7HI = (/DS1+(/((addr == 7h)*MASEL)));
Q0 = (/((/(RO0*Q0))*SO0*(MASEL)));
Q1 = (/((/(RO1*Q1))*SO1*(MASEL)));
Q2 = (/((/(RO2*Q2))*SO2*(MASEL)));
Q3 = (/((/(RO3*Q3))*SO3*(MASEL)));
MASEL = /(/(/(/((A17*S17+/A17*/S17)
*(A18*S18+/A18*/S18)
*(A19*S19+/A19*/S19)
*(A20*S20+/A20*/S20)
*(A21*S21+/A21*/S21)
*(A22*S22+/A22*/S22)
*(A23*S23+/A23*/S23)
*(A5)))));
NDTACK = /((/(MASEL+/((/q0*w0*/w1)+(q1*w0*/w1)+(/q2*/w0*w1)
+(/q3*w0*w1))))*RWN);
DTACK = /NDTACK;
RW = /(RWN);
ENADD = A5;
ENDATLO = ((RW+MASEL)+/DS0);
ENDATHI = ((RW+MASEL)+/DS1);

Figure 32. FULLEXP PLHS501 .BEE File

October 1993 55
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

MICRO CHANNEL INTERFACE provided in the .ADF file and updates the circuitry within the PLHS501. The external
IBM’s new Micro Channel Architecture (MCA) card’s latches and the system’s CMOS RAM. transceiver may also be used by other
bus implements new features not found on devices on the adapter card.
IBM reserves 8 addresses for byte-wide POS
the XT/AT bus. One new requirement for latches, however, depending on the card’s In this application, edge-triggered registers
adapter designers is that of Programmable function, not all addresses need to be used. are not required and therefore should not be
Option Select (POS) circuitry. It allows In addition, of those addresses that are used, used, as transparent latches use fewer
system software to configure each adapter only the bits used need to be latched. The NAND gates to implement. Figure 34 shows
card upon power on, thereby eliminating first two addresses which are reserved for the various latch circuits described by the
option select switches or jumpers on the main reading the ID bytes, and bit 0 of the third SNAP equations. POS byte 2 was made
logic board and on adapter cards. address, which is defined as a card enable using four of the /B device pins and four of
Each adapter card slot has its own unique bit, are mandatory. Some of the remaining the B pins. Notice however, from Figure 34(B)
–CDSETUP signal routed to it. This allows bits of the third address are suggested by that the bits on the /B pins used the
the CPU to interrogate each card individually IBM to be used as inputs to an I/O or memory complement of the input pin, thereby
upon power up. By activating a card’s address comparator to provide for alternate implementing a non-inverting latch. Also, all 8
–CDSETUP line along with appropriate card addresses. Many adapter cards will not bits of this byte were brought to output pins. If
address and control lines two unique 8 bit ID use more than these three POS locations. some of the bits are not used by external
numbers are first read from the adapter. circuitry, then the specific bit latch may not be
The following example describes an
Based upon the ID number, the system then needed or may be constructed entirely from
implementation of POS circuitry realized in a
writes into the card’s option latches foldback NAND gates freeing additional pins.
PLHS501. It uses only 56 of the possible 72
configuration information that has been internal foldback NAND gates and only a An external F521 may be added to provide
stored in the system’s CMOS RAM. The CPU portion of the device pins, allowing additional for I/O address decoding. As the MCA bus
also activates POS latch address 102h bit 0, circuitry to ba added. Figure 33 shows a requires all 16 bits of the I/O address to be
which is designated as a card enable bit. block diagram of the circuit, and Figures 35 decoded, 8 bits may be assigned to the F521
If a new card is added to the system, an and 36 are the SNAP files. Pins labeled and 8 bits to the 501. Bit fields decoded in the
auto-configuration utility will be invoked. Each DO0–DO7 must be connected externally to 501 may be done so in conjunction with bits
adapter card has associated with it a pins DIN0–DIN7. They also must be from POS byte 2 to provide for alternate I/O
standardized Adapter Description File with connected through a 74F245 transceiver to addressing. Additionally, some of the
filename of @XXXX.ADF, where XXXX is the the Micro Channel. External transceiver available 501 outputs may be used as device
hex ID number of the card. The configuration direction and enable control is provided for by enables for other devices on the card.
utility prompts the user according to the text

TRANSCEIVER BUFEN
–ADL
CONTROL
DIR
–CDSETUP
–M/–IO
–S1 7–BIT 7
–S0 LATCH
–A2
–A1
–A0 POS
8–BIT BYTE 2
LATCH DATA OUTPUT
–CMD
8

D07 8 POS
| BYTE
D00 2

CHRESET CARD
I.D. OCTAL 8 3–STATE 8
8 3 to 1 DRIVER
MULTIPLEXER
POS
BYTE
1

CARD
I.D.
8
POS
BYTE
0

Figure 33. Block Diagram of Basic POS Implementation in PLHS501

October 1993 56
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

D4i
SETUP
EN

(SETUP) /L4
ADL
(INTERNAL NODE)
/EN

RST

(A) Control Signal Input Latch (1 of 7) (B) Data Latch of Bits 4 – 7

D0i
EN

RST L0

/EN

(C) Data Latch of Bits 0 – 3

Figure 34. Latches Used in MCA


Interface

October 1993 57
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

************************************************************
* PLHS501 52–Pin PLCC Package Pin Layout *
* Date: 10/24/93 Time: 15:42:33 *
************************************************************

S
E D D D
S S T C M A R I I I
S S U M A A A I D S N N N
1 0 P D 2 1 0 O L T 7 6 5
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
[ 9|I18 I4|45] DIN4
[10|I19 I3|44] DIN3
[11|I20 I2|43] DIN2
[12|I21 I1|42] DIN1
[13|I22 I0|41] DIN0
[14|I23 /B3|40] L3
L4 [15|B4 /B2|39] L2
L5 [16|B5 /B1|38] L1
L6 [17|B6 /B0|37] L0
L7 [18|B7 X7|36] DO7
[19|O0 X6|35] DO6
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
B I D D D D D D
U O O O O O O O
F W 0 1 2 3 4 5
E B
N

Figure 35. PLHS501 MCPOSREG Pinlist

October 1993 58
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049


Basic Programmable Option Select circuitry
for a Micro Channel Adaptor card

@PINLIST
a[2..0] i; l[7..0] o;
cmd i; do[7..0] o;
setup i; bufen o;
ss[1..0] i; iowb o;
din[7..0] i;
adl i;
mio i;
rst i;
@LOGIC EQUATIONS
read0 = (nsetupl*/ss1l*ss0l*nmiol*/cmd*na2l*/a1l*/a0l);
read1 = (nsetupl*/ss1l*ss0l*nmiol*/cmd*na2l*/a1l* a0l);
read2 = (nsetupl*/ss1l*ss0l*nmiol*/cmd*na2l* a1l*/a0l);
b7hi = 0; ” Define high ID byte ”
b6hi = 1; ” (POS byte #1) ”
b5hi = 1; ” 7E hex ”
b4hi = 1;
b3hi = 1;
b2hi = 1;
b1hi = 1;
b0hi = 0;
b7lo = 1; ” Define low ID byte ”
b6lo = 1; ” (POS byte #0) ”
b5lo = 1; ” FF hex ”
b4lo = 1;
b3lo = 1;
b2lo = 1;
b1lo = 1;
b0lo = 1;
” 7–Bit Input Latch for Control Signals ”
nsetupl = /setup*/adl + nsetupl*adl;
nmiol = /mio */adl + nmiol *adl;
ss1l = ss1 */adl + ss1l *adl;
ss0l = ss0 */adl + ss0l *adl;
na2l = /a2 */adl + na2l *adl;
a1l = a1 */adl + a1l *adl;
a0l = a0 */adl + a0l *adl;

” Option Select Octal Data Latch (POS byte #2) ”


” l0 is to be used as a card enable signal”
nen = /(nsetupl*/ss0l*ss1l*nmiol*/cmd*na2l*a1l*/a0l); ”write to latch”
l7 = /(/din7 * /nen) * /(/l7 * nen) * (/rst);
l6 = /(/din6 * /nen) * /(/l6 * nen) * (/rst);
l5 = /(/din5 * /nen) * /(/l5 * nen) * (/rst);
l4 = /(/din4 * /nen) * /(/l4 * nen) * (/rst);
l3 = /(/( din3 * /nen * /rst) * /(l3 * nen * /rst));
l2 = /(/( din2 * /nen * /rst) * /(l2 * nen * /rst));
l1 = /(/( din1 * /nen * /rst) * /(l1 * nen * /rst));
l0 = /(/( din0 * /nen * /rst) * /(l0 * nen * /rst));

Figure 36. PLHS501 MCPOSREG .EQN File (1 of 2)

October 1993 59
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

” Octal 3 to 1 Multiplexer ”
” This multiplexer selects between reading
POS[0], POS[1] or POS[2] onto the data bus”
ido7 = (b7hi*read1 + b7lo*read0 + l7*read2);
ido6 = (b6hi*read1 + b6lo*read0 + l6*read2);
ido5 = (b5hi*read1 + b5lo*read0 + l5*read2);
ido4 = (b4hi*read1 + b4lo*read0 + l4*read2);
ido3 = (b3hi*read1 + b3lo*read0 + l3*read2);
ido2 = (b2hi*read1 + b2lo*read0 + l2*read2);
ido1 = (b1hi*read1 + b1lo*read0 + l1*read2);
ido0 = (b0hi*read1 + b0lo*read0 + l0*read2);
”3–State output control for do7–do0”
do[7..0] = ido[7..0];
do[7..0].oe = (nsetupl*/ss1l*ss0l*nmiol*/cmd*na2l*outen);
outen =/(a1l*a0l);
”External F245 transceiver control”
iowb = /(na2l * nsetupl * nmiol * ss1l * /ss0l);
niow = /(na2l * nsetupl * nmiol * ss1l * /ss0l);
bufen = cmd * niow;

Figure 36. PLHS501 MCPOSREG .EQN File (2 of 2)

October 1993 60
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

NuBus INTERFACE seem confusing at first glance, the circuitry sets signal DE2 low, which is an input to an
In Apple Computer’s book* “Designing Cards fused into the PLHS501 can be broken down external flip-flop to cause ST2 to go low at
and Drivers for Macintosh II and Macintosh into small blocks of latches, flip-flops, and the next rising /CLK edge terminating the
SE”, an application was described for schematically in Figures 40 and 41. Circuit cycle. An external flip-flop was necessary to
interfacing an 8-bit I/O controller to the timing is shown in Figure 39. achieve a high-speed /CLK to /IOR and /ACK
NuBus. The controller used was a SCSI transition. Also, an external FI25 buffer was
Referring to Figure 40 and Figure 41, the
controller of the type used on the main added to meed the soon to be approved
circuitry starts a transaction by first detecting
Macintosh logic board. Seven devices (three IEEE P1196 specification requirement of
a valid address in either the slot or super slot
of which were PAL architecture) were used 60mA IOL for signal /NMRQ and 24mA IOL for
range. The detection is accomplished by two
as control circuitry interfacing the SCSI signals /TM0/TM1 and /ACK. Figure 41(B)
wide-input NAND gates, and controlled by the
controller and two RAM chips to the bus. shows an easily implemented latch which
/CLK signal. Following each NAND gate is an
controls interrupts generated by the SCSI
This example of using the PLHS501 shows a S-R latch to hold the signal until near the end
controller passing onto the bus. Upon
method of interfacing the same SCSI of the cycle. The two S-R latch signals are
/RESET the latch is put into a known state.
controller and RAM chips to the NuBus using combined into one signal named ST0 such
Under software control, by writing to a
only three parts. The adapter card schematic that if either NAND gate output was low, then
decoded address, the latch may be set or
is shown in Figure 38, the SNAP pin listing is some delay time after the rising edge of
reset, thereby gating or blocking the interrupt
in Figure 42, and the SNAP .EQN listing is in /CLK, ST0 will go low. The next rising edge of
signals.
Figure 43. Although the SNAP listing may /CLK will cause signal ST1 to go low. This

MASTER SLAVE

MODULE MODULE
SPECIFIC SPECIFIC

BUS
ARBITRATION PLHS501
CONTROL

CLOCK
ORIGINATION

SLOT ID SLOT ID
CLOCK
ADDRESS, DATA,
CONTROL AND PARITY
NUBUS

ARBITRATION

Figure 37. Simplified NUBUS Diagram

* Designing Cards and Drivers for Macintosh II and Macintosh SE, Addison–Wesley Publishing Company, Inc. 1987.

October 1993 61
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

74F125
/NMRQ

/TM1

/TM0

/ACK

/START D Q
/RESET
/CLK

/ID3
/ID2
/ID1 PU
/ID0

/ACK

DE2
/CLK
/RESET
/ID0
/ID1
/ID2
/ID3

ST2
/TM1
/START
4 B7 20 D7
/AD31 A7
5 B6 19 D6
/AD30 A6 /NMREQ
6 B5 18 D5
/AD29 A5 /RESETB RESETB
7 B4 17 D4
/AD28 A4
8 B3 16 D3
/AD27 A3 PLHS501 /ST0 D Q /IOR
9 B2 15 D2
/AD26 A2
10 14 D1
/ROMCS
/AD25 A1 B1 DRQ DRQ
11 B0 13 D0
/AD24 A0 IRQ IRQ
74F74
/DACK

/ADCLK /IOW /IOW


/SCSI

1 23
CAB CBA /ADCLK /IORR
A18
A19

GND 2 22 GND
A9

GND SAB SBA /RAMCS /RAMCS


3 21 GND
/IOR GAB GBA
74F651
/ROMCS
/DACK
/SCSI

+5

26

10 18
2 19 34 VCC /DBP 2
A12 D7 D7 /DB7 16
23 18 35 3 14
A11 D6 D6 /DB6
21 17 36 4 12
A10 D5 D5 /DB5
24 16 37 5 10
A9 D4 D4 /DB4
25 15 38 6 8
A8 D3 D3 /DB3
3 13 39 7 6
A7 D2 D2 SCSI /DB2
4 12 40 8 4
A6 8Kx8 D1 D1 CTRLR /DB1
5 11 1 9 2
A5 RAM D0 D0 /DB0
6
A4
7 27 27 12 44
A3 WE /IOW /EDP /SEL
4 20 8 22 26 13 36
/AD15 A7 B7 A2 OE /IOR /DACK /DACK /BSY
5 19 9 20 21 14 38
/AD14 A6 B6 A1 CS1 /RAMCS /CS /CS /ACK
6 18 10 26 24 15 32
/AD13 A5 B5 A0 CS2 PU /IOR /IOR /ATN
7 17 29 16 40
/AD12 A4 B4 6264 /IOW /IOW /RST
8 16 17 50
/AD11 A3 B3 /INO
9 15 22 18 46
/AD10 A2 B2
10 14 DRQ 23 DRQ /CNO 19 42
/AD9 A1 B1 IRQ IRQ /MSG
11 13 20 48
/AD8 A0 B0 /REQ
33
1 23 32 A2 28
ADCLK CAB CBA /RESETB
2 SAB SBA 22 GND 2 19 30 A1 /RESET
PU 3 21 GND 23 A12 D7 18 A0
GAB GBA PU A11 D6 GND
74F651 21 17
24 A10 D5 16 11
25 A9 D4 15
3 A8 D3 13
4 A7 8Kx8 D2 12
4 20 5 A6 RAM D1 11 GND
/AD7 A7 B7 A5 or D0
5 19 6
/AD6 A6 B6 A4 PROM
6 18 7 27
/AD5 A5 B5 A3 WE /IOW
7 17 8 22
/AD4 A4 B4 A2 OE /IOR
8 16 9 20
/AD3 A3 B3 A1 CS1 /ROMCS
9 15 10 26
/AD2 A2 B2 A0 CS2 PU
10 14
/AD19 A1 B1 6264/2764
11 13
/AD18 A0 B0
1 23
CAB CBA
ADCLK 2 22 GND
SAB SBA
PU 3 21 GND
GAB GBA PU
74F651

Figure 38. Adapter Card Schematic

October 1993 62
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

/CLK
/START

ACLK

TMx

/SLOT/SUPER

ST0

ST1

ST2

/ACK

/SCSI/DACK
/ROMCS, /RAMCS

/IOR

/IOW

Figure 39. Timing Diagram

D0
/ID0

D3
/ID3
/SL
D4

D7
START
/ACK
CLK /SLT
/RESET
/RESET
ST2

D4 ST0
/ID0 /CLK

D7 /SP
/ID3

START
/ACK D-LATCH WITH INTEGRAL AND GATE INPUT
CLK /SUP (DELAY INPUT UNTIL RISING EDGE OF /CLK)
/RESET
/RESET
ST2

Figure 40. Decoding and Latch Circuitry

October 1993 63
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

/RESET /RESET /RESET

/ST0 /SLOT /ST0 /SUPER TMI TMIL

/CLK /CLK AD/CLK

/SLT /SUP /SLT

/RESET

/ST0 ST1

/CLK

(A) Four Internal Flip-Flops Constructed from NAND Gates.

Slot*IOW*SetAddr
INTEN
AND–OR FUNCTIONS

Slot*IOW*ResetAddr DRG

NMRQ

IRQ
/RESET

(B) Interrupt Enable Control Latch


Internal Flip-Flops and Latches

Figure 41. Internal Flip-Flops and Latches

October 1993 64
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

************************************************************
* PLHS501 52–Pin PLCC Package Pin Layout *
* Date: 10/24/93 Time: 13:03:39 *
************************************************************

N
R N
E S
N N S N N T N
I I E T A A C
D D T M C R L D D D D D D
1 0 1 1 K T K 7 6 5 4 3 2
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
NID2 [ 9|I18 I4|45] D1
NID3 [10|I19 I3|44] D0
DRQ [11|I20 I2|43] A19
IRQ [12|I21 I1|42] A18
NRESET2 [13|I22 I0|41] A9
ST2 [14|I23 /B3|40]
ST0 [15|B4 /B2|39]
[16|B5 /B1|38]
[17|B6 /B0|37]
[18|B7 X7|36]
[19|O0 X6|35]
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
A N N N D N N N N N
C R R N E R S D I I
L O A M 2 E C A O O
K M M R S S C R W
C C Q E I K R
S S T
B

Figure 42. SNAP Pin List

October 1993 65
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”SCSI–NuBus Interface”
@PINLIST
nid[0..3] i; nromcs o;
d[7..0] i; nramcs o;
a9 i; nnmrq o;
a[19..18] i; nresetb o;
nreset1 i; nscsi o;
nreset2 i;
ntm1 i; ndack o;
nack i; niorr o;
nstart i; niow o;
nclk i; st0 b;
drq i; aclk o;
irq i; de2 o;
st2 i;
@LOGIC EQUATION
”Address Decode”
cmp0a = (d0*/nid0+/d0*nid0);
cmp1a = (d1*/nid1+/d1*nid1);
cmp2a = (d2*/nid2+/d2*nid2);
cmp3a = (d3*/nid3+/d3*nid3);
cmp0b = (d4*/nid0+/d4*nid0);
cmp1b = (d5*/nid1+/d5*nid1);
cmp2b = (d6*/nid2+/d6*nid2);
cmp3b = (d7*/nid3+/d7*nid3);
nsl = /(d7*d6*d5*d4*cmp0a*cmp1a*cmp2a*cmp3a*/nstart*nack*/nclk);
nsp = /(cmp0b*cmp1b*cmp2b*cmp3b*/nstart*nack*/nclk);
”latch slot signal”
nslt = /(nreset1*st2*/(nsl*nslt));
”latch super signal”
nsup = /(nreset1*st2*/(nsp*nsup));
”Let nslt or nsup through only
until after the rising edge
of nclk”
ist0 = /(/(nslt*nsup*nclk) * /(st0*/nclk) * /(nslt*nsup*st0) * nreset1);
st0 = ist0;
st0.oe = 1;
”Slot signal D–type Flip Flop”
nslot.d = st0;
nslot.clk = nclk;
nslot.set = nreset2;
nslot.rst = nslt;
”Super signal D–type Flip Flop”
nsuper.d = st0;
nsuper.clk = nclk;
nsuper.set = nreset2;
nsuper.rst = nsup;
”State 1 D–type Flip Flop”
st1.d = st0;
st1.clk = nclk;
st1.set = nreset2;
”output to external flop”
de2 = /(/st1 * st2);
”address latch clock”
adclk = /nclk*st0*st1;
aclk = /nclk*st0*st1;
”latch tm1 signal for r/w info”
tm1l.d = ntm1;
tm1l.set = nreset2;
tm1l.clk = adclk;
tm1l.rst = nslt;

Figure 43. SNAP .EQN Listing (1 of 2)

October 1993 66
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049


tm1l –> 1 read, 0 write

”straight decode stuff”
niorr = /(/st0*tm1l * nreset1);
niow = /(/tm1l*/st0 * nreset1);
nscsi = /(/nslot*/a19*/a18*/a9 * nreset1);
ndack = /(/nslot*/a19*/a18* a9 * nreset2);
nromcs= /(/nslot* a19* a18 * nreset2);
nramcs= /(/nsuper * nreset2);
nresetb= nreset2;
”interrupt control latch”
setad = /(/tm1l*/st0*/nslot* a19*/a18* a9);
rstad = /(/tm1l*/st0*/nslot* a19*/a18*/a9);
inten = /(setad*(/(inten*rstad*nreset2)));
nnmrq = /(inten*drq+inten*irq);

Figure 43. SNAP .EQN Listing (1 of 2)

October 1993 67
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

Data Bus Parity 3 variable has four ones (implying 5 gates to Assuming inputs must get into the PLHS501
The PLHS501 can span 32 bits of input data. generate). In general, 2n–1+1 product terms through the pin receivers, it is best to
It has four output Ex-OR gates, and the ability could generate Ex-OR functions in two levels generate as wide of an initial Ex-OR as
to generate literally any function of the inputs. of NAND gates (assuming complementary possible, so a structure like Figure 44(A)
It would seem that there must be some “best” input variables exist). You must have an expanded is appropriate. Figure 44 shows a
way to generate and detect parity. Recall that unlimited number of gate inputs for this to 2-level 4 input Ex-OR function which may be
the PLHS501 can generate both deep logic hold. viewed as a building block. This structure
functions (lots of levels) and wide logic may be repeated four times, across four sets
The PLHS501 could do this for 7 input
functions (lots of inputs). The best solution of four input bits generating partial
variables in two levels (26+1=65), but cannot
would require the fewest gates and the intermediate parity values which may then be
support 8 (27+1=129). Hence, it is
fewest number of logic levels. Let’s review treated through two boxes similar to
appropriate to seek a cascaded solution,
the basics, first. Table 1(A) shows the parity Figure 44(B). These outputs are finally
hopefully taking advantage of the available
function for two variables and Table 1(B) combined through an output Ex-OR at a
output Ex-OR functions. Let’s solve a 16
shows it for three variables. The Ex-OR PLHS501 output pin. Figure 46 shows the
input Ex-OR function, by subpartitioning.
function generates even parity. complete solution which requires 44 NANDs
First, consider Figure 44(A) where two literals
plus one Ex-OR.
It is noticeable that there are precisely 50% are Exclusive-ORed to generate an
logical 1 entries in the truth tables. This yields intermediate Ex-OR function. This requires Figures 47 and 48 show the pin layout and
the famous checkerboard Karnaugh Maps. available complementary inputs and SNAP equations for a parity generator. This
With a checkerboard K-map, no simplification generates even parity in two levels. example uses a cascade with a different
of Ex-OR functions is possible by Boolean Figure 44(B) also does this (by factoring), partitioning than just previously discussed.
simplification. The two variable Ex-OR has requiring 3 gate levels, but does not require
two ones (implying 3 gates to generate), the complementary inputs.

Table 1. Even Parity Functions

A B A⊕B A B C A⊕B
0 0 0 0 0 0 0
0 1 1 0 0 1 1
1 0 1 0 1 0 1
1 1 0 0 1 1 0
Table 1(A). 1 0 0 1
1 0 1 0
1 1 0 0
1 1 1 1
Table 1(B).

INPUTS 2 LEVELS 3 LEVELS

W
W⊕Y W⊕Y
Y

Figure 44(A). Figure 44(B).

Figure 44. Complementary Input Levels

October 1993 68
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

A
B
C
D

A
B
C
D

A
B
C
D
A
A
A B
A C
D
A⊕B⊕C⊕D
B A
B B
B C
D
C A
C B
C C
D
D A
D B
D C
D
A
B
C
D
A

B
A⊕B⊕C⊕D
C

4-INPUT EX-OR SYMBOL

Figure 45. Four Variable Ex-ORs

I1 A
I2 B
FIG. 30
I3 C
I4 D

FIG. 29(B)

I5 A
I6 B
FIG. 30
I7 C
I8 D

I9 A
I10 B
FIG. 30
I11 C
I12 D

FIG. 29(B)

I13 A
I14 B
FIG. 30
I15 C Total gates = 44 + 1 Ex-OR.
I16 D Gate Delay = 5-NAND levels + 1 Ex-OR.

Figure 46. 16 Input Even Parity Generation

October 1993 69
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

************************************************************
* PLHS501 52–Pin PLCC Package Pin Layout *
* Date: 10/24/93 Time: 14:32:27 *
************************************************************

F E D C B A Y X V U T S R
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
G [ 9|I18 I4|45] Q
H [10|I19 I3|44] P
I [11|I20 I2|43] O
J [12|I21 I1|42] N
K [13|I22 I0|41] M
L [14|I23 /B3|40] OEN
[15|B4 /B2|39]
[16|B5 /B1|38]
[17|B6 /B0|37]
[18|B7 X7|36]
[19|O0 X6|35]
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
O O E E
D D V V
D D E E
_ N N
O _
C O
C

Figure 47. PARITET PLHS501 Pinlist

October 1993 70
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”FILENAME:PARITET.EQN
24 BIT PARITY CIRCUIT”
@PINLIST
A I;
B I;
C I;
D I;
E I;
F I;
G I;
H I;
I I;
J I;
K I;
L I;
M I;
N I;
O I;
P I;
Q I;
R I;
S I;
T I;
U I;
V I;
X I;
Y I;
OEN I;
ODD O;
EVEN O;
ODD_OC O;
EVEN_OC O;
@LOGIC EQUATION
”FIRST LEVEL: ’EVEN’ FROM GROUPS OF THREE INPUTS”
J0=/A*/B*/C + /A*B*C + A*/B*C + A*B*/C;
J1=/D*/E*/F + /D*E*F + D*/E*F + D*E*/F;
J2=/G*/H*/I + /G*H*I + G*/H*I + G*H*/I;
J3=/J*/K*/L + /J*K*L + J*/K*L + J*K*/L;
J4=/M*/N*/O + /M*N*O + M*/N*O + M*N*/O;
J5=/P*/Q*/R + /P*Q*R + P*/Q*R + P*Q*/R;
J6=/S*/T*/U + /S*T*U + S*/T*U + S*T*/U;
J7=/V*/X*/Y + /V*X*Y + V*/X*Y + V*X*/Y;
”SECOND LEVEL: ’EVEN’ FROM FOUR GROUPS AT A TIME”
J8=/J0*/J1*/J2*/J3 + /J0*/J1*J2*J3 + J0*J1*/J2*/J3 + /J0*J1*J2*/J3
+ J0*/J1*/J2*J3 + /J0*J1*/J2*J3 + J0*/J1*J2*/J3 + J0*J1*J2*J3;
J9=/J4*/J5*/J6*/J7 + /J4*/J5*J6*J7 + J4*J5*/J6*/J7 + /J4*J5*J6*/J7
+ J4*/J5*/J6*J7 + /J4*J5*/J6*J7 + J4*/J5*J6*/J7 + J4*J5*J6*J7;
T0=/(J8*J9);
T1=/(/J8*/J9);
T2=/(J8*/J9);
T3=/(/J8*J9);
ODDI=/(T2*T3);
EVENI=/(T0*T1);
ODD=ODDI;
EVEN=EVENI;
ODD.OE = /OEN;
EVEN.OE = /OEN;
ODD_OCI = 0;
EVEN_OCI = 0;
ODD_OC=ODD_OCI;
EVEN_OC=EVEN_OCI;
ODD_OC.OE = T2*T3*/OEN;
EVEN_OC.OE = T0*T1*/OEN;

Figure 48. PARITET PLHS501 .BEE File

October 1993 71
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

16-Bit Comparator
This example “compare”, implements, a
16-bit comparator over 32 input bits. The
design generates outputs for conditions
representing the classic “EQUAL”, “AGTB”
(A>B) and BGTA (B>A). The long,
triangularized equation for T42 suggests a
clever editing approach to accurately enter a
relatively long design equation into SNAP.

************************************************************
* PLHS501 52–Pin PLCC Package Pin Layout *
* Date: 10/24/93 Time: 14:54:43 *
************************************************************

A A A A A A A B B B B B B
E D C B A 9 8 A 9 8 7 6 5
+–+–+–+–+–+–+–+–+–+–+–+–+–+
| | | | | | | |5|5|5|4|4|4|
|7|6|5|4|3|2|1|2|1|0|9|8|7|
+––––––––––––––––––––––––––––––––––+
| I I I I I I I I I I I I I |
| 1 1 1 1 1 1 1 1 9 8 7 6 5 |
| 7 6 5 4 3 2 1 0 |
| |
[ 8|VCC VCC|46]
AF [ 9|I18 I4|45] B4
BB [10|I19 I3|44] B3
BC [11|I20 I2|43] B2
BD [12|I21 I1|42] B1
BE [13|I22 I0|41] B0
BF [14|I23 /B3|40] A7
A0 [15|B4 /B2|39] A6
A1 [16|B5 /B1|38] A5
A2 [17|B6 /B0|37] A4
A3 [18|B7 X7|36]
[19|O0 X6|35]
[20|GND GND|34]
| |
| / / / / |
| O O O O O O O X X X X X X |
| 1 2 3 4 5 6 7 0 1 2 3 4 5 |
+––––––––––––––––––––––––––––––––––+
|2|2|2|2|2|2|2|2|2|3|3|3|3|
|1|2|3|4|5|6|7|8|9|0|1|2|3|
+–+–+–+–+–+–+–+–+–+–+–+–+–+
E A B
Q G G
U T T
A B A
L

Figure 49. PLHS501 Pinlist for 16–Bit Comparator

October 1993 72
Philips Semiconductors Programmable Logic Devices Application Note

PLHS501 design examples AN049

”FILENAME:PARITET.EQN
16 BIT COMPARATOR WITH THREE OUTPUTS:
EQUAL,AGTB (A>B), AND BGTA (B>A)”
@PINLIST
A[9..0] I;
AA I; AD I;
AB I; AE I;
AC I; AF I;
B[9..0] I;
BA I; BD I;
BB I; BE I;
BC I; BF I;
EQUAL O;
AGTB O;
BGTA O;
@LOGIC EQUATION
T1=/(AF*/BF); T2=/(/AF*BF);
T3=/(AE*/BE); T4=/(/AE*BE);
T5=/(AD*/BD); T6=/(/AD*BD);
T7=/(AC*/BC); T8=/(/AC*BC);
T9=/(AB*/BB); T10=/(/AB*BB);
T11=/(AA*/BA); T12=/(/AA*BA);
T13=/(A9*/B9); T14=/(/A9*B9);
T15=/(A8*/B8); T16=/(/A8*B8);
T17=/(A7*/B7); T18=/(/A7*B7);
T19=/(A6*/B6); T20=/(/A6*B6);
T21=/(A5*/B5); T22=/(/A5*B5);
T23=/(A4*/B4); T24=/(/A4*B4);
T25=/(A3*/B3); T26=/(/A3*B3);
T27=/(A2*/B2); T28=/(/A2*B2);
T29=/(A1*/B2); T30=/(/A1*B1);
T31=/(A0*/B0); T32=/(/A0*B0);
T41=T1*T2*T3*T4*T5*T6*T7*T8*T9*T10*T11*T12*T13*T14*T15*T16*T17*
T18*T19*T20*T21*T22*T23*T24*T25*T26*T27*T28*T29*T30*T31*T32;
T42= /T1+
/T3*T2+
/T5*T4*T2+
/T7*T6*T4*T2+
/T9*T8*T6*T4*T2+
/T11*T10*T8*T6*T4*T2+
/T13*T12*T10*T8*T6*T4*T2+
/T15*T14*T12*T10*T8*T6*T4*T2+
/T17*T16*T14*T12*T10*T8*T6*T4*T2+
/T19*T18*T16*T14*T12*T10*T8*T6*T4*T2+
/T21*T20*T18*T16*T14*T12*T10*T8*T6*T4*T2+
/T23*T22*T20*T18*T16*T14*T12*T10*T8*T6*T4*T2+
/T25*T24*T22*T20*T18*T16*T14*T12*T10*T8*T6*T4*T2+
/T27*T26*T24*T22*T20*T18*T16*T14*T12*T10*T8*T6*T4*T2+
/T29*T28*T26*T24*T22*T20*T18*T16*T14*T12*T10*T8*T6*T4*T2+
/T31*T30*T28 *T26*T24*T22*T20*T18*T16*T14*T12*T10*T8*T6*T4*T2;
EQUAL=T41;
AGTB=T42;
BGTA=/(T41+T42);

Figure 50. Compare PLHS501 .BEE File

October 1993 73

You might also like