GAL assembler for 16V8 and 20V8 GALs. This is a very old project -- it was realized in the begin of the 1990s -- so please don't mind the quite "unusual" way of programming... This program was developed on an Atari ST and was ported to Linux sometime middle of the 1990s. The syntax of the input files is quite simple -- please have a look to the examples in the subdirectory called "beispiele" (German for examples)... Contents: galasmen.txt......This text galasm.txt........The german version of this test galasmen.err......Error messages in English galasm.err........German error messages beispiele/........5 example files including Jedec- and logfiles. source/...........The source code The project should compile using the command "make". Maybe you have to adapt the paths in the Makefile to your needs. ****************************************************************************** * Program * * GGGGG ll AA * GG G l AA A * GG aaaa l AA A sss mmm mm * GG GGGG a l AA A s m m m * GG G aaaaa l AAAAAAAA sss m m m * GG G a a l AA A s m m m * GGGGG aaaaa lll AA A sss m m m * * * A Logic- Compiler/-Assembler for creating a JEDEC-file to program * 16V8 and 20V8 GALs * * * Source files of this project: * * Header files: * GalAsm.H Macros and Definitions of variable types * GalGlVar.H Types of global variables * HilfFktn.H Prototypes of common functions * PrtError.H Prototype of the function PrintErrorText() * GetGal.H Prototype of the function GetGal() * Parser.H Prototype of the function Parser() * ChkArch.H Prototype of the function ChkArch() * PinInSp.H Prototype of the function PinInSpalte() * FuseMap.H Prototype of the function FuseMap() * Protokol.H Prototype of the function Protokoll() * * C Modules: GalAsm.C Main program * GalGlVar.C Definition of global variables * HilfFktn.C Definition of common functions * PrtError.C Definition of the function PrintErrorText() * GetGal.C Definition of the function GetGal() * Parser2.C Definition of the function Parser() * ChkArch2.C Definition of the function ChkArch() * PinInSp.C Definition of the function PinInSpalte() * FuseMap.C Definition of the function FuseMap() * Protokol.C Definition of the function Protokoll() * **************************************************************************** Usage ===== galasm [] [parameters] : Name of the input file (format: MMI). When no program suffix is given, galasem searches for files with the suffix ".eqn". : Name of the output file created by galasm (optional), gets the suffix ".jed". Input format: ------------ ASCII file according to MMI. (see: c't [a german computer magazine], issue 12/89 pages 383... ) 1. Line: GAL-Type (supported are: 16V8 and 20V8) 2.,3. and 4. Line: Comment lines, the lines are copied into the output file without modification. Usually 2. line: Author and Date 3. Line: Description 4. Line: Company, Address etc. After the comment lines you can enter the two Architecture control bits SYN and AC0 and the control byte AC1(n). Syntax: Syn = X (X is either 0 or 1). AC0 = X (X is either 0 or 1). AC1(n) = X,X,X,X,X,X,X,X (X is either 0 or 1). The first AC1(n) Bit controls the first OLMC (attached to pin 19 on a 16V8 GAL, respectively to pin 23 on a 20v8 GAL). When the control bits/-byte are not given or not completely given, the program detects the missing bits/bytes using the following algorithm: 1. Pins Clock and/or OE are used inside of the logic equations -> Syn-Bit 2.a. Are there any registered- or tristate output pins -> AC0 = 1 2.b. Is there a feedback of the two outer OLMCs into the logic equations -> AC0 = 0 2.c. Is there feedback of the two inner OLMCs into the logic equations -> AC0 = 1 2.d. If not 2.a/b/c -> AC0 = 0 when AC0 == 1 3.a. is output n registered -> AC1(n)=0 3.b. is output n tristate with product term enable -> AC1(n)=1 3.c. is output n tristate with OE enable -> AC1(n)=0 3.d. if not 3.a/b/c -> AC1(n)=1 when AC0 == 0 3.a. OLMC pin n is used as an output -> AC1(n)=0 3.b. OLMC pin n is used an an input -> AC1(n)=1 The following lines define the names of the GALs pins. The names have to be separated by space or tab. Only the first 8 characters of a symbol are used. For negative logic (low-active) the negation operator "/" has to precede the symbol name. The first symbol is related to pin 1, the 2nd to pin 2 and so forth. Ground (Gnd) and supply pin (Vcc) must not be omitted. Now enter the logical equation in the following notation: 1. "normal" combinatorial Gates: = 2. Tri-State Outputs: IF()= 3. Registered outputs (latched): := : Pin Name, occasionally preceded by the NOT operator (/), only the first eight characters are used. : one oder more names, using the AND operator (*). IF: Conditional Tri-State. Only when the product term in between the braces is true, the related output pin shows low or high level. If the product term is false, the output becomes an input (high resistance). : List of (AND) product terms concatenated by the OR operator (+) (DNF: disjunctive normal form). Comments are allowed at any place. After a comment character (#) the rest of the line is ignored. Format of the output files: --------------------------- 1. JEDEC file The JEDEC file consists of ASCII characters file. It contains the FUSE map of the logic-Matrix, the control bits of the eight OLMCs, the Product term enable bits, the 8 * 8 comment bits and the security Bit, using the JEDEC format. The 8 comment bytes will contain the first 8 bytes of the file name. The security fuse is set to inactive (G1*). Unused fuses shall not be burned (F1*). Unused product terms in the matrix are disabled by the according product term enable bits. 2. Documentation- respectively log file The log file contains pin out of the GAL and the configuration of the in and output pins. The name has the suffix ".doc". Hint: ------- The program uses the ASCII file galasm.err for verbose error messages. For each error code up to 10 lines of text are allowed. The error message start with the following character sequence: #F#, whereas is the error code belonging to the message. Comment lines must start with the percent sign (%). The rest of the line is ignored. galasm searches the error text file 1: in the working directory, 2: in the directories whose names are in environment variable GALASM (e.g. export GALASM=$HOME/gal:/usr/local/galasm). For error messages in english, rename the file galasmen.err into galasm.err. Volker Bosch volker.bosch(at)z.zgs.de