-
Notifications
You must be signed in to change notification settings - Fork 80
Expand file tree
/
Copy pathsourcefile.html
More file actions
239 lines (173 loc) · 7.39 KB
/
Copy pathsourcefile.html
File metadata and controls
239 lines (173 loc) · 7.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
<html>
<head>
<title>Source File</title>
<meta name="Generator" content="GuideML V1.6">
<meta http-equiv="Content-Type" content="text/html">
</head>
<body>
<a href="main.html"><img src="toc.gif" alt="CONTENTS" border=0></a><a href="index.html"><img src="index.gif" alt="INDEX" border=0></a><a href="software.html"><img src="prev.gif" alt="PREV" border=0></a><a href="installation.html"><img src="next.gif" alt="NEXT" border=0></a>
<hr>
<pre>
<u>II.1 Source File</u>
First a source file has to be created with a text editor. This source file
must contain the following information:
1. The GAL type (GAL16V8 or GAL20V8 )
2. an 8 byte long comment, which will be written into the GAL as the
signature (see I.2)
3. The pin names - here pin numbers are replaced with names, which is
easier to oversee.
4. The Boolean equations
5. The keyword DESCRIPTION - after this you can place some desired text.
This text generally describes the GAL's function. That way you can know
years later what the GAL's intended use was.
Before it's getting boreing here is a first example (be happy).
Example 1:
Assuming you need the following gates in your circuit:
- one AND with 3 inputs
- one NAND with 2 Inputs
- one OR with 2 inputs
- one small digital circuit which feeds the outputs from 2 AND gates
to the inputs of one OR gate.
Circuit diagram:
(sorry for the European symbols)
AND: +----+ W = A * B * C
A ----| |
B ----| & |---- W
C ----| |
+----+
NAND: +----+ /X = D * E
D ----| |
| & |o--- X
E ----| |
+----+
OR:
+----+ Y = F + G
F ----| |
| >1 |---- Y
G ----| = |
+----+
small digital +----+ Z = H * I + J * K
circuit: H ----| |
| & |----+
I ----| | | +----+
+----+ +---| |
| >1 |---- Z
+----+ +---| |
J ----| | | +----+
| & |----+
K ----| |
+----+
Legend:
* : AND - connection
+ : OR - Connection
/ : low active
In order to create the source file we have to determine which type of GAL
will suit our purpose.
For the implementation of the above logic functions, we need a total of 11
inputs and 4 outputs. From chapter I we know (or not?) that the type of GAL
is dependant on the number of needed inputs.
The number of inputs in turn depends on the mode (see
<a href="gal16_20v8.html">pin designations of the various modes</a>). Since neither tristate
nor register outputs are used, the GAL will be in mode 1 after programming.
It therefore follows, the GAL16V8 has 10 inputs and 8 configurable outputs.
Since we only need 4 outputs, we can program the rest of the outputs as inputs,
so that we obtain the total required 11 inputs and 4 outputs.
Therefore GAL16V8 is adequate for our purposes. GAL20V8 can also be used, but
that leaves a lot of unused inputs (WASTE !).
The second thing we need is a signature for the GAL. Remember, it can
be up to 8 characters long. For example "example".
Now we have to define the pins. The pins are named one after the other
from 1 to 20. Pins that are not used should be named "NC" (not connected),
ground with "GND" and +5V with "VCC".
here: B C D E F G H I J GND
K NC NC NC Z Y X W A VCC
that is:
Pin 1 := B Input
Pin 2 := C Input
Pin 3 := D Input
Pin 4 := E Input
Pin 5 := F Input
Pin 6 := G Input
Pin 7 := H Input
Pin 8 := I Input
Pin 9 := J Input
Pin 10 := GND Ground
Pin 11 := K Input
Pin 12 := NC Not Connected
Pin 13 := NC Not Connected
Pin 14 := NC Not Connected
Pin 15 := Z Combinational Output
Pin 16 := Y Combinational Output
Pin 17 := X Combinational Output
Pin 18 := W Combinational Output
Pin 19 := A (Configurable Output defined as Input)
Pin 20 := VCC Voltage Supply
GAL16V8
---- ----
B 1| |20 VCC
C 2| |19 A
D 3| |18 W
E 4| |17 X
F 5| |16 Y
G 6| |15 Z
H 7| |14 NC
I 8| |13 NC
J 9| |12 NC
GND 10| |11 K
---------
Next come the Boolean equations:
W = A * B * C
/X = D * E
Y = F + G
Z = H * I + J * K
Therewith we have all the parts required for the source file. Now the
question arises, what format does such a file have?:
In line 1 must be the type of GAL. Here "GAL16V8"
In line 2 must be the signature. Here "Example"
Then follow the pin declaration:
B C D E F G H I J GND
K NC NC NC Z Y X W A VCC
Then the Boolean Equations:
W = A * B * C
/X = D * E
Y = F + G
Z = H * I + J * K
and the keyword DESCRIPTION.
Comments are introduced by a ';'.
Now using a text editor you can create your source file, and save it with
the title "example.pld". Don't forget the extension ".pld".
This is how the file should look:
(**** These characters designate the start and end of the file, please
don't type it.)
******************************************************
GAL16V8 ; this is the GAL type
Example ; this is the signature
B C D E F G H I J GND ; this is the pin declaration
K NC NC NC Z Y X W A VCC
W = A * B * C ; here are the pin definitions
/X = D * E
Y = F + G
Z = H * I + J * K
DESCRIPTION:
here could be a comment which describes the function
of this GAL
******************************************************
Negations ('/') in the pin declaration are considered in the Boolean
equations. This means, if you use a '/' in the pin declaration and
if you use the related pin in a Boolean equation this pin will be
negated.
<u>Example:</u>
A B /C D ..... GND
K L M N ..... VCC
N = C
This is the same:
A B C D ..... GND
K L M N ..... VCC
N = /C
How do you obtain from this source file a programmed GAL? For that you
need the program "GALer" which is described in the following sections.
</pre>
<hr>
<a href="main.html"><img src="toc.gif" alt="CONTENTS" border=0></a><a href="index.html"><img src="index.gif" alt="INDEX" border=0></a><a href="software.html"><img src="prev.gif" alt="PREV" border=0></a><a href="installation.html"><img src="next.gif" alt="NEXT" border=0></a>
</body>
</html>