COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL...

188
Compilation of combinational logic units for universal AHPL Item Type text; Thesis-Reproduction (electronic) Authors Chen, Duan-Ping Publisher The University of Arizona. Rights Copyright © is held by the author. Digital access to this material is made possible by the University Libraries, University of Arizona. Further transmission, reproduction or presentation (such as public display or performance) of protected items is prohibited except with permission of the author. Download date 05/07/2018 22:11:46 Link to Item http://hdl.handle.net/10150/557625

Transcript of COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL...

Page 1: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Compilation of combinational logic units for universal AHPL

Item Type text; Thesis-Reproduction (electronic)

Authors Chen, Duan-Ping

Publisher The University of Arizona.

Rights Copyright © is held by the author. Digital access to this materialis made possible by the University Libraries, University of Arizona.Further transmission, reproduction or presentation (such aspublic display or performance) of protected items is prohibitedexcept with permission of the author.

Download date 05/07/2018 22:11:46

Link to Item http://hdl.handle.net/10150/557625

Page 2: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL AHPL

byDuan-Ping Chen

A Thesis Submitted.to the Faculty of the

DEPARTMENT OF ELECTRICAL ENGINEERING

In Partial Fulfillment of the Requirements For the Degree ofMASTER OF SCIENCE

In the Graduate CollegeTHE UNIVERSITY OF ARIZONA

1981

Page 3: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

STATEMENT BY AUTHOR

This thesis has "been submitted. i% partial fulfill- ment of requirements for an advanced degree at The University of Arizona and is deposited in the University Library to be made available to borrowers under rules of the Library0

Brief quotations from this thesis are allowable without special permission, provided that accurate acknow­ledgment of source is made* Requests for permission for extended quotation from or reproduction of this manuscript in whole or in part may be granted by the head of the major department or the Dean of the Graduate College when in his judgment the proposed use of the material is in the interests of scholarshipo In all other instances, however, permission must be obtained from the author*

SIGNED

APPROVAL BY THESIS DIRECTOR This thesis has been approved on the date shown below:

Frederick^I* Hill ' Professor of

Electrical EngineeringDate

Page 4: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

ACKNOWLEDGMENTS

I wish to express my deepest appreciation to Drc Eredrick Jc Hill, Professor of Electrical Engineering at The University of Arizona, for his guidance and advice during the course of this work0. His careful examination of this manuscript led to numerous improvements0

Appreciation is extended to my friends, Mrc M 0 Masud and Mr„ Z0 Navabi, for their helpful suggestions*

I wish to express special gratitude to my parents and my eldest brother, for their encouragement and support*

Page 5: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

TABLE OE CONTENTSPage

LIST OF ILLUSTRATIONS \ o . viLIST OF TABLE . . . . . . . . . . . . . . . . . viiiABSTRACT . . . . . . . . . . . . . . . . . . .

1. . INTRODUCTION . . . . . . . . . . . . . . . . . 12. COMBINATIONAL LOGIC UNIT SYNTAX ANALYSIS . . . 5

Declaration Section . . . . . . . . . . . . . . rJArgument . . . . . . . . . . o . . . . . . YParameter . . . . . . . . . . . . . . ̂ 5INPUTS and OUTPUTS . 9Internal CLUNIT . . . . . . . . . . . . . . 10C TERM S o o , o o o o . o o . o . . o . o o o 1 0

Body Section . . . . . . . . . .,. . . . . . . 11C o nne c 11on . . . . . . . . . . . . . . . o 11FOR Statement . . . . . . . . . . . . . . . 17IF Statement . . . . . . . . . . . . . . . 1SSummary . . . . . . . . . © © . © . . . © . 19

3. STAGE 1 OUTPUT TABLES . . . . . . . . . . . . . 21Symbol Table . ~ . 21System Table . . . . . . . . . . . . . . . 23Symbol Declaration Table . . . . . . . . . 26Reference Table 27Symbol Reference Table . . . . . . . . . . 28Step and QTABLE Relation Table . . . . . . 29Quadruple Table . . . . . . . . . . . . . . 30Table of Temporary Symbols . . . . . . . . 31Parameter Table . . . . . . . o.. . . . . . 35Argument Table . . . . . . . . . . . . . . 34FOR Statement Table . . . . . . . . . . . . 34IF Statement Table . . . . . . . . . . . . 35THUNK Table . . . . . . . . . . . . . . . . 55P m T a b l e . . 57

4. IMPLEMENTATION OF CLUNIT COMPILER . . . . . . . 58

iv

Page 6: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

VTABLE OF CONTENTS (Continued)

PageData Structure and Memory Allocation „ „ 38

Stage 1 Table Allocation 0 0 o 0 0 o o 0 o 38Hardware Link List Storage O o o 0 < , o o o 41CLUNIT Table and STACK „ „ « „ o „ „ • . 43

Compiler Organization O o o o o o o < , 0 o o o o 44Declaration-Section Checking „ o » = = o = 47Body-Section Generation o o c . o o o 0 0 o<. 49

3e BESULTS o o o o o o o o o o o o o o o o o o o o 01IExample 1s 4-Bit Ripple-Carry Adder „ 0 o o = o 61

Link List Output O < , o o e » o o o o o o < , 61Compiler Output o e o 0 0 0 0 0 0 = 0 = 0 = 64

Example 2 s Garry •Look-Ahead ADDER , = = = = = = 71Black Box Case = = = = = = = = = = = = = = 71Actual Hardware Structure „<, = = , = = = = 73

Example 3s Read Only Memory Module = = = = = = 77Stage 3 Parameter = = = = = = = = = = = = = = = 79Summary = = = = = = = = = = = = = = = = = = = = 8 2

6= DISCUSSION AND CONCLUSION = = = = = = = = = = = 83APPENDIX As UNIVERSAL AHPL GRAMMAR = = = = = . 86

1APPENDIX Bs COMPILER PROGRAM LISTING , = = = = 93APPENDIX Cs RESULT OF EXAMPLE 2 RUN 1 = = = = 156APPENDIX Ds RESULT OF EXAMPLE 2 RUN 2 = = = = 160APPENDIX Es RESULT OF EXAMPLE 3 = = = = = = = 165LIST OF REFERENCES = = = = = = = = = = = = = = 178

Page 7: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

LIST OF ILLUSTRATIONSFigure Page

1. New AHPL Compiler and CLUNIT Compiler 0 o b © 320 Example 1 4-Bit ADDER . . . ' c c o c ° ° © © 6

3o Stage 1 Output Table of Example 1 . ° ° ° © 22

4 c Function RECEIV . . 0- * « c . c c © © 405c Example of Hardware Link List . . © ° ° 436e CLUCOM Block Diagram „ 0 c . o 0 © © ° 467c COMCLU Declaration-Section Checking o o © © © 488 0 COMCLU Body-Section Generation „ c o o © © © 519c GEB0X2 Sequence . . . . . . . c - c c c o ° ° 52

10c Body Compilation c c c c c c c c ® ° ° © ° 541 1 c IF Statement Service Routine . „ . * © ° 5612. FOR Statement Service Routine c c c O 0 57

13c CLUPRF Routine . . c c c c c c c c « © 5814c -Link List of Example 1 4-Bit ADDER O o o © 6215c Stage 2 Link List Output of Example 1 © © © 6516 e 4-Bit Link List Structure » c » c c o o © © © 6717c Compiler Output of Example 1 . o ». o © © ° 6818.. 4-Bit ADDER Compiler Output Structure o © ° © 7019 = Example 2 9-Bit Carry Look-Ahead ADDER o ° 72

0oCM Black Box Structure of Example 2 o o o O © 74

Page 8: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

viiLIST OP ILLUSTRATION'S. (Continued)

Figure Page21® Difinitions of Example 2 Referred CLUNITf s c ' 7522® Structures of Three Example 2 Referred

CLUNIT * S O O Q O O O O O O O O O O O O O O Q 7 ̂23o . Example 3 Read Only Memory Module ® ® ® <, ® „ 7824» Example 3 Hardware Circuits ® ® ® ® ® ® ® „ ® 80

Page 9: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

LIST OF TABLES

Table Page.1 o IF Statement Logic Relation Codes „ 192, CLUNIT Body Statements and Operations „ „ = ® 2030 CLUB IT Symbol Type Codes „ o < , 0 0 o o o o o 264o Entries of QTABLE 0 0 0 0 o 0 0 o o 0 o o o o 315C THUKK Table Operations <,0 0 0 0 0 0 oc, 0 0 3660 Element Type Codes © o o o o o o o o o o o o 4 27„ Contents of CLUNIT Table o o o o o o o o o e 44

viii

Page 10: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

ABSTRACT

, In digital logic circuit design, combinational logic networks play an important role* Since the high-level hard­ware description language, universal AHP1, is developed for digital system design, efficiently expressing a combina­tional logic network and properly generating the desired network become important in this development0

The pure combinational logic networks used in AHPL hardware design may be declared separately and serve as subroutines to the main hardware design program<, These separate routines are CLUNIT’s (Combinational Bogie Units)0 The combinational logic unit compiler is programmed to compile CLOTIT*s0 The output from such compilation is a hardware link list, which can be used to support the AHPL hardware compiler or to generate a wire list output0

The syntax and structure of a CLUNIT are analyzed* The compiler data structure and organization are presented* In addition, several examples were given to aid in these discussions*

Page 11: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CHAPTER 1

INTRODUCTION

In the field of digital system design, several strategies have been made to simplify design processes* One of them is using hardware description language* A hardware description language by itself offers the designer a conven= ient method of expressing his ideals* That not only permits a precise concise description, but also serves as a means of communication among digital system designers CO *

AHP1, or A Hardware Programming Language, introduced by Dr* Hill and Dr* Peterson is a powerful description language based on API* A compiler program has been written for the version of AHPL described in reference 2* It is able to accept a circuit description written in AHPL, and automa­tically generate a circuit wire list output* Since AHPL has been extended, and several new concepts and notations are added, a new compiler is being constructed to enhance the usefulhess of AHPL as a design tool* The combinational logic unit compiler, which will be discussed in this paper, is written as part of this new compiler*

In universal AHPL, all integrated circuits regardless of complexity may be partitioned into the following three

1

Page 12: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

classifications:I0 Combinational Logic Unit

H o Functional Register IIIo Module

This partition was first proposed in 1978 by Swanson in his dissertation* A combinational logic unit is a network com= posed only of combinational logic elements* Any digital circuit containing combinational logic and memory, but no internal control sequence, is termed a functional register* Other clocked digital circuits which can not be classified as a combinational logic unit of functional register is treated as a module* Among these three classes, only modules can work independently because a module contains its own control sequence? which the other two do not* In addition, modules may not be nested together, i*e* modules have to be declared separately* On the other hand, functional registers may be nested within modules or other functional registers, and combinational logic units may be nested inside modules, functional registers, and other combinational logic units(33® This obviously shows that a combinational logic unit is the most basic circuit network, and may be invoked by any other circuits*

The new AHPL compiler is a two=stage compiler* The relation between this new compiler and CLUNIT(Combinational Logic Unit) compiler is shown in Figure 1 * Stage 1 accepts

Page 13: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

A HPLCircuitDescription

Stage 1:

Syntax analysis

Table generationTablesoutput

AHPL Compiler

Tablesrestore

Tablesrestore

Stage 2: Compiler SYSTAB- module by module

SQRT- ̂ step by step

QTABLE- row by row

call return\'COMCLUroutine/11 '

call return

\/

CLUNITcompiler routine

9 (main program)

CLUNIT Compiler

Furtherextension

Stage 2 Link list output

CLUNIT virtual wire list

Figure 1. New AHPL Compiler and CLUNIT Compiler.

iUU

Page 14: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

AHPL circuit description programj analyzes its syntax; and generates a list of general purpose output tables» Stage 2 is actual hardware generation* C1UC0M, or C1UNIT Compiler, takes stage 1 output tables, compiles them, and generates a wire list output* That means, combining stage 1 and CLUCOM, one can design combinational logic units directly* Part of CIUCOM is used to support the stage 2 compiler without.any modification*

Chapter 2 of this paper will discuss the new syntax and structure of CLUNIT in universal AHP1* Chapter 3 briefly reviews stage 1 output tables in order to make further discussion clear* The dath structure and organization of CIUCOM are analyzed in chapter 4* After that, three examples and their compilation results are presented in chapter 5* Finally, some weakpoints of this CLUNIT compiler are pointed out in the last chapter*

Page 15: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CHAPTER 2

COMBINATIONAL LOGIC UNIT SYNTAX ANALYSIS

As mentioned in the previous chapter, the input to the CLUNIT compiler is the stage 1 output tables0 Writing an AHPL CLUNIT description program becomes the first step in CLUNIT designs In order to make this first step clear and easier, the syntax and structure of a CLUNIT will be discussed in this chapter*

Although the structure of a module is quite different from that of a CLUNIT, their syntaxes are similar to each other except some operations are restricted to modules only and some useful statements are added to make CLUNIT expres~ sion more efficient* This can be found from the universal AHPL grammar attached in Appendix A* The detailed difference and similarities will not be explained here*

Every CLUNIT description program must consist of two parts, declaration and body* These take care of symbol declaration and. circuit description respectively* Example 1 shown in Figure 2 is a four~bit ADDER* It shows every form of declaration part and most of the possible operations, and is used throughout paper in aiding our discussion*

5

Page 16: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CLU; ADDhFUOPl ; OP2 ) „I NPUTS : O P l [ 4 ] ; O P 2 [ 4 ] .OUTPUTSs SUM[ 5 ] .CLUN1TS : B I T A D D E R [ 2 ] < 8 F U L L A D D E R { ; 0 > ,[ T E R MS : C A R R Y C 5 T .

B O D YCARRY! 4 ] = \ 0 \ lFOR M - 3 T O O CONSTRUCT

CARRYCM3# SUMCM+13 =B I T AD DER( CARRYCM + 1J JQP1CM3 J 0P2C M3)

IF M = 0 THEN SUM[M3 = C A R R Y ! M3 ' F I ROFo

E N D .

C L U : F U L L A O D E R ( C C ; B l ; B 2 ) { S T 3 P A R } .I N P U T S :C C }B 1 I B 2 o O U T P U T S :O Q ! 23.B O D Y

0 0 1 1 3 = CC 3 81 2 82;0 0 1 0 3 = + / ( C CEB 1 > 81 £ 82 » B 2 £ C C ) «

E N D .

Figure 2C Example 1 4-bit ADDER0

Page 17: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Declaration SectionThe declaration section is the first part of a CLUNIT0

In the first line of any GLUNIT declaration section, the name of the CLUNIT, the formal arguments, and formal parameters are defined* All elements used in body section are declared one by one next except primitive functions* CLUNIT is only a combinational logic network; it can not contain memory elements* The elements which can appear in the declaration section are INPUTS, OUTPUTS, CLUNITS, and CTERMS only* Among these four kinds of elements, INPUTS and OUTPUTS must appear in any CLUNIT* On the other hand, CLUNITS and CTERMS are used according to the circuit structure* For example, ADDER in Figure .2 contains all four kinds of elements, while FULL- ADDER has only INPUTS and OUTPUTS* The order of declaration is not important* The important issue is that all used elements must be declared and only be declared once*

ArgumentEvery defined CLUNIT must have at least one'argument*

This argument is, actually, the input of such CLUNIT, and must be declared under INPUTS also* This kind of argument is the formal argument* The number of inputs is certainly■ equal to the number of formal arguments* As in software languages, when a declared CLUNIT is invoked, the invocation arguments are the actual inputs to such CLUNIT, and named

Page 18: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

actual arguments* In other words, the arguments appeared in declaration section are formal arguments, and body section arguments are actual arguments* In example 1, 0P1 and 0P2 are two formal arguments of ADDER5 CARRY(M+1), 0P1 (M), and 0P2CM) are the actual arguments of BITADDER* When a CLUNIT is invoked, not only the number of actual arguments must equal to the number of formal arguments of its referred CLUNIT, but also their dimensions must match each other*That is, when BITADDER is invoked, the dimensions of CARRYC

M+13, 0P1(M), and OP2CM3 must equal the dimensions of CC, B1 , and B2 which are the formal arguments of its referred CLUNIT EULLADDER*

ParameterA parameter is the communication mediun between a

declared CLUNIT and its referred CLUNIT* The parameter which a declared CLUNIT is going to pass is named an actual parameter, while the parameter of its referred CLUNIT is called formal parameter* Eor instance, BITADDER has an actual parameter 0, and EULLADDER has a formal parameter ST3EAR* Parameters are not absolutely required in every CLUNIT* However, if used, both actual parameters and formal parameters are enclosed, by a pair of curly brackets, and their numbers must be the same* In addition, the actual parameter must be an integer number when the CLUNIT is

Page 19: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

invoked, such that it can he passed to its referred formal parameter which is a variable symbol0

A formal parameter can be used to specify the dimen- sion of a declared symbol, dr be used in circuit description,, In this case, it is a dimension parameter0 ST3I>AR is a reserved word for formal parameters0 It allows a designer to pass information to stage 3 for further extension, and can not appear in dimension expression or circuit description® ST3PAR is called a stage 3 parameter® In the CLUEIT com­piler, ST3PAR is used in output routines only, and will be discussed in more detail in chapter 5®

INPUTS and OUTPUTSA ClUNIT can be thought of as a SSI chip or a box®

Some lines lead signals to it; logic operations are executed in the box; then, some other lines take out the result®These terminal lines are INPUTS and OUTPUTS respectively®As indicated above, these two terms are absolutely required for every 01UNIT® One C1UNIT may contain more than one input symbols, but it can have only one output symbol® When a C1UNIT is declared, its declared dimension is its output dimension® Therefore, the dimension of a declared C1UNIT must equal the dimension of its referred C1UNIT output symbol® In our example, BITADDER was declared to be a two- output-bit ClUNIT® Symbol 00, the output of its referred C1UNIT PU11ADDER, has exactly two columns®

Page 20: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Internal C1UNITAny CLUNIT can use other smaller CLUNIT’s as its

internal elements* All used CLUNIT?s must also he declared in declaration section* The internal elements of a declared CLUNIT can he generated hy the compiler only if its referred CLUNIT was declared and defined* Otherwise9 the compiler would treat it as a hlack box* Two declared CLUNIT’s which referred to the same defined CLUNIT and have same actual parameters may be declared under the same declaration, like

CLUNITSs BITADDEBX2") ; BITADDER1 C2)<: FULL ADDER {1} *If the referred CLUNITss are the same, but differ in actual parameters, they must be declared separately, e*g*,

CLUNIT: BIT ADDER ( 2 } 4.Z FULLADDER{ 1} *CLUNIT: BITADDER2(2)<gFULLADDER{0}*

CTERMSCTERMS are internal connection terminals* Terminals

are similar to the BUSES in modules except BUSES are perman™ ent physical elements* When a part of combinational network is used in several places, its output can be assigned to a CTERMS symbol first* Then, the next time this part of the network is used, one can Just use CTERMS symbol instead*This can not only make the circuit description clear, but also avoid forcing the compiler to duplicate that part of network* CTERMS. are also used in the existing compiler,

Page 21: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

HPCOMy "but need not be declared*The purpose of CTERMS is like a signal buffer* The

names will be deleted from the circuit by compiler after the compilation of a CLUNIT is completed* If the designer assigns more than one signal to a 0TERMS symbol, that will become a wired=OR or wired-AND* An error message will be given, but the compiler can not make a decision* The circuit will be left as is*

output of a C1UNIT at any time is a function solely of the combination of all its inputs .at that time* This means no signal is stored, and the signal transfer between input ahd output is a non-clocked transfer* This kind of non-”clocked transfer is called "connection", and represented by the character "="* The body section of a CLUNIT is made up of connection statements which describe the structure of such network* Sometimes, a CLUHIT must describe a highly repeti­tious form of a combinational logic network* In order to take care of such case, FOR and IF statements are used in 01UNIT circuit description*

Body SectionSince no memory element can appear in a CLUNIT, the

ConnectionConnection is a kind of signal transfer* The basic

format of a connection statement is

Page 22: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

<DLRM> = ^GLRM> where <GLEM> are signal sources and <D1BM> are destinations* The destinations must be element symbols, while the signal sources can be elements or results of other operations* The operations which can appear in <DLRM>. - are row and colume catenations only* On the other hand, <GLKM> can have any combination of catenations and logic operations* However, no matter how many operations are involved, the final <D1RM> and <G-LRM> must have same row and column dimensions, so that signals can be transfered one=by=one*

Signal Source and Destination — Among the C1UNIT declared symbols, INPUTS and CLUNITS can be used as signal sources, and OUTPUTS can be destinations only* Otherwise, there will exist a signal feedback loop which is not per­mitted in CLUNIT description* CTERMS can be both sources and destinations,but can not be destinations of themselves* In other words, <DLRM> includes only OUTPUTS and 0TERMS, and <GLRM> can include INPUTS, CLUNITS, and CTERMS*

In addition to those declared symbols, there are three kinds of undeclared signal sources* They are Binary String, Binary Encoding, and Primitive Functions* Primitive functions will be discussed in next subsection* A binary string is a string of 1, 0 , or ? separated by commas and enclosed by a pair of back slashes* For example, \1 ,0 ,?,1,

Page 23: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

13 ̂ ?\ is a five-bit binary string, where 1 means logic 1 or Vcc, 0 represents logic 0 or Ground, and ? is DON'T CARE or Floating* Binary encoding is represented by nip which expresses the equivalent of the decimal integer p as an n-element binary vector* Obviousely, the result of binary encoding is equivalent to a binary string including only 1 and 0* The least significant bit of the binary vector is the rightmost element of n|P* For example,

8 S 101 = \ 0 , 1 ,1 ,0 ,0 ,1 , 0 , 1 \ ,

a n d 5 1 0 = \ 0 , 0 , 0 , 0 , 0 \ *

CLUNIT is a special signal source* When it is invoked, the invocation arguments must be given* The restriction of invocation arguments is same as the signal sources of a connection statement* The undeclared symbol ?? can also be used as an invocation argument* This symbol means DON'T CARE which is similar to ? in a binary string*The difference is that ? indicates only one bit, while ?? represents an actual argument* The dimension of a ?? is decided by its referred formal argument*

Primitive Functions — A primitive function is essen­tially a CLUNIT* The differences are it need not be de­clared, it may contain numerical arguments, and its structure is already known to the CLUNIT compiler* The invocation of a primitive function is same as that of a CLUNIT, but compiler treats them in different ways, as will be discussed

Page 24: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

14in chapter 4= In this paper, six primitive functions are implemented. They are EhCODE, TEEM, 0RSE1, ANDSE1, WIRE, and PASS,

ENCODE invocation required two numerical arguments, n and p. Its result is same as binary encoding nip which has been discussed.

Invocation of TERM must have the format TERM(I;A) where I is a numerical argument and A is a signal source, I is encoded first into a binary string with A 8s length(column dimension). According to this binary string, if the ith bit is 1, the ith bit of A is selected; otherwise, its comple­ment is used. For example, the result of TERM(2;A(0:2)) is (aA(O), ACl), a A(2)), TERM followed by a column reduction AND(&/) becomes a minterm of its signal source. Similarly, a maxterm is a TERM followed by a column reduction 0R(+/),

0RSE1 is bit selection followed by an OR operation. Its invocation also requires a numerical argument and a signal source argument. The numerical argument is encoded first according to the length of signal source argument. If the ith bit of the result is 1, the corresponding bit of the signal source argument is selected. All selected bits are ORed together to give one-bit output. For instance, ORSEL (13? A(0:3)) equals +/(A(0:1),A[3)), In case no bit is selected, the output of ORSEL is logic 0,

The primitive function ANDSEL is similar to ORSEL

Page 25: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

15except all selected bits are AZDed together, and its outputis logic 1 if nothing is selected*

Both WIRE and PASS are two-bit input and one-bit output functions* They are stage 3 primitive functions*The CLUNIT compiler treats them as simple gates with gate type WIRE and PASS*

Since AHPL grammar can not accept an integer as aninvocation argument, all numerical argumetits required inprimitive functions must be variable symbols*

Virtual Operations •— Row catenation, "!", and column catenation, " are the only two operations which can appear in both <D1RM> and <G-1RM>* Unfortunately, they do not have any actual physical meaning* They are virtual operations*

Two <DLRM>,s can be row catenated to get another <DLRM>, as can two <GLRM>,s* The number of rows of the resulting <DLRM> equals the sum of the two original <DLRM>s* row numbers* The only requirement in row catenation is two . operands having same number of columns* The resulting segment will have the same number of column also*

Instead of increasing number of rows, column cate­nation expands the column number* All three <DLRI/[> * s or <GLRM>’s involed will have the same number of rows*

Logic Operations — Logic operations can appear only in <GLRM>, i*e* in the signal source* They include AND(&),

Page 26: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

160R(+) p Exclusive=OR(@), Complement(A ) j, Column Reduction 0R( +/), and Column Reduction M D (&/)0

ANB, OR, and XOR are two-operand logic operations0 The two operands must have the same dimensions, as does theresult0 They can appear in vector form or array form, but

/the actual operation is bit-by-bit operations ' For example, BC0:1)<0:1> & C[0:1)<0:1> is a two dimensional ARB operation0 The actual operations include

B(0)^0 > & cco)<:o>,BC0)< 1 > & CC0)<1>,BC1)<0 > & CC1)<0 >,

and BC1K1 > & CC13<1>0Complement is a one-operand operations It passes

the signal source through a NOT gate to get a logic comple­ments The destination and source should have the same size - and shapes

Column reduction OR and column reduction ANB are also one-operand operationss When a <G1RM> is column reduced, all elements of each row are ORed or ANBed together» The resulting bits are placed in a row vector with as many columns as they are rows in original <GLRM> e At the last connection statement of example 1, CC,B1; B1,B2; and B2,GC. are ANBed firsts Then, the results are column catenated* Since the result of column of catenation has only one row, after column reduction OR, the final <G1RM> has only one row and one column, is.e* one bits The dimension of -<B1RM>, 00(0} , is exactly one row and one column*

Page 27: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

17FOR Statement

The FOR statement is used to provide for iterativenetworko Its function is similar to that in any softwarelanguages, and the CLUHIT compiler treat it like a DO loop*The format of a FOR statement is

FOR ID = <AE> TO <AE> "STEP <AE>"CONSTRUCT ^C1UACTS> RDF

where underlined words are key words0 ID is the index variable which controls the whole FOR statement,, <AE> is any integer number, variable, or arithmetic expression^These three <AE>8s in the FOR statement format are the ini­tial value, final value, and step size of the index variableo <C1UACTS> is the body of the FOR statement* It may contain any legal CLUNIT circuit expression, including connection,IF, and FOR statements* The step size of the index variable, "STEP <AE>", is optional* If not used, 1 or =1 will be used as default automatically by compiler according to the initial and final values*

ADDER in Figure 2 has one FOR statement* M is the index variable which has 3 and 0 as its initial and final values* Although step size was not given, compiler compares the initial value with.the final value, and will use -1 as default* All statements placed between CONSTRUCT and ROF are the body statements of FOR* In this example, it includes a connection statement and an IF statement*

Page 28: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

18The index variable can be used in FOR statement only»

After the current FOR statement is served, the compiler will reset the value of the index variable to zero to prevent it from being used outside the FOR statement*

IF StatementThe function of an IF statement is also similar to

that in other software languages* It has the format shown below:

IF ID <RELOP> <AE>THEN <d01UACTS>“ELSE <ClUACTS>'f FI*

Underlined words are still key words* ID,.<AE>, and<CLUACTS> are same as those in a FOR statement* <RELOP> isthe logic relation between ID and <AE>0 There are six kindsof relations in use* They are listed and explained in Table1* When the compiler encounters an IF statement, its logicrelation is checked first* If the result is positive, THEN<CLUACTS> will be compiled* • Otherwise, ELSE -<GLUAGTS> isexecuted* Since ELSE statement is optional, if it were notthere and the logic relation were negative, the whole IFstatement would be skipped*

Since the value of an index variable can only be assigned in a FOR statement, the IF statement is always used within a FOR statement* Otherwise, the IF statement can only use formal parameter as its index variable, but that

Page 29: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

19

Table 1„ IF Statement Logic Relation-GodeSo

Symbol Productioncode

Relation

= 771 Equal< 772 Less than> 773 Greater than<r> 774 Not Equal

775 Equal or Less than>= 776 Greater than or Equal

does not make sense at all* An IF statement used in a FOR statement can take care of boundary conditions or special caseso As in our example, IF was used in a FOR statement to connect the most significant carry bit, CARRY(0], to CLUNIT output SUM CO)o

SummaryA summary of the legal CLUNIT body statements, opera­

tions, and their production codes is listed in Table 2„This will be used again in next chapter«

Page 30: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

20

Table 20 CLUUIT Body Statements and Operations

Symbol Production Statements and Operations

411 Connection statementI 431 < G-LRM> Row Catenation! 471 < D1RM> Row Catenation9 511 < DBRM) Column Catenation9 531 < GiRM> Column Catenation@ 541 logic Exelusive=ORV 551 Column Reduction OR4- 561 Logic OR&/ 571 Column Reduction AND& 581 - logic ANDA 591 . . logic Complement

601 C1UNIT or Primitive FunctionInvocation

602 CLUNIT Invocation with subscripts

\ — \ 603 Binary String$ 604 Binary Encoding

711 IF statement with ELSE712 IF statement with no ELSE721 FOR statement with Step Size722 FOR statement with no Step Size

Page 31: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CHAPTER 3

STAGE 1 OUTPUT TABLES

The purpose of stage 1 is syntax checking and table generationc Stage 1 reads .the input AHPL sequence files, allocates storage for all systems, symbols, statements, and operations, checks the syntax of AHPL descriptions, and finally translates the whole input file into sixteen tables,. Two of these tables, the Lable Reference Table and the Pulse Table, are used in the module only, and will not be dis== cussed here* The other fourteen tables will be briefly reviewed in this chapter* A completely discussion of these tables may be found from "Module Implementation of A Digital Hardware Design Automation System" (Masud, 1981).

Example 1, 4=bit ADDER, will be used again here* Stage 1 output tables of this example are shown in Figure 3=, Since only the tables® contents are of interest, the data structure of dynamic storage allocation for these tables is not covered here*

Symbol Table (SYMTAB)The symbol table is a fixed two dimensional array

with 4 columns in each row* The names of systems, declared

21

Page 32: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

22(SYS TAB) : SYSTEM TABLE

R# NAME TYPE * LSDT USDT LSQRT USQRT LREF UREF * * * *

1 ADDER 6 4 2 0 1 . 6 1 1 1 2 0 0 0 02 FULLADDER 6 41 0 7 11 2 2 3 3 0 0 0 0

( S DT ) : SYMBOL DECLARATION T a'b LE

ROW# SYMBOL TYP E SUBTY COLS ROWS CTUN RTUN PNTR * *

1 DPI 6 8 1 0 1 1 2 0 0 0 02 OP 2 681 0 1 1 4 0 0 0 03 SUM 6 8 2 0 1 1 6 0 0 0 04 BITADDER 6 84 2 1 1 8 0 . 0 0 05 CARRY 685 0 1 1 12 0 0 0 06 M 0 0 0 0 0 0 0 07 CC 6 8 1 0 1 1 0 0 0 0 08 61 681 0 1 ' 1 0 0 0 0 09 B 2 68 1 0 1 1 0 0 0 0 0

10 ST3PAR 253 0 0 - 0 0 0 0 0 011 00 6 8 2 0 1 1 42 0 0 0 0

( S R T ) : SYMBOL REFERENCE TABLE

ROW# SDT# CLL CUL RLL RUL CLTUN CUTUN RLTUN RUT.UN

1 5 0 . o 0 0 ' 14. 14 0 02 5 0 0 0 0 20 20 0 03 3 0 0 0 0 24 24 0 04 5 0 0 0 0 28 . 28 0 05 1 0 0 0 0 30 30 0 06 2 0 0 0 0 32 32 0 07 4 0 0 0 0 0 - 8 0 08 3 0 0 0 0 36 36 0 04 5 0 0 O' 0 38 38 0 0

10 11 0 . 0 0 0 44 44 0 011 7 0 0 0 0 0 0 " 0 012 8 0 0 0 0 0 0 0 013 9 0 0 0 0 0 0 0 014 11 0 0 0 0 46 4 6 0 015 7 0 O' 0 0 0 0 ' 0 016 8 0 0 0 0 0 0 0 017 8 0 0 0 0 0 0 0 018 9 0 0 0 0 0 0 0 019 9 0 0 0 0 0. 0 0 020 7 0 0 0 0 0 0 0 0

Figure 3<, Stage i Output Table of Example 1e

Page 33: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

23( R E F ) i REFERENCE TABLE

ROW# SYMBOL SYS T# LARG UARG LPARA UPARA NCOLS NROWS

1 ADDER 1 1 2 0 0 0 02 FULLADDER 2 0 0 1 1 1 13 FULLADDER 2 6 8 2 2 0 0

(SORT) : STEP* ' QTABLE RELATION TABLE

ROW# SYST# STEP# LOW-Q UP-Q NOD EL STROB

1 1 0 1 8 0 02 2 0 9 18 0 0

( QT AB L E ) : QUADRUPLE TABLE (THUNK) i

ROW# PROD TOT S I TOT S 2 TOTS 3 ROW# CODE 0PND1 0PND2 RESULT

1 6 0 4 2 0 3 1 252 4 0 42 4 1 1 3 1 0 2 211 1 1 03 7 2 2 1 0 0 3 252 4 0 . 44 5 11 5 4 6 4 211 3 3 0

' 5 601 10 11 12 5 252 5 0 56 4 1 1 12 6 0 • 6 .211 5 5 07 7 1 2 1 0 0 7 252 2 0 28 4 1 1 14 13 0 8 2 11 7 7 09 5 41 17 16 18 9 252 1 0 1

10 5 4 1 19 13 20 10 211 9 9 011 4 1 1 20 15 0 11 252 5 0 512 5 81 23 22 24 12 211 11 11 013 581 26 25 27 13 252 4 0 414 531 27 24 28 14 2 11 13 13 015 561 30 29 31 15 252 3 0 316 5 3 1 31 28 32 16 211 15 15 017 551 0 32 33 17 252 0 0 0I d 4 1 1 33 21 0 16 211 17 17 0

19 253 6 0 020 211 19 19 021 253 6 0 0

(TOTS ) : TABLE OF TEMPORARY 22 252 1 0 1SYMBOLS 23 221 22 21 0

ROW # CODE COLS ROWS PNTR 24 211 21 23 025 253 6 0 0

1 - 1 1 1 1 !! 26 2 5-2 1 0 12 — 3 1 1 1 !1 27 221 26 2 5 03 - 2 0 0 0 !1 28 211 2 5 27 04 - 1 1 1 2 1! 29 2 53 6 0 05 - 1 1 1 3 !! 30 211 29 29 - 'O'

Figure 3o (Continued)6

Page 34: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

24b 4 2 1 0 31 253 6 07 - 1 1 1 4 32 2 11 31 318 - 1 1 1 5 33 252 0 09 - 1 1 1 6 34 2 11 33 33

10 - 1 1 1 7 35 253 6 011 - 4 3 0 3 36 211 35 3512 - 2 1 1 0 37 253 6 013 - 1 1 1 8 38 211 37 3714 - 1 1 1 9 39 253 10 015 - 1 1 1 10 40 211 39 3916 - 1 1 1 11 41 2 52 2 017 - 1 1 1 12 42 211 41 4118 - 2 0 0 0 43 252 1 019 — 1 1 1 13 44 2 1 1 43 4320 - 2 . .0 0 0 45 252 0 021 - 1 1 1 14 46 2 11 45 4522 - 1 1 1 152 3 - 1 1 1 16 ( ARG) s ARGUMENT , TABLE24 - 2 0 0 025 - 1 1 1 17 ROW# SDTOTD26 - 1 1 1 18 — —— ---27 - 2 0 0 0 1 128 - 2 0 0 0 2 229 - 1 1 1 19 3 730 - 1 1 1 20 4 831 - 2 0 0 0 5 932 - 2 0 0 0 6 733 — 2 0 1 0 7 8

8 9

PARAM) 5 PARAMETER TABLE ( P I N T A G ) s

:ow# TUN# VALUE ROW# PIN

1 10 0 1 02 40 0

( FOR) ; FOR STATEMENT TABLE

ROW# SDT# IN I T F I N A L STEP LOW-3 U P - 3

•1 6 16 18 0 4 8

( I F ) 5 I F STATEMENT TABLE

ROW# SDT# RELOP TUN TL-Q TU-Q FL - Q FU-Q

1 6 7 71 34 8 8 0 0

Figure (Continued)0

OO

OM

O

r\

)O

OG

OO

OO

OO

C

Page 35: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

25syTnliols, formal parameter, formal arguments, index variables, and primitive functions are all stored in it0 Each row contains one name, and five characters occupy one column®This means that each name may have as many as twenty charac­ters® However, the ClUNIT compiler uses only the first ten characters® The else are ignored®

This table does not appear in stage 1- output tables separately® However, the symbol names appearing in STSTAB, SDT, and REE actually came from the symbol table®

System Table (SYSTAB)The system table stores the general information for

each defined system® All information about a system, such as name, declared symbols, and body description can be found directly or indirectly from this table®

This is a thirteen-column table® However, columns 1-0 to 13 and column 3 are not used for a CIUNIT® Column 1 of this table has a row number that points to SIMTAB where the system name was located® Column two is a system type code, by which the type of a system can be identified® In Figure 3, SYSTAB has only two rows, which have type codes . 642 and 641 respectively® Type code 644 means a CIUNIT with formal parameters^ while 642 means a CIUNIT with no formal parameter# Columns 4 and 5, 6 and 7, and finally 8 and 9 are the lower and upper row pointers of SDT, SQRT, and REF respectively® From these three tables, all declared

Page 36: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

26symbolsj, body descriptions, and reference information can be foundo

Symbol Declaration Table (SDT)All symbols, including declared elements, formal

parameters, index variables, and primitive functions, can be found from symbol declaration table„ Column one is again a SYMTAB row number* Column two is the symbol type code* A list of CLIMIT symbol type codes is shown in Table 3*

Table 3* CLUNIT Symbol Type Codes

Code Symbol type

0 Index variable253 Formal parameter681 INPUTS682 OUTPUTS683 CLUNIT with reference684 CLUNIT with no reference685 CTERMS999 Undeclared symbol or

Primitive Function

The third column of SDT named SUBTYPE is used for a declared CLUNIT with reference* In fact, it is an REF row

Page 37: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

27pointer, by which the reference information can be obtained. The next two columns, i0e0 columns 4 and 5, are the column and row dimensions of declared symbols. Column 6 and column 7 are THUHK table pointers for column and row dimensions.If these two columns are zeros, columns 4 and 5 contain actual dimensions. Otherwise, they are meaningless, and the actual values can be obtained by using THUHK poniters toexecute THUNK table. How to execute THUHK table will be

P)treated shortly in THUHK table discussion.The eighth column is PHTR, For a CLUHIT system,

this column will be left empty when stage 1 generates this table. If this row is a real element, PHTR will be assigned an integer when the system is compiled. This integer will re present.-: the element number of the declared symbol es first bit. If the symbol is an index variable or a formal para­meter, this column would store its value. The last two columns of SDT are not used for a CLUHIT syatem.

Take row 4 of SDT in Figure 3 as an example. It has type code 684 and subtype 2, That means BITADDER is a declared CLUHIT, and its reference information can be found from row 2 of REF, Column 7 zero means the integer 1 in column 5 is the actual row dimension. Column 4 is meaning­less because column 6 is not zero.

Reference Table (REF)REF gives the reference information for a defined

Page 38: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

28OLUNIT if pointed from SYSTAB, or a declared CLUNIT if pointed from SDT0 Column 1 is the SYMTAB row number where is the name of the referred system* Column 2 is the SYSTAB row number where the referred system is defined.

Columns 3 and 4 are the lower and upper argument table row numbers where the pointers of formal arguments are stored, . These two columns will be zeros for a declared CLUNIT because it does not have a formal argument. The fifth and sixth columns have the lower and upper row numbers of the parameter table. By using these two pointers, a list of formal or actual parameters can be obtained. The last two columns of FERare used for functional registers only.

Continuing the example in last section, from the second row of REF, one can find reference information of BITADDER, FULLADDER is its referred CLUNIT, and is defined at row 2 of the system table. Since FULLADDER is pointed from SDT, columns 3 and 4 are zeros, i,e, no formal argument. Columns 5 and 6 show that BITADDER has only one actual pa2?a= meter, which is stored at parameter table row 1,

Symbol Reference Table (SRT)Each element symbol appearing in circuit description

is treated as a segment. All such segments are stored in SRT which is used to show the relation between a segment and a declared symbol. Primitive functions are stored in in the same way although they need not be declared. Column

Page 39: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

29one of SET is a SDT row number0 Thus 9 it is easy to deter­mine to which declared symbol a segment belongs0

A segment may be only part of a declared symbol, or sometimes all of it„ In order to show a segment’s dimension range, columns 2 to 5 indicate dimension subscripts* They are lower column, upper column, lower row, and upper row subscripts respectively* Equivalent to these subscripts, columns 6 to 9 are THUHK table pointers* The relation between a THUNK pointer and a dimension subscript is exactly the same as that in the SDT* That is, if the THUHK pointer is zero, the subscript column contains the actual subscript* Otherwise, it has to execute the THUHK table to get the actual value*

Occasionally, a symbol may appear in a circuit des­cription statement without expressing its dimension* In such cases, declared dimensions will be used as default* Moreover, if declared dimensions happen to be stored in the THUNK table, its THUHK table pointer will be copied to SET and given a negative value * For instance, -8 in SET row 7 is actually copied from column 6 of SDT row 4, which is the THUHK pointer for BITADDEE column dimension*

Step and QTABLE Eelation Table (SQET)As the name implies, SQET is used to show the rela­

tion between a particular step and its QTABLE ranges* Column

Page 40: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

301 of SQRT stores a row number of SYSTAB where the system was defined* Column 2 is the step number 9 while columns 3 and 4 are lower and upper QTABLE row numbers which show the ranges of this step* Eor a CLUNIT, last two columns are not used*

Since all operations in a CLUNIT will finish in one clock period, and are not controlled by a step control signal, step number of column 2 becomes meaningless* It will just be left zero for a CLUNIT* Columns 3 and 4 become the starting and ending row pointers of the CLUNIT circuit description statements*

Example 1 defined only two CLUNIT8s, ADDER, and BULL- ADDER* They indeed occupied one row each in SQRT* Their body statements start from QTABLE row 1 and row 9$, and end

" at row 8 and row 18 respectively*

Quadruple Table (QTABLE)Quadruple table takes care of all circuit descrip­

tion statements and operations* It is a four-column table* Column 1 contains a statement or operation code* All possi­ble production codes for a CLUNIT system are already listed in Table 2* Except BOR and IB statements, columns 2 to 4 are the addresses of TOTS table* They may be pointers, operands, or signal destinations* Since for different pro­duction codes, these three columns contain different informa­tion, a summation is made and listed in Table 4= When a

Page 41: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

31

Table 4° Entries of QTABLE*

. Statement or Operation 2

QTABLE Column 3 4

TOTS pointer (Destination)

TOTS pointer (Source)

0

& + @ , !

TOTS pointer (RHS Operand)

TOTS pointer (LHS Operand)

TOTS pointer (Result)

&/ +/ A 0 TOTS pointer (Operand)

TOTS pointer (Result)

Binary String Binary Encoding

TOTS pointer 0 TOTS pointer (Result)

C1U, Primitive function

TOTS pointer (Declaration)

TOTS pointer (Argument)

TOTS pointer (Output)

. POE. FOR Table pointer

0 0

IF IF Table pointer

0 0

system is compiled, its QTABLE ranges will "be searched and checked row by row in order to generate hardware*

Table of Temporary Symbol (TOTS)TOTS is also a four-column table* It contains all

Page 42: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

: 32circuit description segments. Columns 2 to 4 of this table may have five different types of information. The code if the first column will decide what the other three columns mean. These five possible situations are to be explained separately below,

A =1 in the first column means this segment is a declared symbol. Columns 2 and 3 will contain the column and row sizes of this segment, and column 4 will be a row pointer to SET,

If the first column is a =2, it is always pointed from QTABLE column 4o That means this segment is not a declared symbol. It may be a result of any operations except <DLRM> catenation, a binary string buffer, or a temporary output of a C1UNII invocation. In this case, columns 2 and 3 are same as the previous case, ' They indicate the column and row sizes of this segment. The 4th column will store the element number of this segment's first bit, For a CLUEIT system, stage 1 will leave this column empty, .

For binary string and binary encoding cases, a -3 will appear in column one. Column 2 will be a positive integer which tells how many numbers are stored in PINTAB, and column 4 is a PINTAB row pointer for the first stored number. Whether it is a string or an encoding, it must ultimately become a one-row vector. Therefore, column 3 will just contain a 1,

Page 43: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

33If =4 appears in column one, it is a list of 01UNIT

or primitive function invocation arguments0 Column 2 tells how many arguments in this list0 Column 3 is unusecL Column 4 will contain an argument table row number where the argu~- ment list starts0

The last case is a positive integer appearing in column one0 This happens only for <DLRM> catenations0 Posi­tive integer is a QTABLE row number which indicates where this catenation came from* Columns 2 and 3 are the column and row sizes of catenation result* The last column is not used* .

Parameter Table (PARAM)Parameter table contains values or pointers for

formal and actual parameters* It can be pointed from the REP table only* Column one is a pointer, while column 2 is a value* If column one is zero, column two stores an actual value for the actual parameter* Otherwise, the parameter can be found through column one pointer only*

There are two kinds of pointers, A negative pointer points to SDT, while a positive pointer points to the THUNK table* The negative pointer case only happens in a module* For a CLUNIT, all pointers will point to THUNK* If a pointer is for an actual parameter, the THUNK table can be executed to get an actual value* Otherwise, The THUNK table has to be searched to find the SDT pointer for a formal parameter*

Page 44: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

34Let's return to Figure 3 stage 1 output tables0 Row

1 of PARAM has a THUHK table pointer 10o Since this row is pointed from REF row 2 which came from a declared C1UUIT, pointer 10 is an actual parameter pointer* On the other hand, 43 in the second row is a formal parameter pointer*

Argument Table (ARG)Similar to PAR AM, the argument table stores pointers

for actual and formal arguments* It has only one column, and where it will point to depends on where it is pointedfrom* If it is pointed from TOTS, it is an actual argumentpointer, and will point back to TOTS* For formal argument case, it should be pointed from REF, and the argument table would contain an SET row number where the formal .argument is located*

FOR Statement Table (FOR)Each row of the FOR table takes care of one FOR

statement* Column one is an SDT row pointer where the index variable is stored* Columns 2 and 3 are THUEK pointers from which the initial and final values of index variable can be calculated* The 4th column is step size* If step size is not given in a FOR statement, this column is left zero;otherwise, it will also be a THUNK pointer* 5 and 6 twocolumns are lower and upper QTABLE row numbers* The body of the FOR statement is stored in QTABLE between these two pointers*

Page 45: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

35Prom the FOR table of Figure 3S one can easily find

that there is only one FOR statement in circuit description because it contains only one rowc Its index variable is in SDT row 6, i0e0 M; its step size was not given* QTABLE row 4 to row 8 is the body of this FOR statement* Finally, initial and final values of index variable can be obtained from THUHK table row 16 and row 18*

IF Statement Table (IF)As in the FOR table, each row the IF table is an IF

statement* Column one is an SDT row pointer of the index variable* Column two stores a logic relation code, where all possible logic relations were listed in Table 1 already* A THUNK pointer for a specific value with which the index variable is to be compared is stored in column three* The fourth and fifth columns are for THEN statements, while the sixth and seventh columns are for ELSE statements* They are all QTABLE row pointers just as in the last two columns of FOR table* If the ELSE statement is not provided, last two columns of IF table will contain zeros*

THUNK Table (THUNK)The THUNK table is used to store arithmetic expres­

sions for symbol dimensions, segment subscripts, parameters, etc* The first column is a production code Which indicates an arithmetic operation* The last or fourth column stores

Page 46: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

36the result of such operations0 Columns 2 and 3 depend on different operations* There are ten kinds of operations, and they are summarized in Table 5*

Table 5c T H U M Table Operations*

Operation Code Column 2 Column 3

Result 211 THUNK row number where expression starts

THUNKwhereends

row number expression

AdditionSubtractionMultiplicationDivisionExponent

221222231232 241

THUNK row number for RHS operand

THUNK row number for LHS operand

Integer 252 Integer value 0

ID(variable) 253 SDT row number 0

NegativePositive

254255

THUNK row number for operand

0

When a THTJNK table pointer is given, it always points to the last row of the arithmetic expression, i„e* Result* From this row, one can find the starting and ending rows of such expression* Executing those operations given in column

Page 47: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

37one row by row, the result value can "be obtained very easilye For example, given THUHK row number 27 of Figure 3, one can immediately find that this expression is M+10 If the value of M is fixed, the final value can be calculated without difficulty*

Pin Table (PINTAB)PINTAB has only one column, and is pointed from the

TOTS table, only* Its contents are integer numbers* For C1UNIT systems, it is used to serve binary string and binary encoding* <=1 in PIHTAB indicates ? or DON’T CARE of a binary string bit*

In Figure 3, PINTAB has only one row containing an integer 0* In fact, that is from the binary string of example 1 connection statement CARRY(4) = \0\*

Page 48: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CHAPTER 4

IMPLEMENTATION OF CLUNIT COMPILER

The Combinational Logic Unit Compiler, CLUCOM, was written in Fortran language, and implemented on DEC=10 computer systems,, It consists of about 2600 statements, excluding comments0 Since CLUCOM shared some subroutines with stage 2 hardware compiler, it can be used in stage 2 without any modification.

The configuration which will be discussed here is a self-contained independent compiler. It requires only stage 1 output tables as its input file, and automatically generates a hardware list output. The.emphasis in this chapter will be focused on data structure and compilation sequence, '

Data Structure and Memory Allocation CLUCOM requires a lot of memory, more than 2OK words,

for its operation. This memory is used for stage 1 table allocation, hardware link list storage, CLUNIT table, and execution time stack.

Stage 1 Table AllocationStage 1 has a Dynamic Storage Allocation, There is

38

Page 49: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

a large storage pool of fixed size in which all tables, except STMTAB, are stored* This storage pool is an one~ dimensional list, called STORE* Stage 1 must use dynamic storage allocation is because every tables whose size is dependent on the input AHP1 circuit description file is dynamic* After stage 1 execution is completed, all tables are fixed* The details.of this dynamic storage allocation are given in ”System Manual for AHP1 Simulator" (Z* Navabi and P* J* Hill, 1979) „ In CLUCOM compilation, only some of these tables are modified, and none of them is expanded* Therefore, it is not necessary to store these tables in a dynamic forms*

In C1UC0M execution, when these tables are restoredat the beginning, STORE is still used* However, CLUCOM •

)

changes their allocation* They are stored in STORE in sequence, i*e* table by table, row by row, and column by column* This kind of storage allocation used in CLUCOM has at least two advantages* First, the index tables which are required in dynamic storage allocation can be eliminated*This reduces total memory requirement* Second,it can reduces execution time* In both cases, the entry of tables is , reached by calling subfunction RECEIV listed in Figure 4*By executing these two subfunctions, the actual STORE posi­tion can be located* It is obvious ..that the RECEIV in Figure 4(b) is much simpler than that in Figure 4(a) *

Page 50: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

40

FUNCTION R E C E I V ( T A B L E , N , R I , C I )I M P L I C I T I N T E G E R ( A - Z )DIMENSION T A B L E ( N ) .COMMON/BSZ7 B S I Z E B S 1 Z E 0 = 8 S I Z E I F ( N o EQ e l l ) 85 I Z E 0 = 1 000 BAD R = ( ( R 1 - 1 ) / B S I Z E O H ZRECEIV = T A 3 L E ( B A D R ) + ( R I - ( 8 A DR- 2 ) * B S I Z E 0 - 1 ) * T A B L E ( 1 ) + C I - 1R E T U R NEND

(a)

FUNCTION R E C E I V ( T A B L E # N , R I » C I ) I M P L I C I T I N T E G E R ( A - Z )REC E I V = T ABLE + N * ( R I - 1 > + C lRETURNEND

(D)Figure 4c Function BECBIV0 (a)Used in Stage 1„

(b)Used in the CLUNIT Compiler*

Page 51: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Therefore, it can not only make the table look-up easier, but also help in reducing execution time0 Sines CLUCOM makes extensive use of table look-up, this kind of storage „allotiation becomes an important factor in simplifying the compilation,,

Hardware Link List Storage' In order to represent the hardware link list, three

one-dimensional lists, G-ATTYP, ILINK, and OLIHK, and one two-dimensional arrays IOLIST are used,, During the compila­tion, each element is assigned an element number, and is located at the corresponding position in these three lists0 All element numbers in a declared symbol or an undeclared circuit description segment are assigned in sequence0 There­fore, given the row and column dimensions of a segment and the element number of its first bit, one can calculate the element numbers of other bits easily0

G-ATTYP stores the element type code for each assigned element* Table 6 is a list of element type codes used in CLUCOM* It includes physical elements and primitive func­tions* H I M and O L I M store input and output link pointers which are the row numbers of IOLIST* Finally, IOLIST is the storage of input-output list* It is a three-column array*The first two columns are used to store I/O elements* The third column is a continuous IOLIST row pointer if the number

Page 52: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

42

Table 60 Element type codes*

Name Type Code Meaning

WIRE 3998 Primitive function WIREPASS 3999 Primitive function PASSCLUNIT 4024 Black box for CLUNITCLUI 4023 CLUNIT inputCLUO 4026 CLUNIT outputCTERMS 4027 CTERMSGLAND 4031 AND gateCLNAND 4032 NAND gateCLOR 4033 OR gateCLXOR 4034 XOR gate

of an I/O list is more than two* If element X is the input of element Y, X will be placed in the input list of Y* On the other hand, Y will be one of X's outputs, and can be found in the output list of X* Figure 5 is a simple example given to show this relation* Elements 8, 9, and 10 are GLUMIT input elements* They are ANDed together and then connected to a CLUEIT output element 20* By using these three lists and one array, the compiler links all elements

Page 53: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

together to form a combinational logic network.43

GATTYP ILINK OLINK IOLIST

4025402 5402540314026

20212223242526 27

9 1020 822

24

Figure 5. Example of Hardware Link List.

CLUNIT Table and STACKThe CLUNIT table, or CLUTB, is a two-dimensional

array with 11 columns in each row. When a CLUNIT is gene­rated, all information about such CLUNIT will be put into CLUTB. Table 7 shows the contents of CLUTB.

This table has three important functions. First, if CLUNIT is used in the stage 2 compiler, this table is used to pass information. Second, it simplifies the compi­lation. Once a CLUNIT is generated, its structure and link list are fixed. If the same CLUNIT is invoked again, its

zinternal elements can be copied from the previous compiled

Page 54: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

44Table 7= Contents of CLUNIT Table„

Column Content

1 SIMTAB row number of a module name if this CLUMTT is invoked in a module*

2 SIMTAB row number for OBUNIT defined name3 SIMTAB row number for C1UHIT declared name4. Element number for a black box OBUNIT5 Step number if used in. a module

CBUTB row number if used in another CBUNIT6 Number of internal CBUNIT invocations7 Element'number of first CBUNIT input bit8 Element number of first CBUNIT output bit9 Element number of first CBUNIT internal elements

10 Element number of last CBUNIT internal elements11 Stage 3 parameter

copy directly0 This is much easier than compiling it again* Third, it assists the output routine to generate the wire list output*

STACK is a CLUCOM compilation time stack* The func­tion of STACK will be discussed in detail in next section*

Conrpiler Organization In this section, the compiler organization and its

Page 55: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

45compilation sequence will be discussed* However, the discussion in the following section will not refer to speci­fic points in the listing of the CLUNIT compiler program*The important function of the compiler will be discussed independently * An introduction will be provided to the com­piler listing document which will establish a correspondence between sections of the listing and this thesis 7 *

The CLUNIT compiler is not dependent on the syntax of input file since it has been checked in stage 1* However 9 dimensions of declared symbols, circuit description segments, and primitive functions were not processed in stage 1*Most of them are stored in the THUNK table* Sometimes, they are variables* Before hardware can be generated, dimensions must be calculated and checked*

The compilation of a CLUNIT is a special challenge because in addition to the connection statements, CLUCOM must be able to handle FOR and IF statements* Sometimes, a CLUNIT may use another CLUNIT'as its internal element*This will complicate the compilation process* Since the Fortran- language does not have a recursive property, it was necessary to include numerous GO TO statements in the com­piler program* ■ Although this undermines the programming structure somewhat, it still leaves the program easy to understand*

Page 56: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

46

( START ]

noFind?

yes

END

Outputroutine

Stage 1 Table Restore

Search Compilable CLUNIT

CLUNITG e n e r a t o r : COMCLU

Figure 6. CLUCOM Block Diagram.

The basic organization diagram of the CLUNIT compi­ler is shown in Figure 6. The first step in CLUNIT compi­lation is the stage 1 output table restore which has been discussed in the section of Stage 1 Table Allocation. After finishing table restore, the compiler searches system table for a compilable CLUNIT. A compilable CLUNIT is a defined CLUNIT with no formal parameter which has not been compiled before. Once a compilable CLUNIT is found. The CLUNIT generation routine, COMCLU, is called. Only after all

Page 57: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

47compilable CLUNIT ?s are generated is the output routine called to generage a wire list output file*

The COMCLU routine is the core of the CLUNIT compi­ler, and is used to support the stage 2 compiler, CQMCLU consists of two parts, declaration-section checking and body-section generation. They will be discussed in detail in connection with the appropriate block diagrams,

Declaration-Section CheckingThis is the first part of COMCLUc It takes care of

checking and boundary elements generation. The flow chart of this procedure is shown in Figure 7,

If a C1UNIT is called by CLUCOM main program direct­ly, it is a compilable CLUNIT, i,e, no parameter has to be passed. Since this CLUNIT is not an invoked CLUNIT, an < actual argument is not required, COMCLU only updates row and column dimensions of all declared symbols in SDT, sets up input and output boundary elements, and then starts hard­ware generation,

• On the other hand, if a CLUNIT is used in a module or another CLUNIT, the procedure becomes more complex. In this case, when COMCLU is called, the QTABLE row pointer where the CLUNIT is invoked is passed. Following this pointer, several tables are searched to locate the declared CLUNIT, to find its referred defined CLUNIT, to find the

Page 58: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

48Called by CLUCOM or

Stage 2 Compiler

Internal CLUNIT

Called by CL U C O M ?

Update SDT

Set up boundary

no/

Table search.

CLUNIT

Check & pass arguments.

no

yes

✓Check & passparameter.

Update SDT

yes

vI Generate black box.

Figure 7. COMCLU Declaration-Section Checking.

Page 59: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

formal and actual parameters, and to determine the formal and actual argumentso If the referred CLUHIT is not de­clared as an instance of an internally-defined ClUNIT, the compiler concludes that the designer would like to traet such C1UNIT as a black box0 In this case, routine G-EB0X1 is called to generate a box, connect invocation arguments as inputs, and put this box into the temporary output buffer» Otherwise, COMCLU checks whether the. numbers of formal and actual parameters match or not0 If they match, the compi­ler passes them and updates all dimensions of declared symbolSo For formal and actual arguments, not only must numbers match, but dimensions must also be equalo Once any error appears in this checking procedure, the compiler also treat current C1UNIT as a black box as in the previous case0 If no error is found, the actual arguments becomes GlUNIT’s actual inputs. Output elements are set up and put into output buffer,

Body-Section GenerationThe compilation sequence can reach this step only

after declaration section has been checked, and no error was found. In other words, when the sequence gets to this step, all input and output elements have been set up. The pur­pose of this section is to generate internal elements and connect them to the existing boundary elements.

Page 60: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

50The "block diagram, Figure 8, of body-section genera­

tion is clear and straight-forward. First, C1UTB is checked to decide whether the current 01UNIT has been compiled previously or not. If the result is positive and no error was found in previous ClUNIT,s body statements, internal ele­ments are copied directly and connected to current CLUNIT’s boundary elements. As mentioned before, this copy procedure is much simpler than compiling it again. If any error was detected in previous CLUNIT, the same error will appear in the current CLUNIT. Instead of going into body statements to. check, routine G-EB0X2 is called to generate a black box directly.

GrEB0X2 is different from G-EB0X1 which appeared in declaration-section checking. In GEB0X2 case, all boundary elements are already there. Box can use them directly.Figure 9 shows this procedure. In G-BB0X1 case, boundary elements haven’t been set up. The box’s inputs and outputs must be found from invocation arguments and declaration. Obviously, G-EB0X1 is more complicated than G-EB0X2. However, in both cases, the final box would have the same forms shown in Figure 9(c). Output elements are of greatest interest. They indicate different CLUNIT output bits, with most signi­ficant bit having the smallest element number.

If the current CLUNIT has not been seen before, the sequence continues to do the actual body compilation. In

Page 61: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

(D

©Internal CLUNIT

9 -

Pop up old data from

STACK

served ?yes

Body compilation QTABLE row by rowConnection, IF,FOR, CLU invocation

error ? no

Circuitimprovement

yes Internal CLUNIT ?

no

( RETURN

yeserror '

no

. yes Generateblack box.

Copy internal elements

& — ©

Figure 8. COMCLU Body-SSction Generation

Page 62: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

52

n- 1 n- 1

n- 1n- 1

BOX

m- 1m- 1(b)

n- 1

BOX

m- 1

Figure 9. G-EB0X2 Sequence. (a)Boundary Elements.(b)Insert a Box. (c)Final Form of a Black Box.

body compilation, if a new CLUNIT is invoked, all important information about current compiling CLUNIT will be pushed into a stack, called STACK. The compiler will process the new CLUNIT first. Once the body compilation is completed and no error has been detected, all internal elements are reviewed again for circuit improvement. All zero-input and zero-output elements are deleted, so are one-input AND, OR,

Page 63: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

53.and XOR gates* If a one=output AND (OR) gate is followed by another AND (OR) gate immediately, they will he combined together* Finally, all one-input CTERMS' are also eliminated* If an error was found in the body compilation, GEB0X2 is called to treat the current CLUNIT as a black box*

At this point, the entire compilation for a specific CLUNIT has been accomplished* CLUCOM is now checked to see whether the current finished is an internal CLUNIT* If so, the stored information are popped up from STACK, and sequence continues to process the previous CLUNIT* Otherwise, COMCLU is finished and returns to CLUCOM or stage 2 compiler main program*

Body Compilation — The CLUNIT body compilation is the most complicated part of whole compiler because it not only has to compile connection statements, but also has to take care of specific statements, i*e* IF, FOR, primitive functions, and other CLUNIT invocations* In addition, several FOR and IF statements may be nested together, and primitive functions and CLUNIT invocations may appear any­where* Figure 10 shows this complicated procedure*

. In this body compilation sequence, STACK is used to simplify the procedure* It is used as both a real stack and an indicator to control the compilation sequence* When the compiler encounters a specific statement, some important information about the current situation is stored in STACK

Page 64: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Called by COMCLU

Find CLUNIT QTABLE range

Next step

ConnectionType QTABLEcompilation£LU. PRFN else

Store data at STACK

CLUPRFroutine

IF FORinish ?

CLUinvocation

IF service routine

FOR service routine

yes

IF FORj6) yesinish ? inish ?yesCLU .FOR CLU IF

Recall IF Recall FOR

General sequence

noinish ? ^""TyesRETURN

Figure 10. Body Compilation.

Page 65: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

55first, and then the specific statement is processed* The last stored information is a type code which specifies where this specific statement came from* These type codes, 1, 2,3, and 4, identify the general compilation sequence, CLUWIT invocation, IP,and FOR statements respectively* After these specific statement service routines have finished, STACK is checked, and the type code is popped up* This allows the compiler to decide what to do next, return to serve previous unfinished FOR or IF statement, or return to the general compilation sequence*

Specific Statement Service Routines -— The FOR and IF statement service routines are similar* The only difference is that the index variable in the FOR routine is a variable and has to be changed every cycle, while it is fixed in the IF routine* Black diagrams for these two routines are shown in Figure 11 and Figure 12* They resemble the body compilation except when they encounter another specific statement, they store information in STACK and return immediately*

Primitive functions and CLUNIT invocation are served in CLUPRF routine* Distinct software subroutines are pro­grammed to serve different primitive functions* Since the structure of a primitive function is already known, hardware can be generated immediately* Once it is a CLUNIT invoca-

Page 66: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

56

New IFRecall IF

ConnectionelseType

noFinish ?

RETURN

Next step

QTABLEcompilation

Store dataat STACK

Restoredata

Check logic relation.Find QTABLE range

Figure 11. IF Statement Service Routine.

tion, dimensions of declared CLUNIT and actual arguments are updated and checked to decide if it can be compiled or not. Figure 13 indicates this procedure.

QTABLE Compilation — The QTABLE compilation routine QTBCOM is called whenever connection statements or operations

Page 67: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

©Recall FOR New FOR

Restoredata

Take care of Index varlable

Next ID Find QTABLE

Next QTABLE step

else ConnectionTypeStore data at STACK

QTABLEcompilation

no

noFinish "^JD?_

yes

RETURN RETURN

JFigure 12. FOR Statement Service Routine.

Page 68: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

58

CLUNITinvocation

Primitivefunctions

yesENCODE?

TnoENCODEUpdate dimension

subscripts for CLUNIT and invocation Arguments.

yesANDSEL? ANDSEL

yes.ORSEL?'̂"Tno

ORSEL

yesyesno Error? PASS? PFPASS

yesFinish = 0 PFWIRE M SWIRE? ' Tno

yesPFTERM —*6TERM?

J n o( r e t u r n )

Error

Finish = 1 <r

( RETURN )

Figure 13. CLUPRF Routine.

are encountered. There are two things have to be done in this routine. One is semantics error checking; the other is hardware generation.

Since all statements and operations are obtained from QTABLE, when QTBCOM is called, signal source and

Page 69: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

59.destination segments can be reached without difficulty* If the segment is a declared symbol, the sequence follows the current pointer to its predecessor, calculates its dimension subscripts, and checks to see whether it is valid* If a segment is the result of any previous operation, the compi­ler pops them up from temporary output buffer or finds their element numbers* Next step, the dimensions of source and destination are checked* Since different operations have different requirements as discussed in Chapter Two, different procedures are designed to check all possible situations* In the semantics error checking procedure, if any error is found, the proper error message will be dis­played on user's console terminal, and QTBCOM returns to where it was called*

Hardware connection can continue only after semantics checking is completed and the semantics are found to be error free* Basic hardware connection procedures are similar for all operations* First, all element numbers of the source and destination are collected* Second, if the opera­tion is a catenation, a binary string,or an encoding, ele­ment numbers are rearranged and put into the output buffer*If it is a connection or a logic operation, source elements are put into the input lists of their corresponding destina­tion elements, and destination elements are placed in the ■ output list of their source elements as shown in Figure 5*

Page 70: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

60Once■a new element has to "be generated, QTBCOM assigns it a new element number,, The referred G-ATTYP, LINK, and 01IMK positions .are automatically preserved for itc

Summary -— Body-section generation takes care of the actual hardware structure of a CLUNITo However, a OIUNIT body description is only compiled one time0 Once it is com­piled, it will be considered as a macro* When it is invoked again, all structure are copied directly from the previous instance*

When a C1UNIT body is compiled, the corresponding QTAB1E ranges are found at the beginning* The compiler executes them row by row until completion* Once a specific statement has to be served, information about current situa­tion is put into STACKp and the sequence serves that spe­cific statement first* If any error was detected during compilation, hardware generation stops immediately, but semantics error checking continues* This permits the compi­ler to detect as many errors as possible in one run*

Page 71: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CHAPTER 5

RESULT

To illustrate the usefulness of the combinational logic unit compiler, three sample logic unit design programs will be presented in this chapter„ The first two are pure combinational logic units<, The third one shows how CLUCOM- is used to support the stage 2 compiler.

Example 1s 4°Bit Ripnle-Carry ADDER This 4-bit ADDER example has been used in the Chapter

Two syntax analysis and the Chapter Three stage 1 table dis­cussion® Its AHPL circuit description was shown in Figure 2, Now, we would like to examine its hardware structure according the compiler output.

Link List OutputAs has been indicated, hardware networks are imple­

mented in the form of link list. That is, after compilation, hardware networks are stored in GATTYP, ILINK, OLINK, and IOLIST, Figure 14 shows the contents of these three lists and one array for the 4-bit ADDER after it was compiled. It includes 57 elements, and each one has its own I/O pointers and I/O lists. For example, element 40 is an OR gate because

61

Page 72: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

* * * * * C L U N I T C O M P I L E R L I N K - L I S T O U T P U T SEL EMEN1

CLEM#LISTS

GTYPE I L I N K CL I NK CLEM* GTYPE I L I N K O L I N K i

1 4025 0 98 2 4 0 2 5 0 6 7 !4 4 02 5 0 5 5 4 0 2 5 0 1 0 0 87 4025 0 38 8 4025 0 . 78

10 4 026 124 0 11 4 0 2 6 93 0813 4 026 31 0 19 4 02 5 2 10821 4025 6 12 22 4 0 2 6 27 30 5 -2 4 4034 8 13 25 4 034 11 15 22 7 4031 17 24 23 40 31 19 26 830 4025 3 3 4 1 31 4 0 2 5 35 40833 4026 56 61 34 4 0 2 6 58 6383b 4034 42 59 37 4031 45 52839 4 031 48 55 40 ..40.3.3., __ 5JL 57 542 4025 66 71 43 4 025 69 74 245 4 02 6 89 9 4 46 4 03 4 70 75 248 4031 76 83 49 4031 77 94551 4033 82 8 8 52 4 02 5 95 103854 4025 99 105 55 4 02 6 119 123 857 4034 101 106 58 40 34 104 121260 4031 108 115 61 4031 110 1 1 7 !

I Q L I S l sROW# CL EMI EL EM2 P O I N T !1 ROW# EL EMI ELEM2 PO I N T !

.1 - 2 0 0 i 2 - 2 0 054 4 0 0![ 5 20 0 027 21 0 0 !i 8 20 19 0 8

10 24 26 20 !! 11 21 24 0 813 25 0 0!; . 14 25 0 0216 20 19 0!I 17 21 20 • 0519 19 21 01! 20 28 0 0 222 26 27 25 i 23 29 0 0825 28 0 01! 26 29 0 0828 22 0 0 i 29 22 0 0531 23 0 o:j 32 13 0 0 2

Figure 14. Link List of Example 1 4-

ELE.M# GTYPE I L I N K OL I NK

3 4 0 2 5 0 3626 4 02 5 0 6989 4 0 2 6 126 0 8

12 40 26 6? 0820 4 025 4 9223 4 026 14 32 926 4031 16 23229 4 033 22 28 23 2 40 25 37 43 835 4034 39 44 838 40 31 46 53 841 4025 64 72 244 4 02 6 87 92847 4 03 4 73 90850 4 031 79 86253 4 02 5 97 102856 4 02 6 120 125859 4031 1 07 114262 40 33 113 1198

ROW# ELF H I EL EH 2 POINT

3 19 0 0 86 9 0 0 29 24 26 182

12 25 27 21215 23 0 0218 27 0 0 821 29 0 0524 29 0 0 827 29 0 0 830 30 0 0 233 22 0 08

ADDER0

Page 73: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

34 30 037 7 040 35 3743 . 3 6 3846 32 3149 39 052 40 05 5 40 05 6 36 . o61 41 064 33 067 42 070 4 2 4173 43 4676 42 4179 41 4362 48 4965 50 066 44 091 44 094 11 0

' 97 1 0100 5 4 0103 57 59106 58 0109 60 0112 61 0115 62 0118 62 0121 56 0124 56 0127 9 0

35 3 03 8 32 041 3 5 3744 36 047 38 05 0 39 053 40 056 40 059 34 062 34 065. 41 068 6 071 46 487 4 47 4977 43 428 0 50 083 51 086 51 089 47 092 52 095 44 098 53 0

101 53 52104 54 57107 53 52110 52 54113 59 60116 61 0119 55 0122 55 0125 10 0

00

475 0

000000000000

•85000000

11100000000

Figure 14. (Continued)„

0 ! 36 31 0 020 ! 39 31 30 0 5

495 42 32 35 0 2OS 4 5 31 3 0 0 208 48 30 ....32..... ....... Q 10 8 5 l 37 38 54?02 54 _ - 3 9 .... 0 ____080! 57 33 0 0808 60 33 0 080 2 63 12 0 0202 66 2 0 020 2 69 43 0 0 8

78? 72 46 48 808818 75 47 0 0 8

02 78 49 0 OS08 81 50 0 OS08 84 51 0 080 2 87 51 0 0 508 90 45 0 0 802 93 45 0 0802 96 52 0 0802 99 5 0 080 2 102 57 59 10 9.80 8 105 58 60 11280! 108 54 53 0808 111 61 0 02

1162 114 62 0 0 805 117 62 0 0 8OS 120 58 0 080 2 123 9 0 0808 126 5 5 0 08

VI

Page 74: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

64its gate type is 4033o Its I/O pointers are 51 and 57,From I0LIST, one can find that elements 37, 38, and 39 con­sist of its input list, and its output list contains only one element, 33» A versiop of the link list for example 1 adapted for printout is given in Figure 15„ The 4-bit ADDER circuit corresponding to this output is shown in Figure 160 All CLUHIT’s, including internal CLURIT's, are enclosed by their boundary elements, C1UIN and CDUOUT,

Compiler OutputAlthough Figure 16 shows the hardware structure of

4-bit ADDER, it is not the final output0 Boundary elements of an internal CLUNIT are used only to make the compilation easier* They do not have any actual physical meaning* As a last step, the compiler output routine eliminates them from link list* In addition, the output routine will renumber all used elements in order to place element numbers in sequence* Figure 17 is the actual compiler output, while Figure 18 is the corresponding hardware circuit* It contains 24 gates and 13 boundary elements*

In this example, stage 1 used 4*02 seconds for syntax checking and table generation* The CLUNIT compilation time, including stage 1 table restore, hardware compilation, and final output generation, was 0*80 second*

Page 75: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

* * * * * CLUNTT COMP TIER V I RTUAL W f R E L I S T OUTPUTS

* * * - 1 5 = VCC - 2 s* GNO - 4 s * FLOAT

R* NAME LOCAL NAME USED IN INPUT OUTPUT ■ INTERNAL ST3PAR

1 ADDER

2 FULLADOFR 8ITAD0ER ADDER ROW#3 1

3 FULLADDER 8 1T ADD ER ADDER ROW#3 1

4 FULLADDER BILADDER ADDER ROW#3 1

5 F I L L ADDER B IT ADD ER ADDER ROW#* 1

1 - 8 9 - 13 14 - 62

19 - 21 22 - 2 3 24 - 29 0

30 - 32 33 - 34 35 - 40 0

41 - 43 44 — 45 46 — 51 0

52 - 54 55 — 56 57 - 62 0

* * * * * e l e m e n t s l i s t * * * * *

M # ELEM TYPE INPUT — OUTPUT L I S T

1 CLUIN OUTPUT 532 CLU1N OUTPUT 423 CLUIN OUTPUT 314 CLUIN OUTPUT 205 CLUI N OUTPUT 546 CLUIN OUTPUT 437 C LI) IN OUTPUT 328 CLUIN OUTPUT 219 CLUOUT INPUT 55

10 CLUOUT INPUT 5611 CLUDUT INPUT 4 512 CLUOUT INPUT 3413 CLUOUT INPUT • 23

Figure 150 Stage 2 Link-List Output of Example 1c

Page 76: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

19 C L U IN INPUT - 220 CLUIN. INPUT 421 CLUIN

c u j n u rINPUT 8

22 INPUT 2923 CLUOUT INPUT 2524 XOR INPUT 20 1925 XQR INPUT 21 2426 AND INPUT 20 192 7 AND INPUT 21 2028 AND INPUT 19 2129 OR INPUT 26 2730 CLUIN INPUT 2231 CLUIN INPUT 332 CLUI N INPUT 733 CLUOUT INPUT 4034 CLUOUT INPUT 3635 XOR INPUT 31 3036 ' XOR INPUT 32 3537 AND INPUT 31 3038 AND INPUT 3 2 3139 AND INPUT 30 3240 OR , INPUT 37 3841 . CLUIN INPUT 3342 CLUIN INPUT 243 CLUIN INPUT 644 CLUOUT INPUT 5145 CLUOUT INPUT .4746 XOR INPUT 42 414 7 XOR INPUT 43 4648 AND INPUT 42 4149 AND INPUT 43 4250 AND INPUT 41 4351 OR INPUT 48 4952 CLUIN INPUT 4453 CLUI N INPUT 154 CLUIN INPUT 555 CLUOUT INPUT 6256 CLUOUT INPUT 5857 XOR INPUT 53 5258 XOR INPUT 54 5759 AND INPUT 53 . 5260 AND INPUT. 54 5361 AND INPUT 52 5462 OR INPUT 59 60

Figure 150 (Continued)0

O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T s O U T P U T s O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T s O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T S O U T P U T s

lb 2826 2727 28

37 3937 3838 39

48 5049 4949 50

59 6159 6060 61

2424

33112329

29

11353641123634404040334646475211474551515144575758

9105856626255

CTv

Page 77: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Figure 16. 4-Bit ADDER Link List Structure.

Page 78: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

****** * * * * C I J N I T COMPILER STAGE 3 OUTPUT:* * * * *

* * * - 1 : = VCC - 2 : = GND - 4 : = f-LUAT

K u NAME LOCAL NAME CLU* USED IN INTERNAL

1 ADDER 14 - 37

2 FULL ADDER DITADDER ADDER RCU* = 1 14 - 19

3 FULL ADDER BITAODER ADDER ROW# = 1 20 - 25

4 FULLADDER BITADDER ADDER ROW* = 1 2 b — 31

5 FULLADDER b lT ADDER ADDER RO W # = 1 32 - 37

* * * C LUNI T "ADDER " ELEMENT L I S T :# TYPE INPUT L I S T

1 C L J I N2 CLUI N3 C L U I N4 CLUI N5 CLUIN6 C L J I N7 C L U I Nd C LU IN9 CLUOUT 37

10 C LJ OUT 3311 CLUOUT 2712 C LUGUI 2113 CLUOUT l b

Figure 17. Compiler Output of Example 1.

Page 79: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

14lb16171 814202122232425262 728293031323334333637

X OR 4X OR 14AND 4AND 8AND 6OR 16XUR 3X OR 20AND 3AND 7AND 7OR 22X OR 2X OR 26AND 2AND 5AND 6OR 28X OR 1X OR 32AND 1AND 5AND 5OR 34

18

24

30

- 28

- 24

- 21719

719

31923256

252

252931

5311

3135

Figure 17. (Continue).

Page 80: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

24 2022263028

Figure 18. 4-Bit ADDER Compiler Output Structure.

Page 81: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

The carry look-ahead adder is probably the most popular form of fast adder, and is a classic example of logic design0 In this section, only the AHPL circuit description and compiler output are of interest0 Anyone who is interested in the carry look-ahead principle should read Chapter 14 of reference 20

Black Box CaseExample 2 is a 9-bit carry look-ahead adder* Its

circuit description is listed in Figure 19= A and B are addend and augend input, while CC is the carry input from previous stage* CTERMS C, P, NP, and G. are carry, propagate, non-propagate, and generate respectively* 9 bits are divided into three 3-bit groups* Group generate, group propagate, and group carry are represented by GG, GP, and GC* Three group consist of one section* Notations SC, SG, and SP are used to represent section carry, section generate, and section propagate*

In addition to these symbols, 3 CLUNIT’s, IPG, LSUM, and LCLA, are declared* They are propagate network, sum network, and carry look-ahead network* Since it is a 9-bit adder, 9 LPG’s and 9 LSUM’s are used to take care of each individual input addend and augend bits* This is shown in the first FOR statement of body description* Three groups

Page 82: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

72

CLUs CLADDCAjBlCC) o INPUTS? AC 9 ] J BC93? CC.OUTPUTSsSC103oCTERMSs CC93J PC93 5 NPC93I GC93 5 GCC33I GPC3 3 5 GGC3 3 i

FOR I = 8 TO 0 CONSTRUCTN PC I 3pPC I 3 p 6 C13 * LPG { AC I 3p B CT 3 ) ? SC 1 + 13 = LSUMTNPCl 3 JPCI3pC Cl 3 )

ROFIGCC23 ■= CC?

FOR 3 = 6 TO 0 STEP - 3 CONSTRUCTG G C J / 3 3 p G P C J / 33 p C C 3 s 3 +2 3 =

LC LA CPC 3 33 +2 3 IG C 3 ; 3,+2 3 5 GC C 3 / 3 3 )R OF 5

SC = CCl

SGp S Pp GC C 0313 = LCLACOS33(GPIGG5SC)?

SCO 3 = S G + (SP £ SC Jo

SCJ SGI SPC L U N I TS 5 LP GC 3 3 C L U N I T S ; L S UM C L U N I T S ; LCLA C 5 3

<5 PGo<*• SUMo <5 CL A o

BODY

ENDo.

Plgure 19o Example 2 9-Bit Carry Look-Ahead ADDER*

Page 83: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

7 3require three L G M 8s0 They are included in the second FOR statemento The last three connection statements are the section carry look-ahead and the most significant sum bit generation*

In the first run, the referred CLUNIT’s were,not definedP i<,,e0 all declared CLUETTrs were to be treated as black boxes* The compiler output is attached as Appendix 0* Exactlyp 22 black boxes were generated* 9 ISUM's are one- output boxesp while the others are multiple outputs* The H logic circuit corresponding to this output list is shown in Figure 20* This output contains 87 elements P and it took 1*63 seconds for the compiler to. generate*

Actual Hardware StructuresIf the three referred CLIMIT's of example 2 are

defined as those in Figure 21, the compiler output will express the actual hardware structure of 9-bit carry look­ahead adder* Although the compilation sequence has become more compilcatedp the compiler is not confusedP and is still able to respond* The compilation time in this case was 2*76 secondsp and the output list consists of 130 elements which can be found from Appendix D*.

In order to prove the accuracy of this compiler outputp three different CIUNIT's were chosen and shown in Figure: 22* They are first CL A, second SUM, and third PC*

Page 84: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

20 21

M

1 10 22 2 11 23 3 12 -

62L S U M tr H LPG

78

63 U 1^64

LSUMT —

79

LPG

59 U U

LSUM

60^

54>— kLPG

55 ^[156

80

LG LA

77 76

73 74

LCLA

22JI21J

& >^|83i>]/

27

ALSUM

7 16 28 8 17 29 9 18 19

38 '_2L,<— c LPGilZlj £—: f. | |33 | ̂ 3Qjl 1

L S U M t ^ i LPG LSUME~M LPGT

m m

39 y y 40' 35 yj35 U U 3 6 T

5ey y y |Q?I

31

LPG

XJ32

M lLCLA

M l MLLCLA

81 82

< 3 — - X f i

Figure 20. Black Box Structure of Example 2.

Page 85: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

7 5

CL U S P G ( X I 5 X 2 ) o I N P U T S : X 1 5 X 2 o O U T P U T S 8 DC 3 3 o C T E R M S : CT«BODY CT = XI 3 X2 5

0 E O 3 = aCT 5 0 C 1 3 = C.T5 0 12 3 = XI £ X 2 »END.

C LU8 SUM ( Y $ Z5 C I).INPUTSs Y| Z? C l .OUTPUTS ? OOo.

BODY00 = ( C I £ Y ) + ( A'CISZ) »END.

CLU: G L A (P 5 G 5 C I )o INPUTS: PC3 35 G 1 33 $ Cl.O U T P U T S : C L A 0 C 5 3oBODY

CLA0C03 = G C O 3 + ( GC1 3£P C0 3 ) +. ( GC 23 £ ( £/PC0 s 1 3 ) ) ICLA0C13 = £/PC0 8 23 5CLAOC23 * GC13 (GC23£PE13) ( G I£ t £ / P C 1 8 2 3 ) ) 5CLAOC3 3 = GC23 <- (CI£PC23)5CLA0C43 = CIo

END.

Figure 21» Difinitions of Example 2 Referred CLUNIT’So

Page 86: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

76

44 46 LCLA, 37 39 LCLA, 30 32 LCLA A

99 01 19

100

(a)

38 37 101

41

4240

43

LSUM

(b)

167

45

vLP G 2 L P G 1 l p g .

(c)

Figure 22, Structure of Three Example 2 Referred CLUNIT's. (a)First LCLA, (b)Second LSUM. (c)Third LPG.

Page 87: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

7 8M O D U L E ; R E A D O M oM E M O R Y ; RDM C43 < 1 6 > ? A D D R C 4 3 ? C N T C 3 3 o EX I N P U T S s R E A D ? C L O C K .EX B U S E S 2 A B U S C 435 D B U S C A 3 o C L UN ITS s B U S F N C A 3 <: B U S F U N C C 1 6 ? A > =CL UN I T S ; D E C C16 3 <* D E C D D E R C 4 } .C L U N I T S ; INC £.3 3 <s I N C R £ 3 > oB O D Y S E Q U E N C E ; C L O C K .1 A D D R * R E A D <= A B U S S C N T * R E A D <= 3 $0?

= > ( A R E A D ) / ( D o

2 D B U S = B U S F N (ROM ? D E C (A D D R ))? C N T <= I N C ( C N T ) ?- > (A ( £ / C N T ) j> £ / C N T ) / (2 p 1) o

E N D S E Q U E N C EC O N T R O L R E S E T ( l ) o

ENDo

CL U; D E C O D E R (I N ) C I > o I N P U T S ; INI 1 3 oO U T P U T S ; O U T I 2 a 1 3 oBO DY F O R M = 0 TO C 2 A I ) ~1 C O N S T R U C T

O U T CM 3 » £ / T E R M ( M ?IN ) - ROFoEND oC L U s . BUS F UN C (M M ? A A )£ R ? C 1 o I N P U T S ; M M C C 3 < R > ? A A C R ] .O U T P U T S ; B U S 0 U T C C 3 o C T E R M S ; CC CC 3 < R > oB O D Y C C < 0 > C 0 ; C - 1 3 = M M < 0 > C 0; C*=l 3 £ A A < 0 > [ 0 3 ?

F O R N = 1 T O R-l C O N S T R U C T: C < N > C 0 ; C - 1 3 = (M M < N > I 0 ; C " I 3 £ A A < 0 > C N 3)

<-CC<N” l > C 0 ; C = 1 3 R O F ?B U S O U T = C C < R - 1 > C . 0 ; C “ 13 o

E N D.C L U : I N C R ( X ) £ I > o I N P U T S : X C I I o O U T P U T S : Y C I 3 oB O D Y F O R U = 1 - 1 TO 0 C O N S T R U C T

IF J = I-IT H E N YI 3 3 = A X U 3E L S E Y U 3 » X U 3 3 ( £ / X U + l : I - 1 3 )

FIR O F .

END.

Figure 230 Example 3 Read Only Memory Module0

Page 88: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

7 9buffer. After the control sequence returns to stage 2, the stage 2 compiler can connect those output elements to signal destinations. Therefore, the stage 2 compiler need not worry about CLUNIT’s structure at all.

In example 3, DEC was invoked first because the address had to be decoded before BUSEN can use it. The com- liler's link list output for these three CLUNIT’s, listed in Appendix E, consists of 258 elements, and the CLUNIT compi­ler execution time was 2,66 seconds. Since CLUNIT’s were invoked in a module, actual arguments were all connected to CLUNITs1 input elements as actual inputs, A logic block diagram of the circuit is shown in Figure 24. It contains only the CLUNIT portion. Other control logic and clocked transfer networks were left for stage 2 compiler to generate. The SDT table of stage 1 output is also attached in Appendix E to show the element numbers of the module's declared symbols.

Stage 5 Parameter In the CLUNIT compiler, stage 3 parameter ST3PAR is

only used in the output routine. When this parameter is 1, a CLUNIT will be output as a black box. In fact, this situation is only programmed for the stage 2 output routine. If a designer would like to treat internal CLUNIT's as black boxes, he can accomplish this as in example 2, by merely

Page 89: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

2407340

241

M l

250

100

276

104

280

101

277

105

281

102

_Z_278

106

282

T B

:

140 141 142

103

279

107

283

143

50250100

0750604

163162161 :255 ’

543542541140

47464544

358 359

336355 338337

357

339

318

356

317 319316350

(a)

Figure 24. Example 3 Hardware Circuit, (a)Bus Function.

Page 90: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

167 166 165 164

239 238 237 236

266 265 264 263 262 261 260|

255 254 253 250252 251 249 248 247 246 245 243 242 241 240

M

168 169 170

548 549 550

554

551 552

Figure 24. (Continue). (b)Decoder. (c)Increment

Page 91: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

omitting the definition of the referred CLUHITo OtherwiseP the compiler has to waste a lot of time to generate internal elements, and then delete them in the output routine*

SummaryCTEBMS were efficiently used in these three examples*

This not only makes the circuit descriptions clear,, hut also prevents the compiler from duplicating-, an existing element*

From these three examples, including four runs, it - seems that compilation time is not proportional to the number of elements generated* This is true because totalexecution time includes table restore, table look-up, deela—- r 'ration checking, semantics error checking,, hardware connec­tion, and output list generation*. Although the number of elements in run 2 of example 2 is less than that in example 3,- it contains 22 internal CLUHlT8s, while example 3 had only 3 C1UH.IT invocations* The more complex in circuit des­cription and structure, the more compilation time is • required* This is more accurate in estimating execution time*.

Page 92: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CHAPTER 6

DISCUSS TOE M D CONCLUSION

A reasonably detailed discussion has been provided to justify the establishment of the Combinational Logic Unit Compilero Three sample designs were submitted and the outputs of their compilation discussedo Although the results verify the accuracy and efficiency of this compiler? some weakpoints still exist0 Some of them come from AHPL grammar, while some of them belong to compiler itself»

First, some circuit description notations are used in module only, like bidirectional connection s-s and con­ditional selection * 0 But.stage 1 syntax checking can not detect them if they are used in a CLUNIT circuit description0 That would cause stage 1 to generate an error output0 Fortunately, this can be detected by CLUCCE easily0

Another kind of error is signal feedback, i0ee input element appearing in <DLBM>: or an output element used as a signal source* In GLUCOM, if an error appears in boundary elements, for example, CLUI = CLUO, it is not difficult to detect* But if it happens in CTERMS or other internal logic gates to cause a loop, GLUCOM has no way to check it* However, this kind of error can and usually will

8 3

Page 93: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

be prevented by the designer himself0'Primitive functions did not appear in AHFL grammar

is another weakpoint0 Since primitive functions need not be declaredp when they are used in circuit description» stage 1 treats them as undeclared symbolSo C1UC0M must trace back to S1MTAB9 look at its name in order to decide which primitive function it is0 In addition9 some primitive functions require numerical arguments9 but grammar can not accept an integer as an invocation argument0 This forces the designer to use variable symbols to represent numerical argumentSo However9 in GLUNIT circuit description, an' index variable can be assigned a value only by using POE. statements^ That means those primitive functions which require numerical arguments can only be used within a POR Statemento Otherwise9 a lot of parameters have to be passed so that primitive functions can use them*

The hardware generated by CIUCOM is according to the circuit description* Although some improvements have been made, the final circuit is still not minimal0 CIUCOM is not provided with a minimizing routine,. Therefore, the designer can not expect a minimized output list from this compiler» The only way to obtain a minimal output at this time is the designer to simplify his circuit description first* Other= wise, further extension has to be made on CIUCOM, which would increase the compilation time*

Page 94: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

8 5Finallyg we would like to point out that C1UC0M can,

due to memory limitation, generate no more than 1000 elements including CIiU-I.» CLUOg and CTERMS0 Some of them will he deleted and will not appear in final output listo Therefore, the actual number of elements which can be gene=- rated by CBUCOM is only about. 6000 Some software skills can be used to improve this limitation, like packing element type code and'the I/O link pointers together in one word or using dynamic memory allocation for the link listo Of course, this improvement would be provided at the expense of speedo

In conclusion, this combinational logic unit compi­ler is much more efficient than the existing SHOBOL version compilero The old CLUNIT syntax version of example 1 was compiled by the SNOBOL compiler0 The compilation required 15*96 secondso- It has been indicated that the CLUNIT com­piler accomplished the task in 4=82 secondsc In addition, it can easily accomodate additional primitive functions, programmed as subroutines and attached to it„ Finally, it can be used to support the stage 2 compiler without any modification0

Page 95: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

APPENDIX A

UNIVERSAL AHPL GRAMMAR

86

Page 96: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

1 . 0 1 <S «> 5 J = <s>

2 = 01 < i > 5 ; a (AHPL PR0GR AH> =

3 = 01 3=02

<AHPL»R0GRAM> ? ! a *

(AHPLPROGRAN> = ( DESCRIPTIONS) (DESCRIPTIONS)

4 = 01 4 = 02

(DESCRIPTIONS) : : =5 $ =

(M0DULEDESC)(CLUDESC)

4=03 5 J * (FNREGDFSC)

5 = 01 <H0DU1 EDE S O 3 8 = (HODHEAD) = (H0DDECLS) . (MOOS E 0 )

6 = 01 ( CLU DFS O 8 8 a (CLUHEAD) o (CLU0ECLS) = (CLUACTS) = END

BODY

7 = 01 < FNREGDESO 8 8 a (FNHEAD) = (M0DDECLS) . (RELATION) = END

BODY

—!

OGO <M00HEAD> 2 8 a MODULE'* ID

9 . 0 1 9 = 02

<0uDD E CL S > 3 8 a 5 8 a

(M00DECLS) = (HDECL) (MDECL)

10 = 01 (MOOSEQ> 8 8 a BODY SEQUENCE s (SLRM) = ENDSEQUENCE (NOPROC)

(PROCPART) = END

11 = 01 11=02

(M0ECL> 2 8 a 8 8 a

( T Y P E D s ( I D _ D I M _ L I S T ) ( T Y P E D 8 ( I D _ D I M _ L I S T )

(RE-FI )

h“‘ ̂—1K-

* K-

oo

oo

O'V

i^U

) s 8 8 a8 8 a 3 8 a 8 8 a

( T Y P E2 ) s ( I D _ D I M _ L I S T ) ( T YP E 2) s ( I D D I M L I S f ) PIN "3 ( P I N _ L I ^ T >LABEL s ( L l B E L . L I S T )

( R EF 2 )

12 = 01 12 = 02 12 = 03 12 = 04 1 2 . 0 5 12 = 06 12 = 07

( T Y P E D 3 3 a

3 3 a 8 8 a 8 3 a 3 3 a

3 3a3 3 a

BUSESEXBUSESEX INPUTSINPUTSMEMORYOUTPUTSPULSES

13 = 01 13=02

( 10_ 0 I L I S T> 3 3 a

3 8 a( I D . D I M L I S T ) 5 ( I D DIM) ( I D _ D I M 5

14 = 01 ( R E F D 3 3 a { ( P A R _ L I S T ) >

1 5 . 0 115=02

( ry P E 2 > 3 3 a 3 3 a

CLUNTTSFNREGS 00

Page 97: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

1 6 . 0 1 <REF2> 5 ? = <8 ID <REF1> < D I MENSI 0 N>1 6 . 0 2 ; : = <s I D <PEF1>1 6 . 0 3 5 5 » <8 ID < D I MF N SI 0 N>1 6 . 0 4 $ i * <8 ID

1 7 . 0 1 < P I N . L I S T > 1 8 * < P I N _ I I S T > 5 <PTN NUM>1 7 . 0 2 2 I * <PI N_NUH>

I d . 01 < L A 3 E L _ L I S T> 5 8 - ( L A B E L , L I S T > S < L A B I D >1 6 . 0 2 ; s s < t. A 8 I 05

1 9 . 0 1 <1 D_ DI H> % 8 = I D <D I MENSI 0N>1 9 . 0 2 8 8 = I D

2 0 . 0 1 <0 I MENSi nN> 8 8 s < <AE> > I <AE> 12 0 . 0 2 ■ 8 8 » C <AE> 3 < <AE> >2 0 . 0 3 8 8 = < <AE> >2 0 . 0 4 8 8 s C < AF> 3

2 1 . 0 1 <AE> 8 8 = <EXPR>

2 2 . 0 1 <EXPR> 8 8 s < EXPR> ♦ <TERM>2 2 . 0 2 8 8 s < EX PR > - <TERM>2 2 . 0 3 8 8 a <TFRM>

2 3 . 0 1 <TERM> 8 8 » <TERM> * ( F ACTOR)2 3 . 0 2 8 8 = ( T E RM) 7 ( FACTOR)2 3 . 0 3 8 8 a ( FACTOR)

2 4 . 0 1 <FACT0R> 8 8 a ( FACTOR) A ( P R I M A R Y )2 4 . 0 2 8 8 a ( PR I MA RY )

2 ) . 0 1 <PRI MARY> 8 8 a ( (EX PR) )2 5 . 0 2 8 8 s INTEGER2 5 . 0 3 8 8 a ID2 5 . 0 4 8 8 a - ( P R I M A R Y ) .2 5 . 0 5 8 8 a + ( P R I M A R Y )

2 6 . 0 1 < P A R _ L I S T > 8 3 a (PAR L I S T ) | (PAR AM)2 6 . 0 2 8 8 a ( PAR? M)

2 7 . 0 1 <PARAM> 8 8 a ( AE>

2 s . 01 < t A B ID > 8 8 a ID = ( SL RM)

2 9 . 0 1 <SLRM> 8 8 a 10 ( SU8S, RANGE)2 9 . 0 2 8 3 a I D

3 0 . 0 1 <PI N_NUM> ■ 3 3 a ID ( ( NUM8 _ ST RI NG) )

Page 98: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

3 1 * 0 1 < NUM8 _ S" n i NG>3 1 . 0 231.033 1 . 0 43 1 . 0 5

3 2 , 0 1 <PR0CPART> 3 2 , 0 2

3 3 . 0 1 <NUPR0C>3 3 . 0 2

3 4 . 0 1 <STEPS>3 4 . 0 23 4 . 0 3 3 4 . 0 4

3 5 , 0 1 . <ACT I 0 N>3 5 . 0 23 5 . 0 3

3 6 . 0 1 < RE L AT I 0 N>3 6 . 0 2

3 7 . 0 1 <6RANCH>3 7 , 0 2

3 8 . 0 1 < RE L AT I 0 N1 >3 8 . 0 2 3 8 , 0 3

3 9 . 0 1 < 1NVQC AT 10N>3 9 . 0 2

4 0 . 0 1 <TRANSFER>4 0 . 0 2

4 1 . 0 1 <CUNNECTTQH>41.024 2 . 0 1 < 1 NVOK L I S T >4 2 . 0 2

4 3 . 0 1 <BGt.RM>4 3 . 0 2

4 4 . 0 1 <CGLRM>4 4 . 0 2

( <NUM8 S I R I N G > )<MUHB STRI NG) p INTEGER <NUM9_STRING> » ?I NT F G ? r?<PROCPART> , INTEGER ( S T E P S ) INTEGER ( S T E P S )

( S T A R T S TE P) 5 ( R E L A T I O N ) ( S T A R T S TE P)

NODELAY ( A C T I O N )( A C T I O N )NULLDEADEND

( R E L A T I O N ) ; (BRANCH) ( R E L A T I O N )(BRANCH)

( R E L A T I O N ) 5 ( R E L A T I O N I ) ( R E L A T I O N ! )

= ) ( GL RM) / (NUMB S TR I NG )=> ( N U M B . S T R I N G )

( I N V O C A T I O N )( TRANSFER)(CONNECTION)

ID ( ( I N V O K . L 1 ST) ) 4= ( BGLRM) ID ( ( I N V O K . L I S T ) ) ( =

( SYNCTR)( ASYNCTR)

( D L R M ) = ( GLRM)( OL RM) s = s ( C L H S )

( I N V O K L I S T ) ; ( CGLPM)(CGLRMS

( BGLRM) « (GLRM1>( GL RM1 )

( BGLRM)??

Page 99: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

4 5 . 0 1 4 5 . 0 2

<SYiNCTR>

4 6 . 0 14 6 . 0 24 6 . 0 34 6 . 0 4

< ASYNCTR>

oo

rx)t^ <DLRM>

4 6 . 0 1 4 8 . 0 2

<GLRM>

4 9 . 0 14 9 . 0 2

<CLHS>

5 0 . 0 1 <CLHS1>

5 1 . 0 15 1 . 0 2

<0LRM1>

5 2 . 0 15 2 . 0 2

<DLRi12>

5 3 . 0 15 3 . 0 2

<GLRM1>

5 4 . 0 15 4 . 0 2

<GLRN2>

5 5 . 0 1 55 . 0 2

<GLRM3>

5 6 . 0 15 6 . 0 2

<GLRM4>

5 7 . 0 15 7 . 0 2

<GLRH5 >

5 6 . 0 1 5 8 . 0 2

< GLR M6>

5 9 . 0 1 5 9 , 0 2

<GLRM7>

6 1 . 0 1 6 0 . 0 2 6 0 , 0 36 0 . 0 46 0 . 0 5 6 0 = 0 6

<ELEMENT>

: : = <DLRM> <= <GLRM> s i « <CLHS> <= <GLRH>

: : = <DLRM> < - <GLRH> s s = <CLHS > < - <GLRM> 55= <DLRM> <S- <GLRM> s := <DLRM> <R- <GLRM>

<DLRM> 8 <DLRM1> ;?= <DLRM1>

5 5= < BGLRM> * <BGLRM> 5 : = <BGLRM>

55= <DLRM> * <BGLRM> 55= <CLHS1>

5 5= ( <CLHS> )

5 5= <DLRM1> .» <OLRM?> s 5= <DLRM2>

55= ( <DLRM> )55= < S L R M >ss= <GLRM1> P <GLRM2> 55= <GLRM2>

ss= <GLRM2> <9 <GLRM3> ss= <GLRM3>

5 : = + / <GL'RM3>5 5= <GLRM4>

55= <GLRM4> * <GLRM5> 55= <GLRM5>

•5= £ / <GLRM5>*5= <GLRM6>

5 5= <GLRM6> G <GL Rs87> s 5 = <GLRM7>.

55= A <ELEMENT>5 5= < e l e m f m t >

5 5= ID ( < INVOK L I ST>5 5= TO CSUBS RARGE> ( 5 5= INTEGER f INTEGER 5 5= \ <NUMR STRING> \55= ( <BGLRfl> )5 5= <SLRM>

)< I N V 3 K _ L I S T >

Page 100: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

6 1 . 0 161.026 1 . 0 36 1 . 0 4

6 2 . 0 16 2 . 0 2

6 3 . 0 1

6 3 . 0 2

64 , 0 16 4 . 0 2

6 5 . 0 16 5 . 0 2

<SUBS_PANGE>

ANGE>

<STARTSTEP>

<C LUHE AD>

<CLUDECLS>

6 6 . 0 1 <C LUAC TS >

< 1 N V 0 K 2 „ L I S T >6 7 . 0 16 7 . 0 2

66.0 16 3 . 0 26 3 . 0 36 6 . 0 46 3 . 0 5

6 9 . 0 16 9 . 0 2

7 0 . 0 17 0 . 0 27 0 . 0 3

71.017 1 . 0 2

7 2 . 0 1

7 2 . 0 2

<CLU0ECL>

<C LUAC 1 2>

<CLUACT> '

<1FSTAT>

< F QRST AT>

7 3 . 0 1 <CLUREL>

7 4 . 0 1 <THEM_CLAUS>

7 5 . 0 1 C t L S E . C L A U S >

7 6 . 0 1 < F QRHE AD>

< <RAHGE> > C <RANGF> 1C <RANGE> 1 < <RANGE> >< <RANGE> >t <RANGF> ]

<AE> < AE>

<AE>

= CONTROLRESET ( <GLRM> ) / < NUN3„ STRI NG> )« CONTROLRESET ( <NUMB_STRI NG> )= CLU s I D ( < T N V OK ? _ L I S T > ) <REF1> = CLU $ I D C < I N V 0 K 2 „ L I S T > )

<CLUDECLS><CLUOECL>

<C LUACT 2>

<CLUDECL>

< I N V 0 K 2 „ L I S T > 5 I D

* I NPUTS = OUTPUTS = CLUNTTS* CLUNI TS = CTERMS

= <CLUACT?> « <CLUACT>

< I D DI M L I STP1 i < I 5 _ 0 I R „ L I S T >

< I D _ 0 T M _ L I 5 T > < i d _ d i h , l i s t > <REF2>

< I D „ D I M _ C I S T >

<CLUACT>

* <CONNECTION>«. < I F S T A T >* <FORSTAT>

* I F <CLUREL> <THEN_CLAUS> <ELSE_Ct AUS> « I F <CLUREL> <THEN_CLAUS> FI

= <FORHEAD> » <AE> TO <AF> STEP <AE> CONSTRUCT <CI UACTS> ROF

* < F O R H F A O > = <AE> TO <AE>CONSTRUCT <CLUACTS> ROF

= I D < P. EL0 P> < AE>

= THEN <CLUACTS>

= ELSE <CLUACTS>

= FOR I D

Page 101: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

7 7 . 0 1 <REL0P>7 7 . 0 27 7 . 0 37 7 . 0 47 7 . 0 57 7 . 0 6

7 3 . 0 1 <FNHEAD> 7 8 . 0Z

<• ! - >! S - < >5 5* =<5 ! * > =

5 5= ' FRFEG s ID ( 5 5* FREG 5 ID (

< I N V 0 K 2 _ L I S T > » <REF1> < I N V 0 K 2 . L I S T > )

voK)

Page 102: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

APPENDIX B

COMPILER PROGRAM LISTING

93

Page 103: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

c*C*. M a i n p r o g r a m C*

I M P L 1C I r I NT E GER( A - Z ) i n c l u d e ' X B . i N C INCLUDE « AUX , INC »I NCLUDE ' A L W A Y S , I N C 'I NCLUDE « CQMPLNo I N C 1 I NCLUDE ' C O M P . I N C *I NCLUDE • C O M P O . I N C

C* R e s t o r e PHASE 1 o u t p u t f i l e CALL RESTOR

C* VALPNT i s e 1e me n t n u mb e r p o i n t e r ? s o i s GNEXTo B o t h p o i n t t oc * n e x t a v a i l a b l e v a l u e .IuNEX'1 = 1

GNEXT =1IS=0 •400 U « I i + l

I F ( IS , GT . SYSTAP) GO TO 500I F ( S T 0 R E ( R E C E I V ( S Y S r A d ? S Y S T L T p [ S » 2 ) ) .NEo 64 21 GO TO 400 I S G - R E C t I V ( SYS TAft? S Y S T L T ? I S p 1 1 - 1 I F ( S T u R E i I S Q r 1 0 ) . NE. 0 ) GO TO 4 00 G N = CCALL COMCL U( I SOp GN)GUTO 4 0 0

500 CONTINUECALL ST3CLU

S fOP ENDC*** ££*********************************** fc******************’St***********c*

C* COMCLU ; CLUN I T COMPILERc*SUBROUTINE COMCLUi I SQP p Q.P)I M P L I C I T I N T E G E R ( A - Z )CGHM ON/STAC L-UZ STACK ( 1 0 0 ) . ST ACKLpNEXTS COMMON / CLU/ C L UT B OOp 11 ) p C LUL p CLUP C OMMGN/ CLUCQM/ SYSPTpNERRI INCLUDE ' T E M P I . I N C INCLUDE ' X8 » I N C 'I NCLUDE " A U X . I N C *I NCLUDE « ALWAYS. I N C INCLUDE ' COMPLN. TNC*I NCLUDE ' C O M P . I N C '

Page 104: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

DATA CL UL T p C L U L / I O O s O/DATA S T A C K L / l O O /

HERR 1 = 0 NEXT3=0 Ci ' UN»CLUL + l CLUP=CLUN

C* CLUTB s t o r e s t h e i n f o r m a t i o n a b o u t CLUNI T f o r MODULEI F (OP . NE. 0) GO TO ?,0CALL S E r C I O ( I S Q P )GOTO 15 00

20 CLUT8( CLUPp l ) = S T 0 R E ( R E C E I V ( S Y S T A B . p S Y S r L T p S T 0 R E ( I S D P 4 - l ) , ! ) ) C L U T 8 ( C L U P , 5 ) = S T 0 R E ( I S Q P + 2 )

50 CONTI NUcC----------------------------------------------------------------------------------C* T a b l e l o o k upC* PTGT1 p o i n t s t o TOTS w h e r e SRT p o i n t e r i s s t o r e d6 0 PTO 11 = R EC E I V ( TITTS» TO TS LT p S TOR E ( Q P + 2 ) p I ) - 1

SRTPT = RECEI V ( S R T p SRT L T pSTORE (PTnTl - s-A)p 1 1 - 1 C* ARGP p o i n t s t o TOTS w h e r e ARG p o i n t e r i s s t o r e d

A R G F = R E C E I V ( T 0 T S p T 0 T S L T p S T 0 R E ( Q P * 3 I p 1) - 1 C* # o f a r g u m e n t w i l l be p a s s e d

N A R G F = S TOR. E ( A R G F + 2 )C* PTUT p o i n t s t o TOTS w h e r e i s t h e CLUNI T t e m p o r a r y o u t p u t

RTUT = R E C E I V ( T O T S p T OTSL T p STORE(QP + 4 ) p 1 ) - 1 STORE( P T OT + 1 ) = - 5 s.VURE ( PT0T>2 ) =STORe ( P r - 1 T 1 * 2 )STORE( P T 3 T + 3 ) =STORE( PTOT1 + 3 )

C* SDTPT p o i n t s t o SOT w h e r e l o c a l CLUNI T i s l o c a t e dSDTPT = RE C E I V ( S OT p S DT L T p STORE ( S R T P T + D p D - I

C---------------------- :---------------------------------------------------------C* CHECH I F RE FEREO CLUNI T I S DECLARED AND DEF I NED,C* A 1 - A 2 I S LOCAL NAME70 CALL F 1H D S Y ( S T 0 R E ( S D T P T > 1 ) » A 1 , A 2 )

I F ( ST 0 RE( SDT PT < - 2 ) , E 0 , 1 5 1 . O R . STORE ( SDTPT + 2) . EO , 6 8 3 1 . OR . STORE (SDTS»T + 2 ) . E Q . 6 8 A ) GO TO 100 TYPE 9 0 pA 1 p A2

■90 FORMAT ( / p » ERROR $ n ’ p 2 A 5 p « IS NOT A DECLARED C L U N I T ! 0 )CLUN=CLUN- 1 GOTO 9 9 9 9

100 CLU' I tit CLUP» 3 )*STC)RE ( SOTPT+1)C* C h e c k i f g l o b a l CLUNI T i s d e c l a r e d

1 F ( ST ORE ( S DT P T + 3 ) . ME. 0 ) GO TO 120 TYPE I I O p A l » A2

1 1 0 FORMAT( /p * WARNI NGi GLOBAL CL UNI T FOR " " p 1 2 A5 p I S MOT D E C L A R E D ! »)GOTO 139

Page 105: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

C * C h e c k i f g l o b a l CL UN I T i s d e f i n e dC* FREF p o i n t s t o REF f r o m l o c a l CLUNI T120 F R E F = K E C E I V ( R E F , R E F L f , S T O R E ( S D T P T + 3 ) , ! ) - !

I F ( S T G R E ( F R E F > 2 ) ' . ME . 0 ) 6 0 TO H O TYPE 1 3 0 , 4 1 , A2

1 3 0 FORMAT ( / , » WARNING: GLOBAL CL UNI T FOR ,0«p 1 2 A5 , I S N I T DEF I NED! • )

139 CALL GEBDXl ( P T 0 T 1 , ARGF, P T H H S O T P T , A l , A2)GOTO 9 5 0 0

C--------------------------------------------------------------------------------C* S t a r t d e c l a r a t i o n p a r t c h e c k i n g140 CONTINUE

CALL CL U P A R ( F R E F , T R E F , N A R GT , S T 3 P A R )C LU f 8 ( CLUP? 2 ) * STOR E ( S YS P T + 1)C L U T B ( C L U P , 11 ) = ST3PAP

I F t N E R R l ,EQo 0) CALL UPDSDT

CALL CL UARG( NARGF , NARGT , T REF , ARGF )

CALL C L U1UP( S D T P T , P TOT, P TO T 1 , QP) t800 I F ( NERR1 . EO. 0 ) GO TO 1 500

CALL G E 8 0 X 1 ( P T 0 T 1 , A R G F , P T O T , S D T P T , A 1 , A 2 )GUI 0 9 500

1 5 0 0 CONTI NUE

C* S t a r t CLUNI T b o d v c o m p i l a t i o nC* 2C* C h e c k t o see i f CLUNI T has b e e n s e r v e d b e f o r e

CALL CH t C L U ( C L U P , S E R V E , OC L U )G u T Q ( 1 6 0 0 , 1 6 5 0 , 1 7 0 0 ) SERVE

1 6 0 0 N E R R H 1GOTO 6 000

1 6 5 0 CLUT8 ( CLUP, 9 ) = GNE XTCALL C G P C L U ( C L U P , 3 C L U , C L U N )GOTO 9 100

C* GLUT8 ( C L U P , 9 ) s t o r e s t h e f i r s t i n t e r n a l e I e m #«1 7 0 0 C L U I 8 ( C L U P , 9 ) * G N E X T C* S e t up CTERMSo

uO 1850 I - STORE ( SYSPT + 4 ) , STHRE ( SYSPH- 5 ) P T S D T * R E C E I V ( S D T , S D T L T , I , l ) - l I F < S T 0 P E < P T S D T + 2) . N E , 68 5 ) GO TO 1.8 50 S T 0 R E ( P r S 0 T + 8 ) - G N E X T00 1 80 0 K = l , STORE (PTSDT-6-4) *S TORE ( P T S D T <-5)GNUM=0

Page 106: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CALL S E T £ H H G H U n , C \ E R X S )0 c o n t i n u elO CONTINUE

STORE ( S Y S P T H O ) - - !PSQH»l <t C- ETV( S3PT#SQRTLTpSTQRF( SYS! >T + 6 ) p l ) - lF i n d QTABLE r a n g e QL = b T 0 R £ ( P S Q R ^ 3 ) QH* STORE( PSOR+4 ) I Q»OL9 0 0 I F ( 10 o G T o d H ) G O T O

f o r CLUNTT

8 0 0 0

I Q P » R E C E I V ( O T A B L E * O T A B L T p T O p l ) - lQ P « S T D R E ( I O P + 1 )721s’7 2 1 - f Q * s t a t e m e n t1 F ( L P . EQ. 721 I F ( C P o E 0 o 711 6 0 1 p 6 0 2 - C L U N I T I F ( U P oNE= 601

ORoORocall.AND.

OPOP7 1 1 « 7 1 2 - 1 F s t a t e m e n t

EQEQ.

722 ) 712. )

GOGO TOTO

1 9 5 01 9 5 0

OP oNFo 6 0 2 ) GO TO 6 0 0 0

S e r v e s p e c i a l s t a t e m e n t s - - C h e c h i f STACK o v e r f l o w I F ( N E X T S o L T o STACKL) GO TO CALL Ch RRORI AoNERRl )GOTO 7 000 S T ACK( NEXTS + 1 ) * 1 N E X T S - N E X T S + 1 0P= 1QPI F (CP oLEo 602 ) GJ TO 4 0 0 0 I F ( OP oLE= 7 1 2 ) Gl TO 3 00 0

FORp I F , and CLUNI T

1 98 0

• e r ve FOR s t a t e m e n t

OP, OP )~ ° n o 0) OP

Page 107: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CC AFf ER F I N I S H " I F " * " F O R " , AND " C L U " * CONE TO THI S STEP5 0 0 0 GP=STACK( NEXTS)

S U T 0 ( 5 1 0 0 p 4 0 0 0 * 3 5 0 0 * ? 5 0 0 ) OP 5 1 0 0 NEXTS=NEXTS- 1

Gj T u 7000

C-------------------------------------------------------------------------------------------------- -- --------------------------------------------------------------C* S e r v i c e g e n e r a l s t a t e m e n t i n t h e CLUN I T b o d y6 0 00 CONTINUE

NERR2=0CALL QTI3C0N ( I 3 P » N h R R l » N E R R 2 )

C* I f r e t u r n e d NERR2 i s n o t z e r o * s o m e t h i n g w r o n g i n t h i s s t a t e m e n t I F (NERR.2 o EQ o 0 ) GO TO 7 0 0 0 NERR13 NERR. 1 + NERR2 TYPE 6 2 0 0 »MERR2» TQ

6 2 0 0 FOR N A T (9 * * * ' , 1 3 , ' ERROR FOUND IN QTA8LE 8 , 1 4 , / )

7 0 0 0 I Q = I Q * 1 7 9 9 9 GOTO 1 900

C* F i n i s h c u r r e n t CLUNI T c o m p i l a t i o n ROOD CONTI NUEC* I f any e r r o r f o u n d i n c u r r e n t CLUNI T

I F ( N E R R 1 * EQ o 0 ) GO TO 9 0 0 0 CALL GEB0X.2 (CLU.N, A l , A2 )GOTO 9 5 0 0

2 1 5 0 CONTINUE

9 0 0 0 I F ( GNt XTo GTo CL UTB( C LUP, 9 ) ) CALL O P G A T E ( C L U T B I C L U P , 9 ) , G N E X T - 1 )9 1 0 0 C L U T B ( C L U P , 1 0 ) = G H E X T - TC * I f c u r r e n t CLUNI T i s c a l l e d by MODULE 7 9 5 0 0 I F l h E X T S = EQ. 0 ) GO TO 9 9 9 9

1 F ( S T A C K ( N E X T S ) » EQ. 2) GO TO 9 6 0 0 CALL CERROR( 22 , NERR1)GOTO 9 999

C* R e t u r n t o s e r v e p r e v i o u s CL UNI T 9 6 0 0 C L U P = C L U T B ( C L U P , 5)

QH=STACK( NEXTS- 1 )I .Q»Sl A C K ( N E X T S - 2 )NEXTS=NEXTS- 3 NERR1= 0 GOTO 5 0 0 0

9 99 9 CONTINUE CLUL«CLUN RETURN END

C*

Page 108: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

C* CLUPAR! Ch e c k and p a s s CLUNI T p a r a m e t e r C* £*>&*#*****$**$##$*#&#$*$##*

SUBROUTINE CL UP A R( F RE F p TREFp NARGT#ST3PAR)I M P L I C I T I N T E G E R ( A - Z )C uMhbiN / CL UC Oh / S YSP T p N ER R 1 INCLUDE 1XB . I NC 'I NCLUDE 6 AUX o I NC"I NCLUDE ' A L W A Y S . I N C '

ST3PAR=0C* SYSPT p o i n t s t o SYSTAB w h e r e g l o b a l CLUNI T as l o c a t e d

S Y S P T * R E C E I V( S Y S T A B p S Y S T L T p S T O R E (F R E F + ? )p 1 )~1 C* TREE p o i n t s t o REF f r o m g l o b a l CLUNI T

r R E F = k E C E I V ( R E F , R E F L T , S T O R E ( S Y S P T + 8 ) p l ) - l NARGI = S T O R E ( T R E F r A ) - STORE ( TREF + 3 ) + l

C* C h e c k i f U o f p a r a m e t e r m a t c h .C* Mo p a r a m e t e r r e q u i r e d

I F ( S T O R E { F R E F + 5 ) oEQo O . AND. S T O R E ( S Y S P T + 2 ) « E O o 642 I GO TO 90 I F ( S T u R E ( S Y S P T + 2 ) . EQ. 6 4 1 ) GO TO 10

C* P a r a m e t e r i s n o t r e q u i r e d ? b u t q i v e n . i g n o r e I t CALL CERROR(1? NERR1)GOTO 90

10 I F ( S T u R E ( F R E F + 5 ) o N E . 0 ) GO TO 20C* P a r a m e t e r i s r e q u i r e d ? b u t n o t g i v e n

CALL CERROR(7? NERR1)GOTO 90

20 CONTI NUEC* C a l c u l a t e # o f p a r a m e t e r

NPAFsSTQRE ( FREF4-6) - STORF ( FRE F* 5 H I M P A 1 = S T 0 R E ( T P E F + 6 ) - S T O R E ( f R E F + 5 ) + l I F f N P A F . G E . NPAT) GO TO 40

C* # o f g i v e n p a r a m e t e r i s n o t e n o u g hCALL CERROR< 8 , NERR1)TYPE 30? NP AT? NPAF

30 FORMAT( ' # PARAMETER R E Q U I R E D ® ' ? 1 2 ? ' P A S S E D ® ' ? 1 2 )GOTO 90

C* I f s o f g i v e n p a r a m e t e r mor e t h a n r e q u i r e d ? i g n o r e i t40 I F ( N P A F oGT. NPAT) CALL CERRQRI 2 ? NERR1)

FPAR- STORE( FPEF+5)

C* Pas s p a r a m e t e r' DU 80 I = STORE( TREF + P) ? ST0 RE( TREF- f 6 )

T P A R = R t C E I V I P A R A M ? P A R A L T ? I ? 1)I RAR = RLCEI V( THUNK? THUNLT? S T ORE( T PAR) ? ? )I F ( ST i J RE( TPAR ) . EQ. STORE ( T P A R + 1 ) ) GO TO 50 CALL C ERROR( 27? NERR1)GOT G 70

50 TPAR = R t C E I V (THUNK? THUNLT? S TOR E ( T'PAR )? 1)C* G l o b a l CLUNI T p a r a m e t e r mu s t be an ” 1 0 "

Page 109: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I F ( S T O R E t T P A R ) . FO, 2 5 3 ) GO TO 6 0 CALL CER R OR ( 9 , N F R R 1 )GO U) 70

60 T P A R = ' R L C F I V ( S D r # S 0 T L T j > S T 0 R E ( T P A R > l ) i > 8 ) PPAR* RECEI V ( PAPAM» PARAL T # F PAR» 2 )PVALUE= S T ORE ( p PAR)I F ( L T U R t ( P P A R - l ) „ NEo O) P VA L UE = EX T HN KC ST ORE ( ? P AR ~ 1 ) )j Tl RE( TPAR) =PVALUECALL F I N 0 S Y ( S r r i R E ( T P A R - 7 ) » P N l p O N 2 )I F ( P N 1 , N E . ' S T 3 R A « . OR. P N Z . N E . ' R ») GO TO 70 S T 3 P A R = s T n P E ( TPAR)

70 FPAR=FPAR+l 8 0 CONTINUE 90 CONTINUE

RETURN END

C*C* CLUARG: C h e c k and p a s s CL UNI T a r g u m e n t s C*

SUBROUTINE CLUARG( NARGF, NARGTpTRFF* ARGF)' I M P L I C I T INTEGE R ( A - Z )

CuMMUN/ CLU/ C L U T B ( 8 0 » 1 1 ) » CLULpCLUP COHMON/ CLUCQM/ SYSPTj NERRI I NCLUDE 6 XB o I N C 1 I NCLUDE «A U X . I N C "

■ I NCLUDE ' A L W A Y S . I N C *I NCLUDE » CQNP L N. I NC 'I NCLUDE ' COMP. I NC*

C* Ch e c h i f n u m b e r o f a r g u m e n t s m a t c hI F( MAR GT . L E . NARGF) GO TO 20

C* # o t p a s s e d a r g u m e n t i s n o t e n o u g hCALL CERRORf I O p NERRI )TYPE 1 0 , NARGT, NARGF

10 FORMAT ( 1 # OFARGUMENTS REO!JIRED=« , 1 4 , 6 P AS SFD = 5 , I A ) GOTO 90

C* I f n o f p a s s e d a r g u m e n t mo r e t h a n r e q u i r e d , i g n o r e i t 20 I F ( NARGT . L T . NARGF ) CALL CERROR( 3 , NERR1)

I F( NLR, R1 . H E . 0) GO TO 90

C* Pa s s a r g u m e n tA R G F 1 * S f 3 R E ( A R G F + A )GLUT B ( C L U p , 7 ) = GNEXT00 90 ARGT» ST URE( T REF + 3 ) , STORECTREF+4)T A R G = R E C E I V ( A R G , A R G L T , A R G T , 1 )FARG = Rf.CE 1 V ( ARG, ARGLT, ARGF 1, 1 )TARG = R E C E I V ( SD T , S DT L T » S T 0 R F ( T A R G ) , 8 )FAkG = RECEI V( TO T 9 , T O T S L T , S T O R E ( F A R G ) , 1 3 - 1

Page 110: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

STORE (SYSPT n o ) * - !1 F ( S Ti l Rt ( TARG- 6 ) .EQ« 6 8 1 ) GO TO 30 CALL CERR3R<13»NERR1)

30 I F ( S T 0 R E ( F A % G t 4 ) » GT» 0 ) G O T O 40C* P a s s e d a r g u m e n t i s ? ? ( OON" T CARE)C* j e t up OON"T CARE d i m e n s i o n

STORE( F ARG+ ? ) “ STORE( T A R G - 4 )STOPEi FARG4-3 ) = STORE ( TARG- 3 )

C* Ch e c k i f d i m e n s i o n o f a r g u m e n t m a t c h40 IF ( 5 TUREt TARG- 4 ) . EQ. STORE ( FARG4-2) oANO.

1 ST ORE( TARG- 3 ) . E Q . STORE( FARG + 3 ) ) GO TO 5 0 C A L L C t R R O R ( 1 1 , N E R R 1 )

5 0 I F ( N E R R 1 . M E . 0 ) GO T O 8 0

C * Pas s a r g u m e n t p o i n t e r s and' s e t up c I u iCALL ARGENT (0» FA RG# STORE (FARG-6-?)» l o l j > l )STORE( TARG) »GNEXT00 70 J = l , S T O R E ( F A R G + 2 ) * S T 0 R E ( F A R G + 3 )GNUM=0CALL j fc fG A T ( GNOMo C LU T )CALL ADDIN ( GNUi l » AR GL I S ( 1# J ) » 1 )

7 0 C O N T I N U E8 0 A R G F 1 - A R G F 1 + 19 0 ' C O N T I N U E '

RETURNE ND

C*C* UPDSDT 5 U p d a t e SOT d i m e n s i o n s f o r CLUNI T d e c l a r e d s y m b o l C *

SUBRUUI I NE UPDSDT I M P L I C I T I N T E G E R ( A - Z )COMNOn / CL UCGN/ S YS P T p NERRI I NCLUDc » XR„ I NC 1 I NCLUDE « A IX o I N C I NCLUDE « ALWAYS, T N C

C * U p d a t e I N P U T - GUT^U T - C L U N I T - C TERMS d i m e n s i o n DO 1 0 0 1 = S T 0 R E ( S Y S P T + 4 ) p S T Q R E ( S Y S P T * 5 )P I S DT = R EC E I V ( S 0 T p S D T L T p I p I ) - 11 F ( ( S T U R E ( P T S D T + 2 ) / 1 0 ) =NE, 6 8 ) GO TO 100I F ( STuRE(PTSDT-e-b) . N E . 0) STOR F ( PTS0T+4 )■ EXTHNK ( STORE ( PTSDT<-6) ) I F ( S T u R E ( P T S D T + 7) . ME. 0) ST ORE( PTS0T + 5) = EXTHNK( S T O R E ( P T S 0 T > 7 ) )

C* C h e c k i f d i m e n s i o n g r e a t e r t h a n z e r o1 F ( S T 0 R E ( P T S D T M ) . L E . 0) CALL C ERROR ( 6 pNERR1 ) l F ( S T U R E ( P T S D T + 5 ) , L E . 0) CALL CERROR( 6pMERR1)

1 0 0 C O N T I N U E R E T U R N

Page 111: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

* ***a*********************4************************************ *c*C* CLUOUP: S e t up CLUNI T o u t p u t e l e m e n t s and p u t t h e m o n t o C* t e m p o r a r y o u t p u t b u f f e rC *C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * "i6* * * * * * * ^ * * . * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

SUBROUTINE CLiJOUP ( SOTPT» PTOT » PTDT 1» QP)I M P L I C I T I N T E G E R ! A - Z )COMMON/CLU/ C L U T B ( 8 0 . I I ) p C L U L » C L U P COMMON/ CLUCOM/ SYSPTpHERRI I NCLUDE » X8 o I N C 1 INCLUDE ’ AUXpI NC"I NCLUDE ' A L W A Y S . I N C 'COMMON/GAFUN/GNEXT j,-I NCLUDE ' C O M P . I N C *INCLUDE ' T E MP O. I N C «

DO 40 r=S TORE ( SYS' ?T*4) P STORE ( S Y S P T * 5 )P r S D T = R E C E I V ( S D T p S D T L T p I p l ) - l

C* L o o k f o r CL UNI T o u t p u t s1 F ( S T u RE ( P T S D T + 2) . N E . 68 2 ) GO TO 40

C* Ch e c k i f g r a b o i d i e n s i o n e q u a l s l o c a l d i m e n s i o n I E ( S T O R E ! P T S D T + 4 ) . 5 0 . S T OR E ( S D T P T * 4 ) . A N D .1 STURE( PTSDT+5 ) . EQ. S T OR E ( S OT P T + 5 ) ) GO TO 10 CALL Ch RROR( 2 0 p NERR1 )GOTO bO

10 I F I N E R R l . M E . 0 ) GO TO 50 C* S e t CL UNI T o u t p u t p o i n t e r

STORE( PTSDT+8) =GNEXT STORE! SDTPT+8 ) * GNEXT CLUTB! CLURp 8 ) =GNEXT00 20 r c = I p S T O R E ( p r S 0 T * 4 ) * S T O R E ( P T S D T * 5 )GNUM=0CALL S E I G A T ( GNUMpCLUO)

2 0 CDNUMUcC* P u t o u t p u t e l e m e n t s i n t o t e m p o r a r y b u f f e r

CALL ARGENT( O. PTQTI p STORE( PT0T1 + 2 ) p 1 p I p 1)? T = E I N T E M ( 0 )S T O R E ( P f n r + 4 ) = P T P T E M ( P T ) * S T 0 R E { Q P * 4 )DO 30 J = l p S T O R E ( P T 0 T + 2 ) * S T 0 R E ( P T 0 T + 3 )TEMP (P i p J ) = ARGL IS ( l.p J )

30 CONTI NUE GOTO 50

4 0 CONTI NUEC* No CLUNI T o u t p u t i s d e c l a r e d

CALL CERROR( 12 p NERR1)

Page 112: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

50 CONTI NUE RETURN END

**************************C*C* SET CI Q: S e t u p i n p u t - o u t p u t e l e m e n t s f o r CL UNI T c a l l e d C* b y C o m b i n a t i o n a l L o g i c U n i t C o m p i l e rC *C*<«******y* *********************************************** *************

SUBROUTINE S E T C I O ( I S Q P )I M P L I C I T I N T E G E R ( A - Z )COMMON/CLU/ C L U T B ( 8 0 » 1 1 ) . »CLUL»CLUPCOMMON/ CLUCQM/ SYSPTp NERRIINCLUDE ' X B o I N C *I NCLUDE 9 AUX, I N C *INCLUDE 9 ALWAYS, I NC 9 I NCLUDE • COMP. I NC*COMMON/GAFUN/GNEXT

C* C o m p i l e a CLUN I T d i r e c t l y SYSP-r» ISQPCLUTB<CL UP» 1 ) - S T O R E ( S Y S P T * ! )CALL UPDSDT

C L U T B ( C L 0 P » 2 ) « S T 0 R E ( S Y S P T + 1 )C* S e t up i n p u t - e l e m e n t

C L U T B t C L U P p 7 ) - G N E X TDO 200 I = S T O R E ( S Y S R T + 4 S T O R E ( S Y S P T + 5 )P T S D T - k E C E I V t S D T p S D T L T p I » 2 )I F ( s l U R E ( P T S D T ) , NE , 6 8 1 ) GO TO 200 STORE! PTSDT * 6 ) = GNEXTDO 100 J = 1 p S T 0 R E ( P T S D T * 2 ) * S T D R E ( P T S D T * 3 )GH* C , 'CALL. S f c TGAKGNpCLUI )

100 CONTINUE 200 CONTINUE

C* S e t up o u t p u t e l e m e n t s C L U T ti ( C L U P p 8 ) = G N E X T00 400 I = S T OR E ( S Y S P T + 4 ) p S T O R E ( S Y S P T + 5 )P T 0 D f = R E C EI V ( S D T p S 0 TLTp I p 2 )I F ( S T O R E ! P T S D T ) . ME. 6 8 2 ) GO TO 400 S T O R E ( P T S D T * 6 ) e GNEXTDO 300 J = l , S T O R E ( P r S 0 T + 2 ) * S T 0 R E ( P T S D T + 3 )GN$ 0CALL SETGAT( GNp CLUO)

300 CONTINUE 4 00 CONTI NUE

Page 113: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

r e t u r nEND

C* iC* CLUEORi Take c a r e o f " F D R " s t a t e m e n t C*C* " •’it******** ************* ********** *

SUBRuUTl NE- CLUFOR ( IQp a p pQP S I M P L I C I T I N T E G E R ( A - Z ) - -COMMQN/STACLU/ STACK( 1 0 0 ) pSTACKLpNEXTS C 0 h M 0 N Z C L U C 0 N / S Y S p T »N E R R1 I NCLUDE * XB o INC 'I NCLUDE • AUX. TNC*I NCLUDE » ALWAYS. I N C 1

I F ( U P oEQ, 0 ) GU TO 2 1 5 0 QP = ST ACK( NEXT S- 1 )I D « S T A C K ( N E X T S ~ 2 )1 D S = S I A C K ( N E X T S - 3 )Q L L * i f A C K ( N E X T S - A )MEXTS=NEXTS- 5

' F P « R E C E I V ( F 0 R p F 0 R L T p S T 0 R E ( 0 P * 2 ) p 1 ) - 1 1 OH» d X l HN K( ST ORE ( F P + 3 ) )0 H H * S T 0 R E ( F P + 6 )I F ( D L L o GT o ’ QHH) GO TO 2 95 0 GOTO 2 40 0

2 1 5 0 CONTI NUEFP- RECE I V ( F 0 P» F 0 RL T * S T QRE{ QP+ 2 ) p 1 ) - 1

C* C a l c u l a t e " I D " r a n g eI DL * £ XT HNK- ( ST 0 RE( F P+ 2 I )1 D H = E X T H N K ( S T 0 R E ( F P * 3 ) )I F ( S T u R E ( F P + 4 ) . E D . 0 ) GO TO 2 2 0 0 I D S = E X T H N K ( S T O P E ( F P * 4 ) )I F ( IDS . ME. 0 ) GO TO 2 3 0 0

2 2 0 0 I K 1DL oLE. ID H ) IDS = 1I F d O l . . GT . I OH) I D S = - 1

2 3 0 0 I F ( IDS . GT . O . AND. I D L . L E . I O H ) GO TO 2 350I F ( I D S . L T . O „ AND. T D L . G E , I O H ) GO TO 2 35 0CALL CERR0R( 21»NERR1)TYPE 2 3 4 0 , I O L , I O H , I D S

2 3 4 0 FORMAT (« FOR I D =« , 13, 1 TO1 , 13 , 1 STEP 1 , 1 3 , 0 CONSTRUCT o o c . K GOTO 2 999

2 3 5 0 Q L L = S T O R E ( F P + 5 )9 HH= S T u RE( F P + 6 )I F ( QHH . GT. I D ) IQ=QHH I D - I D L

C* Comp i I FOR-BODY2 4 0 0 I F ( IDS . L T . 0 . AND. ID . L T . I OH) GO TO 2 9 9 9

Page 114: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I h ( IDS oGTo 0 o AND o' I D , G T . TDM) OF) TO 299 8C * U p d a t e ” I D ” v a l u e

STORE ( RECF I V t SOT „ S0TLT» STORE ( FP + 1 ) p m = ID

2S00 C U N U K U t 'C * S e r v i c e s p e c i f i c I D

DO 2 9 0 0 I QQ= QL L p QHH i t i P = R E C E I V ( QT A B L E p QTA8L T p I Q O » 1 ) - l GP«STURE( I QP + l ) '

C* Chech i f a n o t h e r ” FOR” > ” I F " » o r ” CLU” i s metI F ( O P o EQ o 711 . OR. OP oEQo 7 1 2 ) GO TO 2 6 0 0I K GP o EQ o 721 . OR. OP . EQ, 7 2 2 ) GO TO 2 6 0 0I F (UP , N E , 601 . AND, O'P . N'E. 6 0 2 ) GO TO 2 8 0 0

2 6 0 0 I F ( STACKL , GE. ( N 5 X T S + 4 ) ) GO TO 2 6 5 0CALL C E RROR ( 4., ME RR1)GUTL 2 9 0 0

C♦ S t o r e i m p o r t a n t p o i n t e r i n STACK2 6 5 0 S T A C K ( N E X T S * 2 ) * IDS

STACK( NEXTS+3 ) = I D STACK( NEXTSt -4) = OP STACK( NEXTS+5 ) = 4 NcX l 3 * N t X T S + 5 UP= l uP

C* ■ s e r v i c e a n o t h e r FOR? I F j o r CLUI F ( O P . GE. 7 2 1 ) GO TO 2 7 0 0 I F ( OP , GE. 7 1 1 ) GO TO 2 750 S T A C K ( N E X T S - 4 ) = I 0 0 + 1 GP*2GOTO 3000

2 7 0 0 S T A C K ( N E X T S - 4 ) = S T 0 R E ( R E C E I V ( F O R p F 0 R L T , S T 0 R E ( Q P + 2 ) , 6 ) ) t l 0 P = 4GOTO 3 000

2 7 5 0 I F P T = R E C E I V ( I F p I F L T s> S T11R E ( Q P 4- 2 ) p 1 ) - 1 STACK ( N E X T S - 4 ) = STJRE( I FPT 4-5 ) 4-1I F ( S T O R E ( I F PT + 7 ) . G T . S T O R E ( I F PT + 5 n S T A C K ( N E X T S - 4 ) * S T 0 R E * I F P T + 7 ) + l0P= 3GOTO 3000

2 8 0 0 CONTI NUEC* S e r v i c e g e n e r a l s t a t e m e n t i n FOR s t a t e m e n t

NERR23 0CALL Qr e COMd OP p NE RRl p ME RR Z )

C* I f r e t u r n e d NERR2 i s n o t z e ro ? s o m e t h i n g w r o n g i n t h i s s t a t e m e n t I F ( N E R R 2 . EQ. 0 ) GO TO 2 9 0 0 NERR1- NERR1+NERR2 TYPE 2 8 6 0 p N EP R 2 p I Q

2 8 6 0 F u R h A T ( » > , 13,* ERROR FOUND I N QTABLE® p I 4 p K2 9 0 0 CONTI NUE 2 95 0 10= 104 IDS

I F ( N E R R 1 . ME. 0 ) GO TO 2 999 Q L L = S T 0 R E ( F P 4 5 )

Page 115: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

GOTO 2 4 0 02 9 9 6 S rtJkE ( RE.CE TV (SO f »S DT L T p STORE ( F P 1 ) p 8 ) ) =0 2 9 9 9 0 P * 1 30CO RETURN

END

c*C* C L U i i - i Take c a r e o f " I F " s t a t e m e n t C*

SUBROUTINE CLU. IF( I Q»QP>OP)I M P L I C I T INTEGE R ( A - Z )COMMON'/ ST AC L U/ STACK ( 1 0 0 )» ST ACKL» NEXTSC0MM0N/ CLUC0M/ SYSPT#NERR1I NCLUDE 0 X 8 o I N C gI NCLUOc I AUX = INC«I NCLUDE « ALWAYS. I N C

I F ( UP «EQ. 0 ) GO TO 3 1 0 0 O L L = S T A C K ( N E XT S- 1 )OHH = S T ACK ( N EX TS - 2 )NEXTS=NEXTS- 3I FCt i LL oGTo QHH) GOTO 3 9 9 9GOTO 3 500

3 1 0 0 I F P T « R E C E [ V ( I F , I F L T # S T 0 R E ( 9 P + 2 ) * 1 > - 1■ I D - S T U R E ( R E C F I V ( S O T » S D T L T p S T O R E ( I F P T * 1 ) # 8 ) )V A R = E X T H N K ( S T 0 R E ( I F P T + 3 ) )

C* C h e c k l O ' i i c r e l a t i o nG u T C ( 3 2 0 0 , 3 2 1 0 , 3 2 2 0 , 3 2 3 0 , 3 2 4 0 , 3 2 5 0 ) ( STORE.( I F P T < - 2 ) - 7 7 0 )

3 2 0 0 I F t ID oEOo VAR) GO TO 3 35 0GOTO 3 3 0 0

3 3503 2 1 0 I F ( 1 0 GOTO

«LT. VAR) 3 3 0 0

GO TO

3 2 2 0 1 F ( 1 0 GOTO

» G f o VAR) 3 3 OK

GO TO 3350

3 2 3 0 I F ( I D GOTO

oNE, VAR) 3 3 00

GO TO 3 350

3 2 4 0 1F( I D GuTL

. LE. VAR) 3300

GO TO 3350

3 2 50 I F ( 1 D . GE. VAR) GO T 0 3 35 0C* L o g i c r e l a t i o n i s n e g a t i v e3 3 0 0 I F ( E/TCI Re ( OP*-1 ) « E 9 o 7 1 2 ) GO TO 3999

0 L L = S I" 0 R E ( I F P T F 6 )QHH=STURE( I F P T + 7 )

■ GOTO 3 400 C* L o g i c r e l a t i o n i s o o s i t i v e3 3 5 0 Q L L = S 1 0 R E ( I F P T + 4 )

QHH=STORE( I F P T + 5 )

Page 116: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

3 4 0 0 I F ( QHH . GT . 1 0 ) 1Q = 0HHI F ( S TuRE { I FPT + 7) . G T . I Q ) I Q - S T O R E U F P T + 7 )

3 5 0 0 00 3999 IQQ = QLL c QHH£QP = k c CFIV( QTABLEp QT&6LT» I Q Q . i » l ) - l O P » S r u R £ ( l Q P + l )Ch e c k i f a n o t h e r " FOR' % " I F " p o r " CLU ii i s metI F (UP « EQ o 711 . OR. OP . EQ. 7 1 2 ) GO TO 3 5 5 0I F ( OP oEQ o 721 . OR, OP . EQ. 7 2 2 ) GO TO 3 5 5 0I F (UP oNE . 601 . AND. OP . NE. 6 0 2 ) GO TO 3 7 5 0I F ( STACKL o G E o (NEXTS + 3 ) ) GO TO 3 6 0 0CALL CERR0 R( 4 j . NERRl )GOTO 3 999

C* S t o r e i m p o r t a n t p o i n t e r i n STACK3 6 0 0 STACKt NEXTS- M > = QHH

S T A C K( N E XT S + 3 ) = 3 NfcX I S»NcXTS<-3Q P = 1 Q P

C* S e r v i c e a n o t h e r FORp I F or CLU c a HI F ( O P oGEo 7 2 1 ) GO TO 3 6 5 0I F ( O P oGE, 7 1 1 ) GO TO 3 700S T A C K ( N E X T S - 1 ) = I Q Q + 1 0P = 2GOTO 4 0 0 0

3 6 5 0 S T A C K ( N E X T S - 1 ) = S T O R E ( R E C E I V ( F O R p FORLTp STORE ( 0 P > 2 ) p 6 ) M l 0P=4GOTO 4 0 0 0

3 7 0 0 I F P T = R E C E I V ( I F p I F L T p S T O R E ( 0 P + 2 ) p l ) - l S TACK( N t ^ T S - 1 ) * ST ORE( I F P T + 5 M - lI F ( S T u R E ( I F P T + 7 ) . G T . S T O R E ( I F P T + 5 ) ) STACK( N E X T S - 1 ) = STORE( I F F T + 7 ) + 1 OP = 3GOTO 4 000

3 7 5 0 CONTINUEC* S e r v i c e g e n e r a I s t a t e m e n t i n " I F " s t a t e m e n t

N E R R 2 = 0CALL QTBCOM( I Q P p N E R R I p NERR2)

C* I f r e t u r n e d NERR2 i s n o t z e r o p s o m e t h i n g / urong i n t h i s s t a t e m e n t I F ( N E R R 2 oEQ» 0 ) GO TO 3 999 NERR1=NERR1+NERR2 TYPE 3850 pNERR2pI Q

3 8 5 0 FORMAT ( 11 * * * 6 p I 3» 1 ERROR FOUND I N QTABLE » p I 4 p / )3999 CONTI NUE

0P = 14 0 0 0 RETURN

END

c*C * GE 8 DX 1 i G e n e r a t e b ox f o r CLUNI T dec I a r a t i o n - p a r t e r r o r C*

Page 117: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

SUBROUTINE GE80X1{ ?T9T 1 p AR GF j> PTDT p S DT PT.p A1 j> A2 ) I M P L I C I T I N T E G E R ( A - Z )CGMMOn / C L U / CL UT B ( B O p I I ) pC L U L pCLUP COMHON/ CLUCOM/ SYSPTpNERRI - I NCLUDE • X B o I N C I NCLUDE «A U X o I N C ”I NCLUDE " ALWAYS- I NC 1 I NCLUDE " COMP. I NC"COMMON/GAFUN/GNFXT I NCLUDE " T E M P O . I N C '

I F t C L u I B t C L U P p ? ) . E 3 » 0 ) GO TO 20 G* D e l e t e a l l u s e l e s s e l e m e n t s .

DO 10 l = C L U r B ( C L U P p 7 ) p ( G N E X T - 1 )CALL O E L GA T I I )

10 CONTI NUEGNEXT»CLUTB( CLUP»7)

20 CONTINUE C* S e t up box n u m b e r

CL UT BI CL UP p 4 ) = GNFXTCALL SET GAT( CLUT3 ( CLUPp 4 ) p C L U N I T )

C* C o n n e c t i n p u t 1 i n a s ARG F l « .S TOR E ( AR GF +4 )DU 40 I * l p STORE (A'RGF + 2 )hARG = RECEIV(ARG.p ARGLTp A RGF I p 1 )FARG = RECETV( TO TSp TOTS L T p S T OR E ( F AR G ) p 1 ) - 1 I F ( ST0RE( FARG>4) . L T . 0 )G0 TO 30 CALL ARGENST ( Op FARGp STORE (FAR G4-2 )? I p I pD DO 30 J = 1 p STORE( FARG + 2 ) * S T 0 R F ( F A R G * 3 )CALL A D D I H ( C L U T 8 ( C LUP p 4 ) p ARGL I S ( 1 p J ) » 1 )

30 CONTI NUEARGF1= ARGF1-H

40 CONTINUE C* C o n n e c t o u t p u t l i n e s

C LU T B ( C LUP p 8 ) = GNF X T STORE( S0TPT+8 ) =GNEXT00 DO I = l p S T O R E ( S 0 r P T + 4 ) * S r n R E ( S D T P T + 5 )GN = 0CALL S E TGAT(GMp CLUO)CALL A D 0 I N ( G N » C L U T 6 ( C L U P p4 ) p 1)

. 50 CONTINUEP T » F I N T E M ( 0 )GTORE( P T OT + 4 ) * P T P T E M{ P T ) » 1CALL A R G E N T ( 3 # P T O T 1 p S T O R E ( R T O T 1 + 2 ) p 1 p 1 p 1 )Du 55 I = 1 p STORE ( P T 0 T l + 2 ) * S T 0 R E ( P T Q T l 4 - 3 ) T E M P ( P T p I ) = A P G L T S ( I p I )

' 55 CONTINUEC L u T B ( C L U P p 7 ) = G M E X T - l

108

Page 118: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I F t f i E R R l o EQ, 0 ) TY?>E 8 0 » A 1 » A 2 I H N t R R l ,NE » 0 ) TYPE 6 0 , A 1 , A 2

60 FORMAT(« * * * * * DECLARATI ON- PART ERROR, CL UNI T " » p 2 A 5 ,I ,w WI LL BE TREATED AS A BLACK BOX! 1 )

80 FORMAT( 0 * * * * * CLUNI T » * p Z 1 5 p '” WI LL BE TREATED AS A «»1 ' 8L ACK BOX ! « )RETURNENDC********** ************************************************c*

C v GEBuXZ s G e n e r a t e bo x f o r CL UNI T bod y - p ar t e r r o r C*C**********************************************************************

SUBROUTINE G E B 0 X 2 ( C L U N , A l , A 2 )I M P L I C I T I N T E G E R ( A - Z )c o m m o n / c l u / c l u t b i s o , 1 1 I p C l u l p C l u pCOMMONZCLUCOM/SYSPTp NERRI I NCLUDE ' C O M P L N . I N C 'I NCLUDE " C O M P . I N C 'DATA C L U L T p C L U L / 1 0 0 , 0 /

C* S e t b ox #C L U T B I C L U P , A ) * C L U T 3 ( C L U P , 7 )0 L D I N = I u i L I S T ( l L I N K ( C L U T B C C L U P , 7 ) ) p 1 >CALL D E L G A T ( C L U T B I C L U P , 7 ) )CALL i E T G A T ( C L U T B I C L U P , A T p CLUNTT)CALL ADDI N ' ( CL UT8 ( CL UP p A T p Q L D I N p I )

C* C o n n e c t i n p u t l i n e sDO 10 I * C L U T B ( C L U P , 8 ) , C L U T 8 ( C L U P p 9 ) - 1 I F ( 0 L I N K ( I ) oEOo 0 ) GO TO 10 CALL A D D I N f I p CL UT B( CL UP p A ) p 1 )

10 CONTI NUE C* C o n n e c t o u t p u t l i n e s

DO 20 I * ( C L U T B ( C L U P p 7 ) H ) p C L UT B( CL UP p 8 ) - 1 CALL A D D I N ( C L U T B ( C L U P p A ) p I 0 L I S T ( I L I N K ( I ) p 1 ) p 1)CALL D E L G A T ( I )

20 CONTI NUEC* E r r o r f o u n d , g a t e s u s e d i n c u r r e n t CLUNI T w i l t be r e l e a s e d

DO 30 I “ CLUT8( CLUPp 9 ) , GNEXT CALL D E L G A T ( I )

30 CONTI NUEGNEXT = C L U T B( CL UP, 9 )C L U r S ( C L U P , 7 ) = GNEXT- 1 I F ( CLU T8 ( CLUP, 6 ) ' » EQ« 0 ) GO TO 50

C* R e l e a s e a l l i n t e r n a l CLUNI T f r o m GLUTS DO 40 K = ( C L U P + 1 ) , C L U N DO 40 L = l , l l C L U I B ( K p L ) = 0

40 CONTI NUEC L U T B t C L U P , 6 1 = 0

Page 119: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CLUN^CLUP 50 CON'i 1NUE

TYPfc 6 0 , A 1 , A 260 FORMAT ( /p * * < ' * * * 8 0 D Y - P A R T FRRORp 'CURRENT C l U N I T " » , 2 A 5 *

1 WI LL 9 E TREATED AS A BLACK B O X ! ' )

RETURNEND

c*C* CLUPRF: T a k e c a r e o f CLU c a l l e d by a n o t h e r CLU ANDC* P R I M I T I V E FUNCTI ON*C*

SUBROUTINE CLUPRF CQP»IQ»QH» CL UL T p CLUNp F I N I S H )I M P L I C I T I N T E G E R ! A - Z )COMMON/ST ACLU/ ST ACK( 1 0 0 ) p ST ACKL a NEXTS COMMON/CLU/ C L U T B ( 8 0 p 1 1 ) p C L U L p CLUP COMMON/CLUCOM/SYSPTvNERR1 I NCLUDE ' A L WA Y S , I N C *INCLUDE ' AUXo XNC'I NCLUDE ' X B oI M C '

F I N I S H =1T0T1 = RECE I V (TOTSv rOTS' LTv ST OR E ( QP * 2 ) v A )T0T2 = RECE I V ( TOTSvTOr SLTvSTORE (QP-6-3) vO) T 0 T 3 = R E C E I V ( T U T S v T 0 T S L T v S T 0 R E ( Q P * A ) v O )P S R T = R E C E I V ( S R T v S R T L T v S T O R E ( T O T l ) v l )P j D T = R E CE I V ( sSOT v SDTL T v 3 TORE ( P5RT) v 2 )I F ( S T 0 R E ( P S D T ) , E Q o 6 8 3 . OR. S T U R E ( P S D T ) . E Q . 6 3 A ) GO TO 5 000 CALL P R 1 M F N ( S T O R E ! P S D T - 1 )» T 0 T 2 v T 0 T 3 v N E R R l )GOTO 6 0 0 0

5 0 0 0 CONTI NUE N E R R 2 = 0CALL QTBC0M( QG, NERRl v NERR2)

■NERR1»NERR1>NERR2 I F ( N E R R 1 »NE. 0 ) GO TO 6 0 0 0 I F t C L U N . L T . CLULT ) GO TO 5 3 0 0 CALL CERROR( 5vHERR 1)GOTO 6 000

5 3 0 0 I F ( S T A C K L . G E . ( N E X T S + 3 ) ) GO TO 5 4 0 0 CALL C E R R O R ( A v N E R P l )GOTO 6 0 0 0

C S t o r e i m p o r t a n t o o i n t e r 5 4 0 0 CLUN*CLUN+1

C LUT B ( C LUNp 5 ) - C LUPC L U i 8 ( C L U P v 6 ) = C L U T 8 ( C L U P » 6 H l . - .CLUP=CLUH

Page 120: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

S T A C K ( N E X T S + 1 ) =10 STACKt NEXTS + 2 ) =0H S I A X K ( N E X T S + 3 ) » 2 NEXTS- NEXTS+3 F IN 1S H = 0

6 0 0 0 .CONTINUE RETURN END

[****************************************************$*****************C*C* PR1HFNS TAKE CARE OF P R I M I T I V E FUNCTI ON C*

SUBROUTINE PRI MFNI NAMEP» FARGp TOUT»NERR 1)I M P L I C I T I N T E G E R ! A - Z )

CALL P I NDSY( NAMEPp A l » A2 >I F ( A 1 . NEo * ENCOD * . OR• A 2 , N E . » E CALL ENCODE ( FARG, TOUTp NERRI ) GOTO 9 99

0 ? GO TO 20

20 I F ( A 1 . N E . * A N 0 S E ' . OR. A 2 . N F . 0 L CALL ANDSEL( FARGpTOUTpNERRI ) GOTO 9 9 9

0 ) GO TO 30

30 I F ( A I oIn E. "ORSEL » . OR. A 2 . N E = 1 CALL ORSEL ( FARGp TOUTp NERRI ) GOTO 9 99

1 ) GO TO 40

40 I F ( A l o N E . " T E R M * . OR. A 2 . N E . 0 CALL PPTERM( FARGp TOUTp NERR 1) GOTO 9 99

» ) GO TO 50

50 I F ( A 1 . M E . “ PASS « . OR. A Z . N E . 0 CALL PFPASS( FARGp TOUTpNERRI ) GOTO 999

0 ) GO TO 60

60 I F U I . N E . ' W I R E » . UR. A 2 . N E . e C ) GO TO 900CALL PFWI RE(FARGp TOUTp NERRI )GO I 0 9 v 9

9 00 CONTI NUETYPE 9 0 1 p A 1 » A2

901 FORMAT ( 0 ’«« p 2A5.p 1 '• IS NOT A DECLARED CLUNI T OR P R I M I T I V E »• 1 ' F U N C T I ON ' )NERR1=NERR1+1

- . 999 CONTINUE RETURN END

C*C* ENCODES P R I M I T I V E FUNCTION ENCODE C*

SUBROUTI NE ENCODE( FARGpTOUTpNERRI )

111

Page 121: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I M P L I C I T I N T E G E R t A - Z )I N C L U D E ’A L W A Y S . I N C «I N C L U D E ’A U X » I N C ’I N C L U D E '• XB. INC ’I N C L U D E • T E M P O . I N CIF ( S T O R E ( FARG-f-2 ) „ EQ. 2) GO TO 20 TYPE 1 0 , S T O R E ( F A R G + 2 )10 F O R M A T ! ’ E R R O R ; " E N C O D E " M U S T H A V E T W O A R G U M E N T S ! ’ ,/,1 ’ U OF G I V E N = ’, 13)I F ( S T 0 R E ( F A R G > 2 ) . LT. 2) GO TO 1 3 0 T Y P E 1515 F O R M A T ( 1 0 X , ’F I R S T T W O ARE U S E D . ’ )20 F A R G 1 = R E C E I V ( ARG, A R G L T , S T O R E (FAR G + ̂t ), 1) •F A R G 2 - R E C El V (A R G , A R G L T , S T O R E ( F A R G + 4 ) + l , l )F A R G i = R E C E I V ( T O T S , T O T SL T , S T O R E ( F A R G l ) , l ) F A R G 2 « R E C E I V ( T 0 T S , T 0 T S L T , S T n P E ( F A P G 2 ) , l »I F ( S T O R E ! F A R G 1 ) oE Q, ~ l .A NDo S T O R E «F A R G 2 ) o E Q I ) GO TO 4 0 TYPE 3030 F O R M A T ( « E R R O R : A R G U M E N T S OF " E N C O D E " M U S T BE N U M E R I C A L «,0 )GUT U 13040 .F A R G 1 « R E C E I V ( S R T , S R T L T , S T O R E ( F A R G 1 > 3 ) , 1 »F A R G 2 = R E C F I V ( S R T p S R T L T , S T O R E ( F A R G 2 + 3 ) , 1)F A k G l = R E C E I V ( S D T , S O r L T , S T O R E ( F A R G 1 ) , 2 ) F A R G 2 = R E C E I V ( S 0 T , S D T L T , S T 0 R E ( F A R G 2 ) ,2)I F (S T O R E ( F A R G l ) . N E , 253 .AND. S T O P E (F A R G 1 ) . N E o 0) GO TO 50 I F ! S T O R E ! F A R G 2 ) 0 E Q o 2 5 3 .OR. S T O R E (F A R G 2 E O o O ) GO TO 70 50 T Y P E 6 0 , S T O R E ( F A R G 1 ) , S T O R E ( F A P G 2 )60 F O R M A T (» E R R O R S A R G U M E N T S OF " E N C O D E " M U S T BE I NDE X V A R I A B L E S «,1 ’ OR F O R M A L P A R A M E T E R S . ’ , / , ’ T Y P E C O D E S OF G I V E N A R G U M E N T S ’,1 ’ A R E ’ , 14, » A N D ’ , 14)G u T u 130 70 FAR'Gl-STORE ( F A R G 1 + 6)F A R G 2 s S T Q R E ( F A R G 2 > 6 )• I F ! F A R G 1 .GT. 0) GO TO 90 T Y P E tiG,FARGl 80 F O R M A T ( ’ E R R O R S D I M E N S I O N OF " E N C O D E " = ’,14)G O T O 1 30 90 I F ! F A R G 2 .GE. 0) GO TO 110 T Y P E I C O , F A R G 2 100 F O R M A T ( ’ ERRO RS N U M B E R OF " E N C O D E " = ’, 1 4)G O T O 1 30 11G S T O R E Cl'OUT+l )*-5S T 0 R E ( T 0 U T + 2 ) = F A R G 1 S T O R E ! T OU T + 3) = 1 Sr0RL:( T 0 U T * 4 ) = F I N T E M ( 0 )T U U 1 - S T O R E ( T O U T + 4 )P T E M (T O U T )* 1 DO 120 1 = 1 , F A R G 1 A R G 2 = F A R G 2 / 2

Page 122: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

E=FARG2- ARG?* 2I F ( I o EG. 0 ) TEMP ( TOUT, ( F A R G l - m ) ) » - 2 I F ( E . 2 0 . 1) TE HP ( TOUT p ( F ARGl - I - 6 - 1 ) ) = - 1 FARG2=ARG2

1 20 CONTI NUE . GOTO 140

1 30 N2RR1=NERR1+1 140 CON I' INUE

RETURN END

C* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * & * * * * * * * * * * * * $ * * * * * * * C*C* PFFASS*. P R I M I T I V E FUNCTION PASS C*(2 **** * ** ****** *********

SUBRUUI I NE PFPACS( F ARG, TOUT, NERR1 )I M P L I C I T I N T E G E R ( A - Z )I NCLUDE ' A L W A Y S . I N C 'INCLUDE « A U X . I N C ”I NCLUDE ’ X 3 . I N C 'I NCLUDE ' C O M P . I N C '

S T U R E ( T 0 U T * 1 ) » - 2 STORE( I OUT* 2 ) = 1 S r u R E ( T 0 U T + 3 ) * lI F ( STOREt FARG+2) . EQ. 2 ) GO TO 20 TYPE 1 0 , STORE! FARG+2)

10 FORMA I ( « ERROR'* " P F P A S S " MUST HAVE TWO ARGUMENTS S 0 , Z,1 0 H OF GI VEN = 6 , 13 )I F ( STORE! FARG+2) . L T . 2 ) GO TO 80 TYPE 15

15 FORMAT ( 1 0 X , ’ F I RST. TWO ARE U S E D . ’ )20 F A R G 1 = R E C E I V ! A R C , A R G L T , S T O R E ( F A R G + 4 ) , ! )

FARG2 = RECE T V ! A R G, A R G L T , S T O R E ( FARG*4 ) * 1 , 1)' F ARG1 = PEC E I V ( TOTS, T O T S L T , S T O R E ( FARG1) , 1 )F A R G 2 = R E C E I V t T O T S , T O T S L T p S T n R F ! F A R G 2 ) , 1)NERR2=0I F ( i T O R E ( FARG 1) . NE. - 1 ) GO TO 30 PSRT1- RECEI V (SRTpSRTL Tp STORE ( FARGl - f - 3 ) , 0 )CALL N S R T O T ( P S R T 1 , ( F ARG1 - 1 ) , N E R R 2 )

3 0 I F ! S T O R E ! F A R G 2 ) . N E . - 1 ) GO TO 40PSRT2= RECEI V( SRr , . 5 R TL T , STORE (FAR G 2 * 3 ) , 0 )CALL' NSRTOT ( PS RT2, ( FAR G2 - 1 ) , NERR 2 )

4 0 I F ( NERR2 . N E . 0 ) GO TO 80I F( STORL: ( F A R G l * l ) , E Q . l . AND. STORE ( FARG1*2 ) .E Q. I ) GO TO 60 TYPE 5 0 , S T O R E ! F A R G 1 + 1 ) , S T O R E ( F A R G 1 + 2 )

5 0 F O R M A T ( ' D I M E N S I O N OF " P A S S ” A R G U M E N T : C O L U M N ” ’,1 3 , 1 R0W=’,T3p 1 / , » F I R S T B I T I S A S S U M E D . ’ )S T f J R c ( F A R G l > l ) = l ST ORE( FARG1+ 2 ) = 1

Page 123: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

60 iF(STOREtFARG2+1)oEQo1 .AND. STORE(FARG2*2)=EO o l ) GO TO 70 TYPE 5 0, STORE ( F ARG ?»-1) » S TORE ( F ARG 2> ? )STORE(FARG2+1)*!STORE(FARG2+2)=l 70 GN=0CALL Stl'GAT(GHpPASS)ST0RE(T0UT+4)=GNCALL A R G E N T (1p (FARG1-1),Lp 1,1,1»CALL ADOIHfGNpARGLIS(1 p l)p1)CALL ARG E N T ( I p (FARG2-1)pi,IpIpl)CALL ADDIN(GNp ARGLIS(I p 1)p1)GOTO 9 0 RO NERR1=NERR1+1 9 0 CONTINUE RETURN ENDc*C* PFWIRE s PRIMITIVE FUNCTION WIRE C*

SUBROUTINE PFWIRE(FARG,TOUT,NERR1)IMPLICIT INTEGER*A-Z)INCLUDE ‘A L W A Y S . I N C INCLUDE 8 AUX, INC g INCLUDE • XB .INC *INCLUDE 8 COMP oINC 8STORE ( TOUT<-1) *-2 STORE(T0UT+2)=1 . Sr0RE(T0UT>3)=lIF(STORE(FARG + 2) .EQ. 2) GO TO 20'TYPE 1OpS TOR E (FARG +2)10 F O R M A T(8 ERROR: "PFWIRE" MUST HAVE TWO ARGUMENTS 8 8 p /p 1 8 # OF GIVEN = 8p I3)IF(STORE*FARG+2) „L T . 2) GO TO BO T Y P E 1 515 F O R M A T ( I O X p 8 FIRST TWO ARE U S E D * 8)20 FARG1=RECEIV(ARGpARGLTpSTORE(FARG+4)pl)FARG2=RECEIV* ARGp ARGLT p STORE ( FARG4-4 ) 4-lpl)FARG1 = RECEIV(T0TS p TOTSLT p S T O R E (FARG1)p1)F A R G 2 35 RECE I V ( TOTS p TOTS L T p S TORE ( F A R G 2 ) p 1 J N E R R 2 * 0I F (STORE*FARG1) .ME. -1) GO TO 30 PSRI1*RECEIV(SRT p SRTLT p STORE(FARGl+3)pO)CALL NSRTOT(PSRTlp (FARG1-1 ) pNERR2 )30 IF(STORE*FARG2) .ME. -1) GO TO 40PSRT2 = RtCEIV*SRTpSRTLTp STORE *FARG2 + 3)pO)CALL N S R T O T (PSRT2 p (FARG2 - 1 )p N E R R 2 )40 IF(NERR2 . N E . 0) GO TO 80

Page 124: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

l h ( S T U K t ( F A R G l < - l ) . E Q o l . AND. STQREC FARG1 + 2 ) o E Q « l ) GO TO 60 TYRE bCpSTORE ( FARGH- 1 )» STORE ( F A R G 1 * 2 )

50 FORMAT(« DI MENSI ON OF " W I R E " ARGUMENTS COLUMN* » , 1 3 , « ROW=” , 1 3 ,1 / , 1 FI RST B I T IS A S S UMED . ' )STORE( F A R G 1 E l ) » 1 STORE( F ARG1+ 2 ) * 1

60 I F ( S T d R E ( F A R G 2 + l - ) . E Q . l . AND. STORE ( FARG2E2 ) . E Q. 1) GO TO 70TYPE 5 0 , S T O R E ( F A R G 2 + 1 ) , S T O R E ( F A R G 2 + 2 )STORE( FARG2+1 ) =1 STORE( F ARG2+ 2 ) = 1

70 GN=0CALL SET GAT( GN, WI RE)S T ORE( T UUT + 4 ) =GNCALL ARGENT( 1 , ( F A R G l - l ) , 1 , 1 , 1 , 1 )CALL ADDI Nt G N , A R G L I S ( 1 , 1 ) , 1 )CALL ARGENT( 1 , ( F A R G 2 - 1 ) , l , l p l , l )CALL A U D I N C G N , A R G L I S ( t , l ) , l )GOTO 90

80 NERR1- NERR1+1 90 C O N l l N U t

RETURN END

C * * * * * * * * * $ * * * * * * * * * * * * * # * * * * * * * * * * * * * * * & # * * * * % * * * * * * $ * & * * * * * * * & * * * * * *c*C* ORSEL? P R I M I T I V E FUNCTI ON ORSEL C*

SUBROUTINE ORSEL ( FARG, TOUT, NERR1)I M P L I C I T I N T E G E R ( A - Z )I NCLUDE ' A L W A Y S . I N C

■ I NCLUDE «A U X . 1 N C INCLUDE ' X8 . 1MC 'I NCLUDE ' T E M P O . I N C I NCLUDE ' C O M P . I N C .

STORE ( T O U T E D — .2 STORE( IOUT + 2 ) » 1 STORE( r O U T + 3 ) = lI F ( S T 0 R E ( F A R G + 2 ) . EQ. 2 ) GO TO 20 I'YPE 1 0 , ST0 RE ( F ARG* 2 ) .

10 FORMAT(• ERRORS " ORSEL " MUST HAVE TWO A R G U M E N T S ! * , / ,1 « H OF GI VEN = « , I 3)I F ( STORE( FARG+2) . L T . 2 ) GO TO 1 30 TYPE 15 '

15 FORMAT ( 1 0 X , ' F I R S T TWO ARE USED. ' . )20 F A R G 1 = R E C F I V ( A R G , A R G L T , S T O R E ( F A R G + 4 ) , 1 )

F A R G2 = R E C E I V ( A R G, A R GL T , S T OR E ( F A R G+ 4 ) + ! , ! )FARGl - RECE I V ( TOTS , TOTSL T, .STORE ( FARG1) , 1.) f A R G 2 - R E C E I V ( T O T S , T O T S L T ? S T O R E ( F A R G 2 ) , 1 )I F ( S T O R E ! F A R G 2 ) . N F . - 1 ) GO TO 2 5

Page 125: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

NERR2 - 0 'P S k T 2 * R £ C E I V ( S R T ^ S R T L T » S T Q R E ( F A R G 2 + 3 ) » 0 )CALL N S R T OT ( P S R T 2 » ( F A R G 2 - 1 ) » NERR2 )I F ( N E R R 2 , ME . 0 ) GO TO 130

?!> I F ( i T 0 R E ( F A R G 2 + 2 ) . F Q . l ) GO TO 40TYPE 3 0 , S T O R E ( F A R G 2 + 1 ) , S T O R E ( F A R G 2 + 2 )

30 FORMAT( 6 DI MENSI ON OF " O R S E L " ARGUMENTS COLUMN* 8, 1 3 , 0 ROM* 0 p 13 , 1 / , ’ ONE ROW IS A S S U M E D . " )S T U R E ( F A R G 2 + 2 ) =1

40 I F t STORE( F ARG1) , t Q . - 1 ) GO TO 60TYPE 50

50 FORMAT( 0 ERROR s FI RST ARGUMENT OF " ORSEL " MUST BE A " ,1 5 NUMERI CAL 5 )GOTO 1 30

60 FARG1 = RECEI V ( S RT , SRTLT, STORE ( F A R G H - 3 ) , ! )FARG1 = R E C E I V ( S D T , S 0 T L T , S T O R E ( F A R G 1 ) , 2 )I F ( S T 0 R £ ( F A R G 1 ) . £ 0 . 2 5 3 . OR. STORE( FARG1 ) . EQ. 0 ) GO TO 80 TYPE 7 0 , STORE( FARG1)

70 FORMAT ( 5 E R R O R S FI RST ARGUMENT Of MORSELto MUST BE AN5,1 5 INDEX VARI ABLE OR FORMAL PARAMETER. 5 / , 5 TYPE 5 ,1 5 CODE OF GI VEN ARGUMENT * 5 , 1 4 )GOTO 1 30

80 f ARGi =STORE( FARG14-6)1 F( FARG1 , G £ . 0 ) GO TO 100 TYPE 9 0 , FARG1

90 FORMAT ( 5 E R R O R S NUMERICAL ARGUMENT OF "OR.SEL" = 5 , 1 4 )GOTO 130

100 I F { FARG1 .EQo 0) GO TO 120 GN = 0CALL S.ETGAT ( GN, CLOR)STORE( I 0 U T * 4 ) = G NCALL ARGENT( 1 , ( F A R G 2 - 1 1, S T O R E ( F A R G 2 * l ) , 1 , 1 , 1 ) FARG2«STQRE( FARG2+1)DO 110 1 = 1 , F A R G2 A R G l = F A R G l / 2 E =FARG1- ARG1 * 2 FARG1*ARG1I F ( E o EQ. 0 ) GO TO 110CALL A D D I N ( G N , A R G L I S ( 1 » ( F A R G 2 - m ) ) , 1 )

110 CONTI NUE GOTO 140 120 ST0ftE(TaUT+l)*-5STORE( I 0UT + 4 ) = F I N T E M ( 0 )TOUT*S TORE{ TOUT + 4 )P T E M( TOUT) = 1 T E M P d GUT, 1 ) *GNO GOTO 140

130 NERk 1*NERR1 + 1 140 CONTI NUE

RETURN

Page 126: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

c*C* A N O i t L ! P R I M I T I V E FUNCTI ON ANOSEL C*C ************************** &*******************************’6= **********

SUBROUTINE ANDSELt FARG» TOUTp NF RR1 )I M P L I C I T I N T E G E R ( A - Z )I NCLUDE 1 ALWAYS, INC 11 INCLUDE ' A U X . I N C I NCLUDE « X.B, INC 1 I NCLUDE 1 TEMPO o I N C ’INCLUDE ' C O M P . I N C '

S TORE( TOUT * 1 ) * - 2 STOREt I QUT + 2 ) * lSTORE(TOUT + 3 ) = 1 - -I F (STORE!FARG+?) .EQ. 2 ) GO TO 20 TYPE IOpSTORE(FARG+2)10 F O R M A T (6 ERROR $ "ANDSEL" MUS T HAVE TWO ARGUMENTS 8”p /»1 * # OF G I VEN = 8» I 3 )I F ( STORE (FARC.+2) . LT . 2 ) GO TO 13 0 TYPE 15

1 5 . FORMAI ( 1 0 X * ' F I R S T TWO ARE U S E D . 8 )20 FARG1 = RECE.IV < ARG» ARGLT» STORE ( FARG* A) »1)F a RG2 - k ECEIV(ARG» ARGLT» STORE(FARG*4)*1 p1)

FARG1 = R E C E I V ( T 0 T S p TOT SLTs, STORE (FARG1 ) » 1 )FARG2*RECEIV(TOTS» TOTSLT»STORE(FARG2)p1)I F ( S T O R E ! F A R G 2 ) . H E . - I ) GO TO 25 NcRR2=0PSRT2-REC EIV !SRTp SRTLT» STORE !FARG2+3),0)CALL NSRT OT ( PSRT 2 p ( F A R G 2 - 1 ) p NFRR2 )I F ( N E R R 2 oNE. 0 ) GO TO 130

25 I F l S r u R E ( F A R G 2 * 2 ) . E 0 „ l ) GO TO 40TYPE 3 0 , S T O R E ( F A R G 2 + 1 ) , S T O R E ( F A R G 2 + 2 )

30 FORMAT ! 8 DI MENSI ON OF " ANOSEL " ARGUMENT: C O L U M N * ' p I 3 p 8 ROW^ ' d TBp 1 / » » ONE ROW I S ASSUMED. 8 )STORE ( FARG2.4-2 ) =1

40 I F ( STORE! FARG1 ) . EQ, - 1 ) GO TO 60 TYPE 50

50 F o r m a t ( ' e r r o r ; f i r s t a r g u m e n t o f " a n o s e l " mu s t be a ' p1 ' NUMERICAL. ' )GOTO 13060 FARG1=RECEIV!SRT p SRTLTpSTORE(FARG1*3)»1)FAR.G1«RECEI V ! S D T * S D T L T p ST0 RE! FARG1 ) »2)I F ! STORE! F A R G D . E Q , 253 . OR. STORE ( F A R G D . E Q . O ) GO TO 80 TYPE 7 0 » S T 0 R E ( FARGl )

70 FORMAT( ' ERROR: F I RST ARGUMENT OF " ANOSEL" MUST BE A N ' ,1 ' I NDEX VARI ABL E OR FORMAL P A R A M E T E R . * , / , ' T Y P E 9 ,1 » CODE OF GIVEN ARGUMENT = ' , 14 »

Page 127: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

Gul 'Q 130 80 FARG1=ST0 RE( FARG1 +6 )

I F ( FARG1 0GEo 0 ) GO TO 100 TYPE 9 Qp FARG1

0 0 FORMAT(« ERROR s NUMERICAL ARGUMENT OF " A ND SE L " = ' , I 4 ) GOTO 130

100 I F ( FARG1 oEQo 0) GO TO 120 G N s GCALL S L T G A K G N , CLANO)STORE( TUUT+4) =GNCALL ARGENT( 1 , ( F A R G 2 - 1 ) , S T O P E ( F A R G 2 * 1 ) , 1 , 1 , I )F ARG2 = STOR E ( F ARG2>1)DO 110 I s l , F A R G 2 ARG1 = F ARG1 / 2 E=FARG1 - ARG1 * 2 FAR Gl = ARG 1I F ( E = EQ= 0 ) GO TO 110CALL AODI N( GN, A R G L I S d , ( F A R G 2 - I - H ) ) , 1 )

1 1 0 CONTI NUE GOTO 140

120 STORE( T O U T + l ) = - 5S T O R E ( T 0 U T + 4 ) = F I N T E M ( 0 )TOUT3 S T OR E ( T OUT + 4 )P TER( I OUT) = 1 T EM P ( I 0 UT , 1) = V C C GOTO 140

130 NERR1 = NERR14-1 140 CON I I NUE

RETURN END

C *C* RFTERM: P R I M I T I V E FUNCTION TERM C *

SUBROUTINE PFTERM( FARG, TOUT, NERR1 )I M P L I C I T I N T E G E R ( A - Z )I NCLUDE ' A L W A Y S . I N C 'I NCLUDE ' AUX o I.NC 'I NCLUDE ' X B. I N C 'INCLUDE ' TEMPO. INC 'INCLUDE ' COMP. I N C

STORE ( TQUT4- l ) 3 - b STORE ( 1 OUT4-2 ) = 1 STORE( T OU T + 3 ) * 1I F ( STORE ( F ARG 4-2 ) . E G , 2 ) GO TO 2 0 TYPE 1 0 , STORE (FARG4-2)

10 FORMAT( 0 ERROR: " RFTERM" MUST HAVE TWO A R G U M E N T S ! ' , / , 1 ' # OF GI VEN = » , 13)

Page 128: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

1520

2530

40

50

60

70

8 0

701.00

110

I F ( STUKE( FARG4- 2 ) , i r , 2 ) GO TO 130 TYPE 15FORMAT( l OXv " F I R S T TWO ARE US ED» 0 )FARGl = RECEI Vt ARG,«ARGUTp STORE ( FARG4-4) p 1$F ARG2 = RECE I V ( ARGp ARGLTp STORE ( F ARG <-4 ) *•! p I )FARG1*R EC E I V ( TOTS# TOTSLT»S TORE t F A R G D p l )F ARG2 » RE CE I V ( T OT S » TOTSLT# ST O R E ( F A R G 2 ) # 1)1 F ( a TORE( FARG2 ) . N E . - 1 ) GO TO 25 NERR2=CPSRT2 = RECEI V( SRT»SRTLT. p ST0RF ( F A R G 2 > 3 ) p O)CALL NS R T 0 T ( P S R T 2 p ( F A R G 2 - 1 ) p NERR2)T F ( NERR2 . N E . 0 ) GO TO 130I F ( S T O R E { F A R G 2 + 2 ) . E Q . 1 > GO TO 40TYPE 3 0 f S T O R E ( F A R G 2 + l ) p S T O R E ( F A R G 2 + 2 )F O R M A T (« DIMENSION 0 F "PETERM" ARGUMENTS COLUMN3 5 pI3p 0 ROW=0pI3p 1 /p 0 ONE ROW IS ASSUMED.« )STORE( F A R G 2 + 2 ) - lI F ( STORE( FARG1 ) . EG. - 1 ) GO TO 60 TYPE 50FORMAT( 8 ERRORS F I RST ARGUMENT OF " PFTERM" MUST 9E A°p 1 , NUMERI CAL ” )GOTO 130FARG1 = RECEI VCSRTp SR T L T p STORE (FARGH-3)p 1)FARG1=RECE1V( SDT p SDTLT . STORE( FARG1) p2)I F ( S T 0 R E( F A R G1 ) . E Q . 2 5 3 . O R . STORE( FARG1) 0 E Q . O ) G O T O 80 TYPE 7 0 , STORE( FARG1)FORMAT( 1 ERRORS F I RST ARGUMENT OF " PFTERM" MUST BE AN®,1 • I NDEX VARI ABLE OR FORMAL PARAMETER. »p / p® T Y P E * ,1 1 CODE OF GIVEN ARGUMENT = ” p 14)GOTO 130F A R G l * S T 0 R E ( F A R G l + 6 )I F ( FARG1 , GE » 0 ) GO TO 100 TYPE 9 0 , F ARG1FORMA I' ( 0 ERRORS NUMERICAL ARGUMENT OF " PFTERM" =» p T 4 )GOTO 130STORE( T u U T + 4 ) = F I N T E M ( 0 )S T O R K TOUT+ 2 ) =ST0RF( FARG2 + 1 )1 UU j s ST ORE( TOUT + 4 )P T L M 1 QUT) = 1CALL A R G E N T ( l , ( F A R G 2 - l ) p S T 0 R E ( F A R G 2 + l ) , 1 , 1 , 1 ) FARG2»ST0RE( FARG2+1 )DU 120 I - 1 pFARG2 NUM=FARG2- I +1 A R G l = F A R G l / 2 E = F A k G l - A R G l * 2 PARG1=ARGII F ( E . EG. 0 ) GO TO 11.0 TEMP( T OUT, NUM) 3 A R G L I S ( 1 , NUM)GOTO 120CALL F 1 N N 0 T ( A R G L I S ( I p N U M ) , G N )

119

Page 129: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

TEMP( TOUT, HUM) =GN 120 CONTINUE

GOTu 140 130 N E k R l = N E R R l + l 140 CONTI NUE

RETURN END

c*C* F I N N O T i 'C*C * * * =1:4: * * * 4 = * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 = * * * * * * * * * * $

SUBROUTINE f I N N O T ( FNUM, TNUM)I M P L I C I T I N T E G E R ( A - Z )I NCLUDE 8 C O M P . I N C ”INCLUDE ' C O M P L N o I N C

I F ( FNUM oGT. 0) GO TO 30 I FCFNUM oEQo VCC) GO TO 20 I E ( FUNM . FQ= GND) GO TO 10 TNUM=FNUM GOTO 6 0

10 TNUM=VCC GOTO 60

20 TNUM=GND GOTO- 60

30 CALL S EE GA T r F NUM, Gr , SYMPT R, AU, XPT R, GI N , NOUT )1 F ( NUUT . E Q . O ) GO TO 50

- C A L L SEEOUT (FNUM,FRMARR. ,NOUT )00 40 I = l , N n U TI F ( GAT TYP( FRMARR( I ) ) . N E . CLNAND) GO TO 40 TNUM- FRMARR( I )GOTO 60

40 CONTINUE 5 0 T N U M” 0

CALL SETGAT( TNUM, CL NAND)CALL A D D I N ( TNUM, FNUM, 1)

60 CONTINUE RETURN END

C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * I!c* * * * * * ,It!«t * :C! *c*C* RESTORE 8 R e s t o r e PHASE 1 o u t p u t f i l e .C * .c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

SUBRUUTINE RES TOR I M P L I C I T I N T E G E R ( A - Z )I NCLUDE 8 X B . I N C •I NCLUDE 1 AUX , I N C 1- I NCLUDc • ALWAYS . I N C

X

120

Page 130: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

INCLUDE ' P E R M . I N C 'DI MENSI ON D ( 1 5 ) » N ( 1 5 ) * 1 ( 1 5 )DOUBLE PRECI SI ON INNAME

C* S e t up TABLE l i m i t sDATA SDTLT p LRTLT * SRTLT » QT A BL T p SQRTLTp NE S T L T » TOTSLT 1 / 1 0 p 3 p Dp 4 p 6p 4p 4 /DATA E X L I L T p DUMPL f pOSTL T p ESV T L T pCONSLTp THUNLTp REFLT p FORLT 1 / 6 p 6p 4 p lip 30p 4 p 8 p 6 /DATA PARALTp ARGLT p SYST L T p RESELT p NAMTLTp PI NL T p I F L T p PULSLT1 /2 p Ip 1 3 p 1 0 p 1 8 p I p 7 p 1 /

C* N s t o r e t h e # o f c o l o n f o r e a c h t a b l e .DATA N / 1 3 p 1 0 p 8 p 9 p 6 p 4 p 4 p 2 p 1 p 6 p 7 p 4 p 1 p 3 p 1 /DATA I F IL / 22 /

I TYPE 1010 FORMAT( ' RESTORE F I L E NAME;« p S ) ,

ACCEPT -20* INNAME '20 FORMAT( A I D)

I F ( INMAME oEQ. • 1 1 GOTO 1u P £ M U N 1 T = 22p F I L E - INNAME >DU 2b 1 * 1 * 6 9 R c AD(IF1Lp24) J 24 F O R M A T ( 14)

2b CONTINUE

30 FORMAT( 14)R E A D ( l f l L * 3 0 ) VALENT DO 100 0 I: = 1 p 15 I F ( I o EQ. 1 ) GO TO 40 r ( i ) = i ( i - i ) ♦ D ( i - i ) * N ( i - i )

C * 0 s t o r e n o f r o w f o r e a c h t a b l e .40 R E A D ( 1 F I L p 3 0 ) 0 ( 1 )

i F ( D ( I ) . E Q . 0 ) GO TO 1 000 I H = T ( I )

8 0 Du 9 9 0 1 1 = 1 p 0 ( I )C* R e s t o r e STORE e n t r i e s .

READ( I FILp 9 5 0 ) (STOR E ( 111 <• I L ) p I L = Ip N ( I ) )9 5 0 FORMAT( 1 1 1 4 )

I I I * I 1 1 + N ( I )9 90 CONTI NUE 100 0 CONTINUE

C* S e t up r ow p o i n t e r f o r e a c h t a b l e .S Y S T A P = 0 ( 1 )SOTP = 0 ( 2 )REEF = 0 ( 3 )SR TP = 0 ( 4 )

Page 131: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

uQRI P = 0 ( 5 )QTABLP = 0( (>)TOTSP = 0 ( 7 )PARAMP* D( R)ARGP = 0 ( 9 ) huRP = 0 ( 1 0 )I F P = 0 ( 1 1 )T HUN KP = 0 ( 1 2 )P i H T A P = 0 ( 13 )LRTP = 0 ( 1 4 )P U L S E P = 0 ( 15 )S Y S f A B - K l )SOT = 1 ( 2 )REF = T ( 3 )SRI = T ( 4 )SORT * T ( 5 )Q T A B L E = r ( 6 )TOTS = T ( 7 )PAR AM = 1 ( 8 )ARG = T ( 9 )FOR = T ( 1 0 )I F = T ( 1 1 ) fHUNK = T ( 1 2 )P I N T A 8 » T ( 13)LRT = T ( 1 4 )PULSE = T ( 15 )

C * R e s t o r e I O n a me 0R EAO ( 1 F I L » 30 ) SYPlP T OU 1 50 0 J = l.» SYMPTREAD( 1 F I L » 1 1 0 0 ) ( S Y M T 8 ( K i . J ) p K = l » 2 )

1 1 0 0 FORMAT( 2A5)150 0 CONTINUE

C L O S E ( U N I T = 2 2 )K b 1 URN END

C*C* F I NDS Y : F i n d a t e n - c h a r a c t e r name f o r a s y m b o l o

SUBROUTINE F TNDSY( PNTR, NAME1 » NAME2>I M P L I C I T I NT EGER( A - Z )I NCLUDE ' P E R M . I N C *

1F( PNTRoLEoO oORo PNTR.GT' . SYMPT ) GO TO 10 NAHE1 = SYMTB( I p PNTR)NAME2 * S Y MT B ( 2 , P N T R )RETURN ■

10 CONTI NUENAME1 = 6 «NAME2 = » «

Page 132: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

RETURNEND ******** ****************

c*C * R EC EI V ; E x e c u t e t o q e t a STORE p o i n t e r 0C *C************************************* i************************* ****$**

FUNCTION RECE IV(TABLE»N»RI»CI)I M P L I C I T I N T E G E R ( A - Z )R EC E l V = TABLE * N* ( R I - 1 . ) * C l RETURNe n d***#*;(:;***** **************************** i*****!):************:***!;!**

C *C* EXTHNK s e x e c u t e THUNK t a b l e t o g e t an i n t e g e r v a l u e *C*Q * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

INTEGER FUNCTI ON EXTHNK ( PNTR)I M P L I C I T I NTEGER ( A - Z )I NCLUDE » ALWATS- I NC 1 I NCLUDE 1 X B e I N C 11 I NCLUDE ” AUX o INC 1

DATA R E S U L T # A D D , S U 6 » r t P Y # D I V » E X P » I N T » l O p NEGpPOS /1 2 1 1 , 2 2 1 , 2 2 2 , 2 3 1 , 2 3 2 , 2 4 1 , 2 5 2 , 2 5 3 , 2 5 4 , 2 5 5 /

1 = RE CEI V ( THUNK, THUNL T , PNTR, 1 ) - 1

Du 100 J = STORE( 1 + 2 ) , S T 0 R E ( 1 + 3 )K = REC El V ( T HUNK, T HUNL T , J , 1 ) - 1 PROD = STORE(K + 1 )ARG1 = STOR E ( R ECEI V ( THUNK, THUNL T , ST ORE( K + 2 ) , 4 ) )1F( PRGDeEOo I D ) S T Q R E ( K + 4 ) = S T 0 R E ( R E C E I V ( S D T , S D T L T » S T 0 R E ( K + 2 ) , 8 H I F( PRODoEQoNFG) ■ STORE( K + 4 ) = - A R G l I F ( PRUDoEOoP : 1S ) STORE(K + 4 ) =ARG1 I F ( P R u D c G E o I N T ) GO TO 100

ARG2 = S T O R E ! R E C E I V ( T H U N K , T H U N L T , S T 0 R E ( K + 3 ) , 4 ) )I F ( P R 0 D o E 0 o ADD) STORE(K + 4 ) = ARG2 + ARG1I F ( PROD , EQ o SUB) STORE(K + 4 ) = ARG2 - ARG1I F ( PROD . E Q. ) STORE(K + 4 ) = ARG2 * ARGlI F ( PROD o E Q o OI V ) STORE(K + 4 ) » ARG2 / ARGlI F ( PROD . E Q. EXP) STORE( K + 4 ) = ARG2 * * ARGl

100 CONTI NUEEXTHNK = STORE( RECE I V ( T H U N K , T H U N L T , S T O R E t 1 + 3 ) , 4 ) )RETURNEND+ + + *** + *+ +* + ******+*******4 ******************************

€4=C* CERROR i P r i n t e r r o r o r w a r n i n g m e s s a g e .

Page 133: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

c* ******* ********* ************************* ********* SUBk QUTI NE CFRRI1R ( I , NERR )6 0 1 0 ( 1 0 , 2 0 , 3 0 , 4 0 , 5 0 , 6 0 , 7 0 , 8 0 , 9 0 , 1 0 0 , 1 1 0 , 1 2 0 , 1 3 0 , 1 4 0 , 1 5 0 ,1 1 6 0 , 1 7 0 , 1 8 0 , 1 9 0 , 2 0 0 , 2 1 0 , 2 2 0 , 2 3 0 , 2 4 0 , 2 5 0 , 2 6 0 , 2 7 0 , 2 8 0 ) I

10 f Y R £ 1111 FORMAT( / , 5 W A R N I N G S NO PARAMETER I S R E Q U I R E D ) «)

GOTO 15 0020 TYPE 2121 FORMAT( / , » WARNINGS NUMBER OF PASSED PARAMETER MORE THAN" ,

1 » R E QUI REDJ ' )GOTO 15 00

3 0 TYPE 3131 FORMAT( / , 8 W A R N I N G S NUMBER OF PASSED ARGUMENT MORE THAN8 ,

1 » REQUI RED! ‘ )GUT 0 1500

4 0 TYPE 4141 FORMAT( / , 1 STACK OVERFLOW! TOO MANY FOR, I F OR C L U N I T " ,

1 » STATEMENTS L I NK TOGETHER* »)GOTO 15 00

50 TYPE 5151 FORMA! ( / , ' T A B L E - ' ' C L U T 3 ” OVERFLOWS" )

GuTL 150060 TYPE 6161 F O R M A T ! / , " ERROR! DECLARED COLON OR ROW DI MENSI ON I S ZERO" ,

1 1 OR N E G A T I V E ! « )GuTG 1000

70 TYPE 7171 FORMAT ( / , ' ERROR! NO REQUI RED PARAMETER I S P AS S E D ! " )

GOTO 1 0 0 08 0 TYPE 8181 F O R M A T * / , ' ERROR: NUMBER OF PASSED PARAMETER I S NOT ENOUGHS 0 )

GOTO 10 009 0 TYPE 9 191 F O R M A T * / , ' ERRORS DECLARED PARAMETER IS NOT AN " I D ' ' ! ' )

GOTO 1000100 TYPE 101101 F O R M A T * / , » E R R O R S NUMBER OF PASSED ARGUMENT I S NOT ENOUGHS")

GOTO 1000110 TYPE 111111 F O R M A T * / , « ERROR! DI MENSI ONS OF ARGUMENT 00 NOT MA T C H ! " )

GOTO 1000120 TYPE 121121 F O R M A T * / , ' ERROR! CLUNI T OUTPUT I S NOT D ECL ARED! " )

GOT Li 1 0001 3 0 TYPE 1 3 1131 F O R M A T * / , ' ERROR! DEFI NED CLUNI T ARGUMENT I S NOT AN C L U - I N P U T S " )

Page 134: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

GOTO 1000140 TYPE 141 ,141 F O R M A T (» ERRORS COLON RANGE ZERO OR NEGATIVE IN CLUNIT BODY",1 * STATEMENT 1 1)GOTO 1000150 TYPE 151151 F O R M A T C ERROR: COLON DIMENSION NEGATIVE OR LARGER"p 1 « I HAN DEC LARATION!« )GOTO 1000160 TYPE 161161 F O R M A T (" ERROR! ROW DIMENSION NEGATIVE OR LARGER"»1 ' THAN DEC LARATION!«>GOTO 1000170 TYPE 171171 F O R M A T (" ERROR: COL RANGES DO NOT MATCH!")GOTO 1000160 TYPE 161181 F O R M A T (« ERRORS CONDICTION RANGE ERROR 8” )GOTO 1000190 TYPE 191191 F O R M A T (" E R R O R S R O W RANGES DO NOT MATCH!")GOTO 10002 00 TYPE 201201 FORMAT!/," ERROR: DEFINED AND DECLARED CLUNIT OUTPUT DIMENSION", 1 "S DO NOT MAT CH!" )GOTO 1000210 TYPE 211211 FORMAT!/," ERRORS INFINITE "FOR"" STATEMENT".")GOTO 100022 0- TYPE 2212 2.1 FORMAT!/," ERROR s SOMETHING WRONG!")GOTO 1000230 TYPE 231231 F O R M A T (" ERRORS ROW RANGE ZERO OR NEGATIVE 8")GOTO 10002 4.0 TYPE 241 241 FORMAT!/,"1 "GOTO 1000 250 TYPE 251 2 51 FORMAT!/,"1 "GOTO 10 00260 TYPE 261261 F O R M A T ! / , "GOTU 10002 70 TYPE 2 71 271 FORMAT!/, "GOTO 1000

ERRORS B I D I R E C T I ON A L NON-CLOCK TRANSFER 5 = s I S NOT” p PERMI TTED IN C L U N I T ! " )

ERRORS CONDIC T I ON AL TRANSFER I S NOT PERMI TTED I N " p C L U N I T ! " )

ERROR! UNKNOWN OP CODE * " , $ )

ERROR: DEFI NED PARAMETER CAN NOT BE AN E X P R E S S I O N ! " ) 125

Page 135: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

?dO TYPE 281281 FORMAT()p « ERRORS MURE THAN ONE SI GNALS A6R ASSI GNED TO A * ,

1 1 CTERMS SYMBOL 8 0 )GuTO 1000

1 0 0 0 NERR«NERR+1 1 5 0 0 RETURN

END **********************************$*&*****c *C* CHECLU s Ch e c k i f c l u n i t has b e e n s e r v e d C*C* SERVE=1S CLU HAS BEEN SERVED. ERROR IN BODYC* SERVE- 2 : CLU HAS BEEN SERVED. NO ERRORC* S£ R VE = 3 s CLU ' HASN' T BEEN SERVED,C * ****4:**** ****** 4:**** ************************ ************

SUBROUTINE CHECLU( CCLUP »SERVEy OCLU»I M P L I C I T I N T E G E R i A - Z )COMMON/CLUZ CL.UTB ( 80p 11 ) pC L U L p CLUP

5ERVE=3I F ( CCL UP . L E. 1) GO TO 300

DO 100 I s I p ( C C L U P - 1 )1 F ( C L U T 8 ( C C L U P p 1) oNE. CLUTB ( I » l ) oORo 1 CL UTB( CCLUP p 3 ) oNEo CLUTB (X p 3 1 ) GO TO 100

C* CL UT B ( 1p 9)»0 CLU HAS BEEN SERVED, ERROR I N DECLARATI ON,I F ( C L U T 8 ( I p 9 ) . EO. 0 ) GO TO 100 I F l C L U T B d p 10) .NEo 0 ) GO TO r>0 S E R V E * !GOTO 300

50 iJ 01 0 =1SERVE* 2 GOTO 300

100 CONTI NUE 300 CONTI NUE

RETURN ENDC********************************************************************c*

C* , COPCLU 5 Copy CLU f r o m CLUTB r ow OCLU t o r o w NCLU,C *C ********************************************************************

SUBROUTINE CQPCLU( CCLUPpOPpCLUN)I M P L I C I T I N T E G E R ( A - Z )COMMON/CLU/ C L U T B ( 8 0 p 1 1 ) p C L U L pCLUP I NCLUDE ' C O M P L N . I N C 'I NCLUDE ' C O M P . I N C

N P - C C L U P

Page 136: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

GGAP«CLUT8<N.Pp 9 ) -C.LU f B ( QP » 9 )TGA P *NP- OPI F t C L U T B t O P p 10 ) , l T o CLUTB (GP p 9 ) ) GO TO 1 00

Copy i n t e r n a l e l e m e n t00 20 I * C L U T B ( 0 P p 9 ) p C L U T B ( GP p 10 )C A L L SfctGAT{ I p G T p S Y M P T R p A U X P T R p 0 1 N p G O U T ) G H a CI F ( G T oGTo 0 ) GO TO 10GNEXT«GNEXT+1GOTO 20CALL Gc TGAT(GHpGT)CONTI NUE

GN=CLUTB( NPp 9)DO 100 l = C L U T B ( n p p 9 ) p C L U T 3 ( O P p l O $CALL SEEGAT d p GT p SYHPF Rp AUXPTRpO I N p OOUT$ I F ( G T »LE, 0 ) GO TO 99 I F ( GIN oLEo 0 ) GO TO 50 Copy i n p u t e l e m e n t , ,CALL S E E I N d p F R M A R R p O I N )DO AO 0 = I p0 I NI F I F R M A R R ( J ) «LEo 0 ) GO TG 30 NcW*FRMARR( J l +GGAP CALL ADDI N( GN»NEWp 1)GOTO 40CALL A D D I N ( G M p F R M A R R ( J ) p l ) c u n i I h UE

c o n t i n u eG N s G H + 1 CONTI NUEr e c o n n e c t CL UNI T o u t p u tDO 190 I * C L U T B ( U P p 8 ) p C L U T 3 ( 0 P p9 ) - 1N N E W- 1 - C L U T B ( U P p 8) +CLUTBCMP» 8)CALL S E EG A T ( I p G T p S Y M P T R p A U X P T R p GI N p GOUT) I F ( G I N oLEo 0 ) GO TO 190 CALL S E E I N d p F R M A R R p G I N ) 'DU 180 J = l p GI NI F ( F P M A R R ( J ) o GE o CLUTB( OPp9 ) . AND.1 FRNARR( J ) o L E o C L U T B ( OP p 1 0 ) ) GO TO 170 1 F ( F RM ARR( J ) . G T . 0 ) GO TO 150CALL ADDI N( NNEWp F R M A R R ( J ) p I )GOTO 180DO 160 K = C L U T B ( 0 P p 7 ) p C L U T 3 ( 0 P p 8 ) - 1 I F ( FRMARR( J ) „ NE. K ) GO TO 1 6 0 NEw= K - CL UT B ( OP p 7 ) + CLUTB( NPp 7 )CALL ADDI N( NNFWpNEWp l )

127

Page 137: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

GUTu 180 160 CONTI NUE

T Y P E 7 » F R M A - R R ( J ) » OP 7 F 0 k M A T ( 1 E L E M E N T 1 P T A P « C A N N O T F I N D I N C L U N I T 1 , 1 4 )

GOTO 180 170 New*FRHARR( J ) +GGAP

C A L L A D D I N ( N N E W p N E W p 1 )180 CONTINUE 1 90 CONTINUE

2 0 0 C O N T I N U EI F ( C L U T B ( 0 P p 6 ) oEO o 0 ) GO T O 3 1 0

C :-------------------- — -----------------------------------------------------------------C* U p d a t e GLUTB

CLUTBt NPp 6 ) = C L U T B ( 0 P p 6 )NN « C L U T B ( O P p 6)

2 1 0 I F ( N N o L E c 0 ) GO T O 3 0 0 U P = 0 P + 1 N P = N P + 1C L U I b ( N P p 2 ) * C L U T 8 ( 0 P p 2 )C L U T B ( N P p 3 ) s C L U T 8 ( Q P p 3 )I F ( C L U T B ( 0 P , 4 ) ,NE.» 0 ) C L U T B ( N P , 4 ) = C L U T B ( 0 P , 4 ) + G G A PXF( CLUTB( OPp 5) oNEo 0 ) CLUTB I NPp'5 )» C LUTB ( QPp 5 ) + TGAP

220 I F ( C L u T B ( 0 P p 6 J . E 0 „ 0) GO TO 230CLUTBt N P p 6 ) - C L U T 8 ( 0 P p 6 )N N * N N + C L U T B ( Q P p 6 >

2 30 1 F ( C L U T 0 ( 0 P p 7 ) „ N E = 0) C L U T B ( N P p 7 ) > C L U T B ( 0 P p 7 1 + G G A Pl F ( C L U T B ( O P p 3 ) c N E o 0 ) C L U T B ( N P p 9 ) = C L U T 8 ( 0 P » 8 ) > G G A PI F ( C L U T B ( O P p 9 ) o N E o 0 ) C L U T B ( N P p 9 I = C L U T 3 ( 0 P » 9 K G G A PI F ( C L U T B ( 0 P p 1 0 ) c N E o 0 ) C L U T B t N P p l O X L U T B t O P p 1 0 H G G A PC L U T B ( N P p 1 1 ) = C L U T B ( OP p 1 1 )NN=NN-1 GOTO 210

3 00 CLUN-NP310 CONTINUE

R E T U R NE N D * * * ****

C*C * 0 T B COM : Tak e c a r e o f b a s i c o p e r a t i o n o f CLUNI T e x c e p tC * FOR and I F s t a t e m e n t « T t u p d a t e s t h e r ow andC * c o l o n d i m e n s i o n f o r i t s o p e r a n d ; c h e c k e s i fC* d i m e n s i o n m a t c h ; c h e c k e s i f d i m e n s i o n o u t o fC * d e c l a r a t i o n r a n g e 5 s e t s up r e s u l t e l e m e n t p o i n t e r ;C* and c a l l s t h e p r o p e r s u b r o u t i n e s t o c o n n e c t h a r d -C * wa r e l i n e *C *

SUBROUTINE QT 8 C0 M ( I OPpNERR 1 p NERP2)

Page 138: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I M P L I C I T I N T E G E R ( A - 7 ) D I M E N S I O N P T D T m I N C L U D E « X B » I N C 1 I N C L U D E 1 A L W A Y S o I N C 1 I N C L U D E 1 A U X . I N C 1 I N C L U D E " C D M P L N o I N C 1 I N C L U D E 1 C O M P . I N C 1

0 P P = S T 0 R E t I O P + 1 )I F ( QP P o E O . 4 1 2 ) GO T O 3 I F ( U P P o E Q . 4 9 1 ) GO T O 5 UP = 0 P P / 1 0I F ( O P c L E . 6 0 . A N D . OP o G E . 5 3 ) GO T O 1 0I F ( OP . . EQo 5 1 . O R . OP . E Q . 4 7 ) G O T O 1 0I F ( O P . 2 0 . 4 3 . O R . OP . E 0 . 4 1 ) GO T O 1 0

C * U n k n o w n o p e r a t i o n codeC A L L C E R R O R ( 2 6 » N E R R 2 )TYPE I p O P P 1 F O R M A T (14)G O T O 2 0 0 0C * B i p o l a r n o n - c l o c k t r a n s f e r is not p e r m i t t e d .3 C A L L C E RRHR ( 24 p ME R R 2 ).G U T C 2 0 0 0C * C ond i c t «on a I t r a n s f e r is not p e r m i t t e d .5 C A L L C E R R O R ( 2 5 p M F R R 2 )G O T O 2 000C* U p d a t e o p e r a n d s and r e s u l t d i m e n s i o n .10 D O 100 1=1, 3C* P TOl is T O T S r o w p o i n t e r .P T U T ( I ) = 0 H E R R 3 =0i f ( S T O k e ( i o p + r+i) .e o . o) on to 100

P f 0 T ( 1 ) = R E C E T V ( TU r S , T O T S L T , S T O R E ( I Q P * U i ) , 1 ) - 1 I F ( ST 0 R £ ( P T £j T ( I ) + 1 ) . M E . - 1 ) GO T O 1 0 0

C * R S R T is S R T row p o i n t e r .P S R T = R E C E I V ( S R T , S R T L T , S T O R E ( P T O T ( T ) * 4 ) p 1 ) - 1

C A L L N S R T O T (PSP T , P T 3 T (I ),NE RR 3)N E R R 2 » N E R R ? + N E R R 3 '100 C O N T I N U EI F (N E R R 1 =GT. 0 . O R ,N E R R 2 =GT. 0) GO TO 2 0 0 0G O T O (2 00, 2 0 00 , 3 00, 2 0 0 0 , 2 00 0,2 000, 3 00 ,2 000, 2 0 0 0 2000 ,1 5 0 0 ,2 0 0 0 , 5 0 0 , 6 0 0 , 7 0 0 , 6 0 0 , 7 0 0 , 6 0 0 , 8 0 0 , 9 0 0 ) Q P - 4 0

C ------ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -C * = N o n - c l o c k t r a n s f e r

Page 139: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

2 0 0 COtiT I K Li tC * Check if colon and row dimension match for two operandso 1 F ( STOREt P T O T d )>2 ) =EQ, STfl'R E ( P T O T { 2 ) + 2 ) o A N O o1 iTURE(P T O T (1 ) + 3) oEQo S T O R E {R T O T ( 2 ) + 3 ) ) GO T O 2 2 0rifPE 210210 FORMAT U 9 ' " = " STATEMENT')IF(iT0Rc(PT0T(l) + 2 ) 0N 6 , S T O R E ( P T O T ( 2 ) * 2 ) ) C A L L C E R R O R C L 7 p N E R R 2 )1 F ( S T u R E ( P T 0 T ( 1 ) * 3 ) .NE. S TORE ( PTOT (■ 2 ) + 3 ) ) C A L L C E R R O R ( 1 9 $ . NE R R 2 )GOTO 2000 220 CALL' ARGSET(IQP)CALL CVi(OPPpO)GuTG 2000

C------------------ ------------ ----------------- ----------------- ----C* ! Row c a t e n a t i o n300 CON 1 INUEC * C h e c k i f c o l o n d i m e n s i o n m a t c h 0IF(ST0RE<PT0T(1 )*2) ,EQo STO R E (PT O T (2)+2)) GO TO 320 TYPE 3103 1 0 F O R M A ! ( Z p » S T A T E M E N T ' ) . . - .CALL C ERR OR(1 7 p NERR 2) .

G O T O 20003 20 STORE ( PTOT (3 H 2 ) = STORE( P T O T U H ? )STORE ( P TOT ( 3 )>3 ) «STORE ( P T nT ( l ) - e -31 4-STORE (PTOTC 2) 4-3)IF(OF 0 EQ 0 47) GO TO 2000 CALL ARGSET( TOP)CALL C 4 3 (TOP)GuTG 2COO

C — --------------------------------------------------------------------------------------------------- --------------------— —C* p c o l o n c a t e n a t i o n 500 CONTINUEC* C h e c k i f r ow d i m e n s i o n m a t c h oIF(STORE!RTOT(l)+3) 0 E Q 0 S T O R E (P T n T (2 ) + 3 )) GO T O 5 2 0 TYPE 510 510 FORMA! (/p « " p " STATEMENT1)CALL CERROR (19 p NERR 2 )GOTO 2000 C * Set result dimensions520 j !ORE ( P iOT ( 3 > + 2 ) =STORE ( PTOT ( 1 H 2 > t-STORE ( PTOT( 2 H 2 ) STDRE(PT-JT(3)+3)*STDRE(PTQT(l) + 3)1F(0P 0 EQ 0 51) GO TO 2 000 CALL ARGSET( TOP)CALL C 53( IOP )GOTO 2000C :--------------- :------- ’---------------------------------C* 3 Exclus i ve-OR £ AND + OR600 CONTINUEC * Check i f colon and row d tension m a t c h f o r t wo o p e r a n d s 0

Page 140: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I F ( is rQRE( PTOT (1)+2 ) . E l . STOR E ( PTOT ( 2 ) + 2 ) . AND.1 STORE (PTHT (1 ) >3 ) .EG). STORE < PTDT ( 2 ) + 3 ) > GO TO 6 30 I F { STORE ( PTOT ( 1 ) + 2 ) . EO . 1 . AMD . STORE ( PTOT ( 1 ) > 3 ) . F O o D G O TO 6 2 0 I F ( v r U R E ( P T O T ( 2 ) > 2 ) . E O . 1 . A N D . STORE ( PTOT ( 2 ) * 3 ) . EO. 1 ) GO TO 6 3 0 TYPE 6 10

6 10 FORMAT( / , » " 3 " » " F " » " + " STATEMENT’ )I F ( S T O R t ( P T O T ( l ) > 2 ) . ME. STORE{ PTOT( 2 ) + 2 ) ) CALL CERRORC1 5 pNERR2 9 I F ( S T 0 R E( P T 0 T ( 1 ) + 3) . ME. STORE( PTOTC2 ) + 3 ) )CALL CERROR( 1 6pNERR2 i

■ GOTO 2000C* I f m a t c h , s e t r e s u l t d i m e n s i o n and e l e t n p o i n t e r .6 2 0 S I U R E ( P i J T ( 3 ) > 2 ) = STORE( PTOTt 2 H 2 )

S r O R E { P T d T ( 3 ) < - 3 ) « S T O R E ( P T D T ( 3 ) + 3 )GOTO 6 40

6 3 0 ST0 RE ( PTOT ( 3 ) + 2 ) - S THR E ( PTOT ( 1 ) -s-2)STORE ( PTOT ( 3 H 3 ) = STORE ( PTOT ( 1 ) <- 3 )

6 40 STl R E ( P T 3 T ( 3 ) + 4 ) = G N E X TG N E X T = G N E X T + S T O R E ( P T O T ( 3 ) + 2 ) * S T O R E ( P T O T ( 3 ) + 3 )C A L L . A R G S E T ( I Q P )CALL C64T5 8 ( 0 PP. I )GOTO 2000

C-------------------------------------------------------'------------------------------------ ---------------------------------------------------— —C* + / O R - R e d u c t i on £ / A N D - R e d u c t i on7 00 CONTI NUEC* S e t r e s u l t d i m e n s i o n and e I e m p o i n t e r .

0 TURE( P TOT( 3 ) ^ 2 ) = 1 S T O R E ( P T O T ( 3 ) + 3 ) * S T O R E ( P T O T ( 2 ) + 3 )STORE( PTOT( 3 ) +4 ) =GNEXT G N E X T * G N E X T + S T 0 R E ( P T 0 T ( 3 ) + 3 )CALL ARGSET( I Q P ) . ,CALL C 5 6T 5 7 { OPP p1)GOTO 2 COO

C - ------------------------------- •— ----------------------------- r---------------- —C* Log i c -NOT8 0 0 CONTINUEC* Se t r e s u l t d i mens i on and e I em p o i n t e r ,

j T U R E ( P M T ( 3 ) * 2 ) = S T 0 R E ( P T 0 T ( 2 H 2 )5 T 0 R E ( P T 0 T ( 3 H 3 ) = S T r ) R E ( P T 0 T ( 2 H 3 )STORE( PTOT( 3 1 + 4 )=GNEXTG ME X T= GNE X T + S TORE( P T O T ( 3 ) + 2 ) *STOR E ( P T O T ( 3 ) > 3 )CALL ARGSET( I Q P 1 CALL C5 9 ( 0 P P p 1)GOTO 2 000

C-------------- --------------------------------- ■--------------- —9 00 I F ( UPP , GE. 6 0 3 ) GO TO 1 0 0 0C* CLUN1T9 01 CONTINUE

A R G F = S T 0 R E ( P T 0 T ( 2 ) + 4 )

Page 141: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

C* C h e c k the d i m e n s i o n of e a c h a r g u m e n t *00 970 I = l , S T n R E ( P T 0 T ( 2 ) + 2 )N E R R 3 = 0 ,F A R G s R E C E I V ( A R G o A R G L f » A R G F j> 1 )F A R G = R E C E I V ( T O T S » r O T S L T p S T O R E (F A R G ) p 1)-1 I F (S T O R E (F A R G + 1) ,M E „-1) GO TO 9 6 0 P S R T = R E C E I V ( S R T p S R T L T p S T O R E ( F A R G + A P p 10 -1C A L L N S R T O T ( P S R T p F A R G p H E R R 3 )

960 A R G F = A R G F + 1N E R R 2 = N ER R 2 + N E R P 3 9 7 0 C O N T I N U E G O T O 2 0 0 0C ---------------:--- ------------------------------------------------ ------C* # $ # E n c o d i n g \ 1 * ? p 0 \ I n t e g e r - S t r o n g1 0 0 0 C O N T I N U EC A L L A R G S E T t TOP )C A L L C 6 0 ( IQ P )2 0 0 0 C O N T I N U E R E T U R N ENDC*************************** ******************************************** C*C * NGR'JOT s U p d a t e c o l o n and row d i m e n s i o n for S R T and T O T S oC* C h e c k if row and c o l o n r a n g e s are g r e a t e r t h a n z e r o 0C* C h e c k if row £ c o l o n d i m e n s i o n s o v e r d e c l a r e d d i m e n s i o n s ^C *^***********************************************************************

S U B R O U T I N E N S R T O T (P S R T » P T O T p N E R R )I M P L I C I T I N T E G E R ! A - Z )I N C L U D E » X B » I N C »I N C L U D E 9 AUXe TNC«I N C L U D E 9 A L W A Y S . I N C 'C * U p d a t e S-RT c o l o n and row r a n g e oI F ( S T O R E I P S K T + 6 ) . N E . 0) STOftE(P S R T * 2 )• E X T K N K ( S T O R E ( P S R T + 6 ) I

I F ( s r u R E ( ? ; S R T > 8 ) . N E . 0 ) STOR E ( PSRT-6-A) =EXTHNK( STORE ( PSRT*8 UI F ( STORE(PSRT + 7 ) = L E , 0) GO TO 10STORE( P S R T * 3 ) » EXTHNK( STORE( PSRT* 7 ) t GOTO 2010 IF ( S TURE( PSRT-t-7 ) » NE. 0)1 S T O R E ( 3 S R T + 3 ) = E X T H N K ( - S T O P E ( P S R T + 7 ) 1-1 2 0 I F ( S T U R € ( f>SRT + 9) „ LE. 0) GO TO 30. S T U R E (P S R T * 5 ) = E X T H N K ( S T O R E (P S R T + 9 ) >G U T U AO30 I F ( S T u R E ( P S R T + 9 ) .M E . O )1 S T U R E (PSRT + 5 ) = E X . T H N K ( - S T O R E ( P S R T * 9 ) )-l

Page 142: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

C* U p d a t e 1HT !? COL and ROW d i m e n s i o n40 S T O R E ( P TO T + 2 ) = STO R E (? S R T * 3 )- S T O R E fPSRT+2-) +1S T O R E ( P T O T + 3 )- S T O R E ( P S R T + 5 ) - S T O R E (P S R T + 4 U 1C * ' C h e c k if TOTS r o w - c o I on r a n g e g r e a t e r than z e ro

I F ( STuRE ( PTQT4-2 ) „LE , 0 ) CALL C ERROR (1 4p NE RR i I F ( STORE ( PTOT + 3 ). oLEo 0 ) CALL CERROR ( 2 3 p NERR)

C* PSDT i s SOT row p o i n t e r .PSDT = R E C E I V ( S 0 T p SDT L T > ST 0 RE( PSRT < - 1 ) p 1 ) - 1

C* Ch e c k i f o u t o f d e c l a r a t i o n r a n g e .I F ( Sf OREt PSRT>2) . LT . 0 .OR S T O R E (PSRT+2). S T 0 R E ( P S R T + 3 ) S T O R E (PSRT<-4) S T O R E * PSRT+5)'

o GE o .GEo,GE,,GES

S T O R E ( P S O T + 4 $) S T O R E (PS DT >4)) S T O R E ( P S D T 4-5 ) ) S T 0 R E ( P S D T * 5 ) )

1 C A LL CERR O R (15p O E R R ) lF(STORE(PSRT-6-3) . LT. 0 .OR,1 C A L L C E R R 0 R ( 1 5 » N E R R )I F ( 6 T u R E ( P S R T + 4 ) . LT. 0 .OR 1 C A L L C E R R O R ( 1 6 » N E R R )I F ( STORE(PSRT + 5) . LT . 0 .OR 1 CALL C E R R 0 R ( 1 6 p NE RR )100 C O N T I N U E R E T U R N END *#*******************************************$*C*C* O P G A T E s D e l a t e u s e l e s s e l e m e n t ? e s p e c i a l l y C T E R M S .C*SUBROUTINE OPGATE(LGNpHGN)IMPLICIT INTEGER(A-Z)INCLUDE »C O M P . I N C INCLUDE ' C O M P L N . T N C

10

C*

20C*

CHANGE=0DU 100 1=LGNp HGNI FCGAl T Y P t I ) . E Q . C L U I . OR. GATTYPt I) . EQ. CLUO) GO TO 1 0 0 I F ( GAI I Y P ( I ) . EQ. 0 . OR. GAT T YP( I ) „ EQ. C L U N I T ) GO TO 1 0 0 CALL SEEGAT( I pGTpSYMPTRpAUXPTRp GI NpNOUT)I F t N U U T . N E . 0 ) GO TO 20A l l e l e m w i t h no o u t p u t w i l l be d e l e t e d .CALL DELG ATI I )CHANGE* !GOTO 100

I F ( GIN = GT. 1) GO TO 60 I F ( GIN . EQ. 1) GO TO 30 A l l e l e m w i t h no i n p u t w i l l CALL DELGAT( I )C H A N G E =1 G O T U I C O

be d e l e t e d .

Page 143: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

30 £ F ( G T . EO. CLNAND . OR. GT oEQ» C TERM'S) GO TO 100C* A l l e I e m w i t h o n l y one i n p u t w i l l be d e l e t e d e x c e p tC* NANO, and CLUNl To

' CALL SEE I N t T , F R n-ARR, GI N )NEWG*FRHARR( 1 )CALL S E 6 0 U T ( I , FRMARR?NOUTI CALL OFL GAT( I )DO 50 J = 1 s> N OU TCALL A D D I N ( F R M A R R ( J ) , N E W G , 1 )

50 CONTI NUE GOTO 1 00

60 I F t N O u T o G T o l . OR. G T , E 9 • CTERMS . OR. GT o EQ. CL XOR) GO TO 100 CALL SEEOUT( I , FRMARRpNOUT)I F (GT oNEo GATTYPt FRMARR d ) ) ) GO TO 100 NEW* FKMARR( 1)CALL S t E I N ( I p F R M A R R p G I N )CALL OELGAT( T )CHANGE®!DU 70 J = 1 , G I NCALL A D DI N ( N E W, F R M A R R ( J ) 1)

70 CONTI NUE 100 CONTI NUE

I F( CHANGE =NE. 0 ) GO TO 10

110 CHANGE=0DO 120 ■ 1 - L G N p HGNI F ( GATT YP ( I ) . NE. CT6RMS) GO TO 1 20 CALL S E E G A T ( I , GT » S Y MP T R , A U X P T R p G I N p NOUT)I F ( G I N oEQ. 1) GO TO 115 CALL CERROR( 2 3 , NERR1)GOTO. 1 20

115 CALL S E E I N ( I , F R M A R R , G 1 N )NEw= F RMARR( l )CALL SEEOUT( I , F R M A R R , NOUT)CALL DE LGAT( I )CHANGE®1DO 120 J - l , N O U TCALL A D D I N ( F R M A R R ( J ) , N E W , 1)

120 ' CONTINUEI F( CHANGE . NE. 0 ) GO TO 110

RETURNEND

C* THI S ROUTINE TAKES A POI NTER THAT POINTS TO AC* QUADRUPLE IN STORE. I T RETURNS 3 L I ST S OF NODE NUMBERS REFEREOC* 10 BY THE QUADRUPLE. THESE L I S T S ARE I N A R G L I S ( 3 , 1 0 0 0 ) .C* THE NUMBER OF En TRI FS INTO EACH OF THE THREE DI MENSI ONS OFC* ARGLI S ARE RECORDED I N N [ N ( 3 ) .

Page 144: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

C* I f r e f e r e n c e i s nade t o one o f p r o d u c t i o n s 3 2 p 3 3 p 3 6 p B T p 5 6 - 5 8 pC* t h e n move on t o t h e n e x t a r gumen t 0 T h e s e p r o d u c t i o n s wo 15C * be i d e n t i f i e d by a p o s i t i v e e n t r y i n co9 umn one o f t h e TOTS oC*

SUBROUTINE ARGSET( I QP)I M P L I C I T I NTEGER { A - Z )DI MENSI ON 3 U F ( 5 0 )INCLUDE "ALWAYS.INC'I NCLUDE 1AUX = INC 1 I NCLUDE " X B . I N C I NCLUDE 5 TEMPO . INC 11 I NCLUDE 0 COMP. INC 5 DATA BUFLT / 5 0 /

Q P * S i a R E ( I Q P + 1 )0 P P = 0 P / 1 0I F ( D P P oEOo 6 0 ) GO TO 2 0 0I F ( D P R oEQo 43 . OR. OP® . E Q . 53 ) GO TO 300

DO 100 I = l p 3I F ( S T O R E ( I Q P + I + 1 ) . 6 0 . 0 ) GO TO 100I T = REC E IV ( TOTS p TOTSLTp STOR E ( IQP + 1 -«-l) p 1 ) - lN I N ( I ) » S T O R E ( T T + 2 ) * S T O R E ( I T + 3 )FI RST® 0 CP= 1 R P * 1

10 CONTI NUE1 F ( S I U R E ( m i ) o GT o 0 ) GO TO 50I F ( S T 0 R E ( I T + 1 ) . E Q . 0 ) GO TO 90I F ( F I R S T . E Q . 0 ) CD=ST ORE( I T + 2)CALL A R GE N T ( OP p I T p CDp CPp RPp I )GOTO 90

50 CONTI NUE.IQQ = RECEl V( QTABLEp O T A B L T p STOREt m i ) p 1 ) - 1 I F ( BUFLT . GE. ' ( BUFP + 3 ) ) GO TO 60 TYPE 55.

55 FORMAT( 8 BUFFER OVERFLOW! ' )STOP

60 I F ( FI RST . N E . 0 ) GO TO 70 F I RST= 1C D = S T G R E ( I T + 2 )11QQ = S 1 ORE( I T + 1)65 IOQ=RECEIV(QTA8LEp QTABLT p I IQQp 1 )I F ( S T O R E ( I Q Q ) . N E . 4 71 . AND. STORE( IQQ) . N E . 5 1 1 ) GO TO 69 I I QQ * 1 1 Q Q + 1 GOTO 65

Page 145: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

69 I QQ« RECEr V( QTABL F» QTA8 L Tp ( I I Q Q - 1 ) j . D - 1 7 0 Qj> * S T 0 R E ( I QQ + 1)

BU'F <BUFP+1) * CP BUF (BUFP-+2 ) * RPN E X T P = R E C F I V ( T O T S * r O T S L T » S T O R E ( I Q O + B ) > l ) - l8 U K B U F P * 3 ) = NFXTP BUFP* B0 FP+3I F ( G P oEQo 5 1 1 ) CP» CP+ ST 0 RE( NEXT P+ 2 )I F ( OP oEQ. 4 7 1 ) R?=R.P*ST0RE (NEXTP-6-3) I T = R E C E I V ( T O T S , r O T S L T , S T O R E ( I Q Q + 2 ) , ! ) - ! GOTO 10

90 I F ( B U F P o EQ o 0) GO TO 100 1T* BUF ( BUFP)R P « 8 U F ( B U F P - 1 )CPS8 U F ( B U F P - 2 ) f iOF P- BU FP- 3 GOTO 10

100 CONTINUE GOTO 4 0 0

CCC # $ 6 X 1 , ? , 0 X' 200 1 T l = R t C E I V ( TOTS, TOTS LT» STOR E ( I Q P m , 1 ) - 1

I T 2 = R E C E T V ( r 0 T S , T n T S L T , S T 0 R E ( I Q P + 4 ) , l ) - l CALL, ARGENT ( OP, I T 1 , STORE ( 1 T H - 2 ) , 1 , 1 , 1 )IF ( OP oECo 604 ) GO TO 2 30ccc # i aS T O R E ( 1 T 2 + 2 ) = A R G L I S ( 1 , 1 )N I N ( 1 ) * A R G L I S ( 1 , 1 )S 1 * A R G L 1 S ( 1 , 2 )00 210 I® I , N I N (1 )S 2 - S 1 / 2E = S 1 - S 2 * 2I F ( E o EQo 0 ) A R G L I S ( l , ( N I N ( l ) - I + l ) )=GND I F ( E o EQo 1) A R G L I S ( 1 , ( N I N { 1 ) - I + l ) ) *VCC S1=S2

2 10 CUN 11 NOE GOT U 2 5 0

CCC X I , ? , O X230 STORE ( n ' 2«-2 )=STnRE ( I T i t - 2)

N I N ( l ) « S T 0 R E ( I T l + 2 )2 50 S T O R E ( 1 T 2 + 1 ) = - 5

S T O R E ( 1 T 2 + 3 ) = 1 P T = F I N T E M ( 0 )S T O R E ( I T 2 + 4 ) = P T P T E M ( P T ) s STORE( I QP+ 4 )A R G L I S ( 3 , 1 ) 3 PT GOTO 4 00 VJ

Page 146: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CCC , !3 0 0 1T1 = R E C E I V ( T 0 T S » T 0 T S L T »STnRE ( IQP-i -2 $ p 1 ) - l

I T 2 » R E C E I V ( T 0 T S » T n T S L T » S T 0 R E ( I 0 P * 3 ) » l ) - . l i 1 3 = RECEI V( TOTS.»T! ]TSLT» STORE ( I Q P 4 - A ) » 1 ) - 1 CALL A R G E N T I O P , I T 1 , S T O R E ( I T 1 + 2 ) , 1 , 1 , 1 )CALL ARGENT ( f l P , I T 2 , S T 0 R E ( I T 2 -s- 2 ) , 1 . j>1j>2) N l N l l ) = s r U R E <I T l > 2 ) * S T 0 R E ( I T l + 3 ) N l N l 2 ) « S T 0 R E ( I T 2 + 2 ) * S T a R E ( I T 2 + 3 )NI N ( 3 ) * S T O R E ( I T 3 + 2 ) * S T QR E ( I T 3 + 3)STORE( I T 3 + l ) « - 5 P T= TIN TEN( 0 )STORE( I T 3 + 4 ) =PT P T E M ( P T ) » S T O R E ( I Q ° + 4 )A R G L I S ( 3 p 1 ) * P T

4 00 CONTI NUE RETURN END

c*C* ARGENT p u t s a s y m b o l s i n t o ARGLI S*C*

SUBROUTINE ARGENT (0P-, I T , C D , C P , R P , I )I M P L I C I T INTEGER ( A - Z )I NCLUDE « AUX o I N C 0 INCLUDE «XB=I NC°I NCLUDE ' A L WA Y S . I N C 1 I NCLUDE ' T E M P O . I N C *I NCLUDE ' C O M P . I N C

I F ( S T U R E ( I T + 1 ) . EQ. - 5 ) GO TO 110I F ( S T O R E ( I T + 1 ) . E Q. - 3 ) GO TO 30I E ( S T O R E t I T + l ) . EQ. - 2 ) GO TO 20

10 PSRT = RECE1 V( SRT , SR T L T , S T O R E ( I T + 4 ) , ! ) - !L C=STURE( PSRT+2 )LR=STURE( PSRT+4 )PSDT = R E C E I V ( S D T , S O T L r , STORE ( P S R H - 1 ) , 1 ) - 1 I r ( STL) R E ( P S 0 T -B ) . L T . 0 )1 PSDT=RECE I V ( S D T , SDTLT, ( - ST0 RE( PSDT< - 3 ) ) , 1 ) - 1 PP*STORE( PSDT^-B)CC0 STORE ( PSDT+-4 )T Y P E * !GOTO 40

2 0 P P * S T O R E ( I T +4)TYPE=2 GOTO 40

30 P P = S T u R E ( I T + 4 )TYPE=3

Page 147: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

4 0 00 100 R I » l p S T 0 R E ( I T + 3 100 90 CI = 1.» ST.0RE( I T + 2 )N = ( R P + R I - 2 ) * C n + ( C P + C I - l )G 0 T C ( 5 0 p 6 0 p 7 0 ) TYPE

50 I F ( PP . LEo 0 ) GO TO 55e L t H « P P + (LR + R . I - l ) * C C + (LC + C I - l )GOTO 80

55 ELEM=FLOAT GOTO 80

60 ELEH=PPI F ( ELE H oGTo 0 ) GU TO 65 ELEM=FLOAT GOTO 80

65 PP=PP+1 GUTU 60

70 ELEM = ST u R E ( R E C E 1 V ( P I N T A B p P I N L T » P P p D )I F ( U P oEQo 3 7 1 , OR. OP , E Q , 372 . OR . OP . E Q . 6 0 3 ) GO TO 751 F ( ELE M oLTo 0 ) EL EM*1 FL OAT i F ( E L E M o EO. I ) ELEM = VCC I F ( E L E M . E O . 0 ) ELEM=GND

75 PP=PP+1

80 A R G L I % ( I , N ) = E L E M 90 CONTI NUE 100 CONTI NUE

GOTO 200

110 CONTI NUEI I = S T G R E ( I T + 4 )00 150 N « l » . S T 0 R E ( ! T * 2 ) * S T n R E ( I T > 3 )A R G L I S ( I , N ) = T E M P ( I I , N )

150 CONTI NUEP T E M ( 1 1 ) = Q

200 C ON T I N U E ,RETURNENDC*** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ************

C* FI NTEM^********************************************************************** FUNCTI ON F I N T E M( P N T )I M P L I C I T I N T E G E R ( A - Z )I NCLUDE ' TEMPO. I NC *

PI NT EM = 0 UO 10 1 = 1 , 5I F ( PTEM( I ) . H E . P NT ) GO TO 10 F I N T E M = I GOTO 20

Page 148: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

10 CONTINUE20 CONTINUE

RETURN END ********************************************** ********

C*C* C41 ’ N o n - c l o c k t r a n s f e rC* A R G L I S T ( 2 » K ) * A R G L I S T ( I p K)Q<c*^t*^*^t*^**:<t *********************** ***********************************

SUBROUTINE C 4 1 ( 0 P , C S )I M P L I C I T INTEGER ( A - Z )I NCLUDE ' C O M P . I N C *

DO 100 K = l p N l N ( 1)CALL A D D I N ( A R G L I S ( 2 p K ) p A R G L I S ( I p K ) p 1)

100 CONTI NUE RETURN END

C *C* C43 ; Row c a t e n a t i o nC* The r e s u l t o f A R G L I S ( 2 p K) 8 A R G L I S ( I p K) i s s t o r e dC* i n t e m p e r a r y s t o r a g e TEMPoq **********************************************************************

SUBROUTINE C 4 3 ( TO)I M P L I C I T INTEGER ( A - Z )I NCLUDE 1 TEMPOoI NC 1 I NCLUDE 11 COMP o INC 0

C* I T i s t e m p o r a r y s t o r a g e TEMP r o w p o i n t e r ' t >I T * A R G L I S ( 3 p 1)DO 100 K=1 p M I N ( 2 )

C* P u t A R G L I S ( 2 p K) i n t o t e m p o r a r y s t o r a g e ®T E M P d TpK ) » A R G L I S ( 2 p K)

100 CONTINUEDO 200 K s l p N I N ( l )

C* P u t A R G L I S ( l p K ) i n t o t e m p o r a r y s t o r a g e ®TEMP( I T p ( K + N I N ( 2 ) ) ) = A R G L I S ( I p K )

200 CONTI NUE ■RETURN ENDC**********************************************************************

c *C* C53 s C o l o n c a t e n a t i o nC* The r e s u l t o f A R G L I S ( 2 p K ) p A R G L I S ( I p K ) I s s t o r e dC* i n t e m p o r a r y s t o r a g e TEMP®Qi}:*** ******************************************** **********************

SUBROUTINE C 5 3 ( I Q )I M P L I C I T INTEGER ( A - Z )

Page 149: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I NCLUDE » AUX. I NC«I NCLUDE «X3 = INC «I NCLUDE ' A L W A Y S . I N C 'I NCLUDE ' T E M P O . I N C 'INCLUDE ' C O M P . I N C

C* F i n d # c o l s o f ARG1 and ARG2 t o f i l l T E M P O , - )111 = R E C E I V I T O T S , T O T S L T , S T O R E ! 1 0 + 2 ) , I ) - l112 ® REC E 1 V ( TOTS, TOTS L T , S TO RE( ICH 3 ) , 1 $ - 1 CQL1 = ST ORE ( I T 1 + 2 )C0L2 « S T OR E ( I T 2 + 2)

C* I T i s t e m p o r a r y s t o r a g e TEMP r ow p o i n t e r .I i * A R G L I S C 3 , l )K = 0 M = 0 N = 0

1 00 CONTI NUEI F (K . GE= N I N O ) ) GO TO 400 DO 2 00 I = 1 , C0L2

C* P u t A R G L I S ( 2 , M) i n t o t e m p o r a r y s t o r a g e .K = K * 1 M = M + 1TEMPI I T , K ) = ARGLI S ! 2 , M)

2 0 0 CONTINUE00 300 J = I pCQL1

C* P u t A R G L I S ! 1 , N ) i n t o t e m p o r a r y s t o r a g e .K = K * 1 N = N + 1T E M P ( I T , K ) = A R G L I S ! 1 , N )

3 00 CONTI NUE GO 10 100

400 CONTI NUE RETURN END 4: if*** **************

C*C* CS4T5H t AND OR XORC* A R G L I S ( 1 , 1 ) and A R G L I S ( 2 , I ) a r e t h e i n p u t o f A R G L I S ( 3 , 1 ) ,C* Gat e t y p e o f A R G L I S ( 3 , 1) i s d e c i d e d by OP.q ************************************************************** ********

S U B RDU TINE C 5 4 T 5 8 ! O P , M M C )I M P L I C I T I NTEGER ( A - Z )INCLUDE ' C O M P . I N C '

U P = 0 P / 1 0I F ( 0 P . E Q . 5 8 ) GT=CLAND I F ( U P o E Q . 5 6 ) GT=CLOR I F (OP . E Q . 5 4 ) GT = CI X0R

C* I f one o f t h e a r g u m e n t i s one b i t t h e n e x p a n d i t .I F { N l N ( 1 ) , EQ. N l N ( 2 ) ) GO TO 400

Page 150: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

I F ( N 1 N ( 1 ) oEOo 1) GO TO 200 DO 100 I = 2 ? N I IN ( 1 )A R G L I S ( 2 d I ) = A R G L I S ( 2 d 1)

1 0 0 CONTINUE GO TO 400

2 0 0 CONTI NUE00 300 I * 2 p N I N < 2 )A R G L I S d p I ) = ARGL I S ( I p 1)

300 CONTI NUE 4 0 0 CONTI NUE

DO 500 1 = 1 p N I N ( 3 )CALL S E T G A T ( A R G L I S ( 3 p I ) pGT )

C * C a l l ADDIN t o p u t e a c h i n p u t i n t o ARGLI S C3 p I $ o CALL ADD1 NI A RGL I S t 3 p I ) p A R G L I S ( I p I ) p 1)CALL A D D I N ( A R G L I S t 3 p I ) p A R G L I S ( 2 p I ) p 1)

5 0 0 CONTI NUE RETURN END

c*C* C5 5 T 5 7 S AND- Red u c t i o n O R - R e d u c t i o nC* Ga t e t y p e i s d e c i d e d by OPo

SUBROUTINE C55T57( OPpMMC)I M P L I C I T I NTEGER ( A - Z I I NCLUDE »COMP. I N C

0P» DP/ 1 0I F ( 0 P o E Q o 5 7 ) GT = C L ANDI F ( O P . E Q . 5 5 ) GT=CLORCALL S E T G A K A R G L I S ( 3 p l ) p G T )DO 100 I * 1 p N I N ( 2 )CALL A D D I N ( A R G L I S ( 3 , I ) p A R G L I S ( 2 p I ) p l )

100 CONTI NUE RETURN END

C*C* C59 S A LQGI C- COMPLEMENTC* A R G L I S ( 2 p I ) i s i n p u t . A R G L I S ( 3 p l ) 5s g a t e n u m b e r .

SUBROUTINE C 59( f ] Pp MMC )I M P L I C I T I NTEGER ( A - Z )I NCLUDE ' C O M P . I N C *

GT=CLNANDDO 100 I = l p N I N ( 3)CALL ShTGAT( A R G L I S ( 3 p I ) pGT)

Page 151: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CALL ADDIN(ARGLIS(Bo I )» ARGLIS(2 p !)»1 )I CO CONTINUE

RETURN END

C*C* C 60 s ti $ # ( E n c o d i n g ) . \ 1 p ? p 0 \ ( I n t e g e r - S t r i ng )C* R e s u l t s t r i n g A R G L I S ( 1 p I ) w i l l be s t o r e d i n t e m p e r a r yC * s t o r a g e - T E M P o

SUBROUTINE C 6 0 ( I Q )• IMPLICIT INTEGER (A-Z)I NCLUDE 0 TEMPO, I NC «I NCLUDE * COMP. I NC '

C* I T i s t e m p o r a r y s t o r a g e TEMP r ow p o i n t e r .I T = A R G L I S ( 3 » 1)DO 100 I = 1p N I N (1 >

C* P u t A R G L I S ( I p I ) i n t o t e m p o r a r y s t o r a g e .T E M P d T p I ) * ARGLI S( I p I )

100 CONTI NUERETURN END

C* S u b r o u t i n e S E T G A T ( g a t e - n u m b e r p g a t e - t y p e )C* w i l l i n i t i a l i z e g a t e C g a t e - n u m b e r } as s p e c i f i e d by t h e GATE TYPEC* a r g u m e n t s . I f g a t e - n u m b e r = = 0 t h e n a new g a t e w i l l be c r e a t e dC* w i t h t h e p a r a m e t e r s g i v e n . The new g a t e n u mb e r w i l l be r e t u r n e dC * i n { g a t e - n u m b e r } .

SUBROUTINE S E T G A T (G N U M p G T Y P E )I M P L I C I T INTEGER ( A - Z >I NCLUDE ' C O M P L N . I N C

CI F ( G N U h .GE» GNEXT ) GNEXT = GNUM + 1

. I F( GNUM « N F . 0 ) GO TO 100 GNUM=GNEXT•GNEXT=GNEXT»1

1 00 CALL ZERGAT( GNUM)GATTYP(GNUM)«GTYPE RETURN l NO

C* 'C * SUBROUTINE SEEGAT( g a t e - n u m b e r p g a t e —t y p e p # f r o m s p N T OS)C* t a k e s a g a t e - n u m b e r and r e t u r n s 4 a t t r i b u t e s o f s a i d g a t e .C* Ty pe o f g a t e .C* FAN OUT OF THE GATEC* Number of i n p u t s t o t h e g a t e .C* "

Page 152: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

i UBROUl ' I NE SEEGAFt GNUM» Gf YPE p SYMPTRp AUXPTRp GTNp NOUT)I M P L I C I T I N T E G E R ( A - Z )I NCLUDE "CnMPLNo I N C

1F(GNUM oLEo 0 ) GO TO 300 GTYPE = GATTYP(GNUM)

GI N = 0I = I L I NK( GNUM)

100 1FC 1 o Lfco 0 ) GO TO 200 0.0 110 J = 1 p 2I r ( I O L I S T ( I p J ) =NE » 0 ) G I N « G I N + 1

110 CONTINUEI = ID L I S T ( 1 , 3 )GO TO 100

200 NOUT * 0I = OL I NK( GNUM)

210 I F ( I =LEo 0 ) GO TO 40 0 DO 2 20 J = 1 , 2I F ( I U L 1 S T ( I p J ) o HE o 0) NOUT * NOUT* 1

2 2 0 CONTI NUEI = I 0 L I S T ( I p 3)GO TO 210

3 00 TYPE 9 0 1 , GNUM GI N = 0 NQU T = 0

901 FORMAT(« * * * C A L L TO SEEGAT WI TH GNUM ■ «pI5)4 00 RETURN

ENDC * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 = * * ^ * * * * * * * * * * * * * * * * * * * *C* SUBROUTINE DELGAT( g a t e - n u m b e r )C* w i l l d e l e t e t h e s p e c i f i e d g a t e and i t s a u x i l i a r y o u t p u t s oC*C* I t DELETE 9 GNUM * FROM OL I ST OF THOSE GATES WHICH ARE ONC* I L I S T OF 9GNUM9C* 2 , DELETE 9 GNUM'9 FROM I L I S T OF GATES WHICH ARE ON O L I S TC* OF 9 GNUM 9 oC* A, . AFTER EACH SUCH DELETI ON ADJUST S I G L I S TC* 3 o DELETE THE GATE 9 GNUM9 AND MAKE APPROPRI ATE CHANGESC* I N S I G L I S T ’C*c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

SUBROUTINE DEL GAT( OGNUM)I M P L I C I T I N T E G E R ( A - Z )I NCLUDE " C O M P L N t I N C 9

Page 153: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

GNUM = OGNUM I = I L I N K ( G N U M)

1 00 I F ( i oLE= 0 ) GO TO 20000 110 J = 1 p 21 F ( 1JL I ST ( l.» J ) oLEo 0 ) GO TO 110 GNEW * I Q L I S T ( I p J)CALL DELOUT( GNEW»GNUM)

1 10 CONTI NUEI = I O L I S T ( Io 3)GO TO 100

2 00 1 = OL I NK( GNUM)

2 10 I F ( I oLEo 0) GO TO 300 DO 220 J = 1 p 2I F ( 1 0 L 1 S T ( I , J ) = L E . 0 ) GO TO 220 GNEW » I D L I S T ( I f J )CALL DE L I N ( GNEWp GNUM)

2 20 CONTI NUEI = 10L. IST ( I f 3)GO TO 210

300 CONTI NUECALL Z ERGAT(GNUM)

RETURNEND

C * 4 - 4 = * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 4 5c*C* SUBROUTI NE A D D I N ( d e s t i n a t i o n - q a t e # p S O u r c e - g a t e # p T Y )C*C* ALLOCATE N SLOTS I N THE FROMS TABLE FOR GATE GTT=C* GTE I S PLACED IN THE F I R S T OF THESE SLOTS.C*C* GTT => g a t e t o add i n p u t t o .C* GI F s > i n p u t t o add t o g a t e GT T .C* N => FUR C O M P A T I B I L I T Y ONLYC*c***********************************************************************

SUBROUTINE ADD I M ( G T T f G T F f T Y )I M P L I C I T I NTEGER ( A - Z )INCLUDE « COMPLN.TNC «

CALL N X T I N P ( G T T f I f - J )I 0 L 1 S T ( I f J ) « GTF

I F ( G I F oLE. 0> GO TO 100 CALL N X T O U T ( G T F f I f J )

Page 154: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

IdLIST(I*J) * GTT1 0 0 RETURN

ENDC *******&#**#***#**** *3̂ *************&******#***#*************#*********r *C * SUBROUTINE D E L l N ( q a t e - n u m b e r p f r o m - n u m b e r $C* REMOVES 0 GFROHQ FROM THE I N P U T - I I S T OF *6NUM»C*

’ SU6R0UTI NF DEL I N (GNUMj. GFROM )I M P L I C I T I NTEGER ( A - Z )I NCLUDE "CUMPLNo I N C ”

I = I L I N K ( G N U M)100 I F { I oLE, 0) GO TO 2 00

DO 110 J = 1 , 2I F ( I D L I ST( I , J ) oNEo GFROM) GO TO 1 10 I 0 L 1 S T { I » J ) = 0 GOTO 300

110 CONTI NUEI = I 0 L I S T ( I , 3 ) ■GO TO 100

200 CONTI NUE2 1 0 TYPE 2 1 1 , GFROM,GNUM211 FORMAT(» SUBR DEL I N * * * E R R O R * * * GATE # ’ 1 4 , ' NOT FOUND I N '

1 « I L 1ST OF GATE 1 4 )

3 00 RETURN END

c*C * SUBROUTINE DEL O U T ( q a t e - n u m b e r , f r o m - n u m b e r )C* REMOVES ' GFROM' F»OM THE O U T P U T - L I S T OF »GNUM'C*

SUBROUTINE DELOUKGNUM, GFROM)I M P L I C I T INTEGER ( A - Z )I NCLUDE ' COMPLNoI NC »

1=0 L I NK( GNUM)

100 I F ( I o L£ o 0 ) GO TO 200

DO 110 J = 1 , 2I F ( I l l L l S K I , J ) .NEo GFROM) GO TO 110roLis r (i, j)=oGOTO 300

Page 155: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

110 CONTI NUE ■1 « I G L I S T ( I * 3 )GO TO 100 ■

?00 CONTINUE .2 2 0 TYPE. 2 2 1 , GPPOM, GNUM221 FORMAT( 0 SU8R DELOUT■+ + E R R O R * * * GATF #»p 14, "NOT FOUND IN«

1 * 0 1 fST O F . GATE # « , 14 )

3 00 RETURN END

C* SUBROUTINE S E E I N ( q a t e - n u m b e r , f r o m - a r r a y p f r o m - a r r a v - d 5 m e n s i o n )C*C * r e t u r n s a l i s t o f a l l t h e I n p u t s t o t h e g a t e * L i s t ̂ i s 5 n f r o m - a r r ay C* I f f r o m - a r r a y - d i mens i on i s l e s s t h a n t h e n u m b e r o f i n p u t s , t h e n C* o n l y t h e f i r s t f r o m - a r r a y - d i men s i on i n p u t s w i l l be r e t u r n e d , ,C*.

SUBROUT INE S E E I N ( GNUM, F ARR AY, MG)I M P L I C I T I NTEGER ( A - Z )I NCLUDE ' C OMP L N . I N C *DI MENSI ON FAPRAY( NG)

K =. 0I = I L I NK( GNUM)

100 I F ( I »LEo 0 ) GO TO 200 ■ DO 110 J = 1,2

I F ( I 0 L 1 S T ( I , J ) oFQo 0 ) GO TO 110 K = K + 1FARRAY( K) = IOL 1ST( I , J )I F ( K cGEo NG . OR. K . GT. 2 0 0 ) GO TO 200

1 1 0 CONTI NUEI = 1 0 L I S I ( 1 , 3 )GO TO ICO

2 00 CONTINUE RETURN END

C* ■C * SUBROUTINE S E E Q U T ( g a t e - n u m b e r , f r o m - a r r a y , f r o m - a r r a y - d I mens i o n ) r *C* r e t u r n s a l i s t o f a l l t h e OUTPUTS t o t h e g a t e . L i s t i s I n f r o m - a r r a yC* I f f r o m - a r r a y - d ( m a n s i o n i s l e s s t h a n t h e n u mb e r o f i n p u t s , t h e nC* o n l y t h e f i r s t f r o m - a r r a y - d i m e n s i o n i n p u t s w i l l be r e t u r n e d .C*f * * * * * * * * * * * * * * * 4= l i t * * * * * < ‘ >8$

SUBROUTINE SEEOUTf GNUM, FARRAY, NG)I M P L I C I T I NTEGER ( A - Z )I NCLUDE »C O MP L N . I N C »

Page 156: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

■ DIMENSION FARRAY(NG)K = 0I «UL I NK( GNI J M)

100 I F {1 oLEo 0 ) GO TO 20000 110 J = 1 , 2I F ( I Q L l S r ( T, J ) oEOo 0 ) GO TO 1.10 K * K + 1FARRAY (K ) = I 0 1 I S T ( I , J )I F { K oGEo MG . OR. K =GT= 2 0 0 ) GO TO 200

110 CONTINUE1 = 1 0 1 1 3 1 ( 1 , 3 )GO TO 100

2 00 CONTINUE RETURN END

c*C* SUBROUTINE ZFRGAT(GNUM)C* I n i t i a l i s e s 9 GNUM * t o z e r o C*

SUBROUTI NE ZERGAT(GNUM)I M P L I C I T I NTEGER ( A - Z )I NCLUDE 9 CO'MPLN, I N C 9

GAT 1 YP( GMUM) = 0 I L I N K ( G N U M ) = 0 Q L I N K ( GNUM) * 0 RETURN END

c*C* SUBROUTINE NXTTNP( G M U M , I , J )C*C * R e t u r n s i n I f, J t he n e x t a v a i l a b l e i n p u t s l o t C* *************************************** ***********

SUBROUTINE NXT I M P ( G M U M , I , J )I M P L I C I T I N T E G E R ( A - Z )I NCLUDE " C n M P L N . l N C 9

I F(GMUM o EQ o 0 ) GQ TO 400 I F ( I L I N K ( G N U M ) , FO• 0) GO TO 310 I = I L I N K ( G N U M )

100 I F ( I oEQo 0 ) GO TO 200 Du 110 K * 1 , 2I F ( I O L I S T ( I , K ) . ME. 0 )G0 TO 110

C FOUND AN EMPTY SLOT

Page 157: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

J - K GO TO 400

110 CONTI NUE i .i A V = I I = I 0 L I S T ( I p 3) .GO TO ICO

. C THE LAST SLOT TO BE CHANGED TO A L I NK?00 I OL 1ST ( IS AV * 3 )' = TONE XT

I = IONEXT IONEXT = I ONEXT + 1 J = 1 GO TO 4 00

C F I RST INPUT TO THE GATE310 I L I N K ( G N U N ) = I ONEXT

I = IONEXT J = 1I ONEXT = I ONEXT * 1

400 CONTINUERETURN END

C*C* SUBROUTINE NXTOUT( G N U I » J )C*C* R e t u r n s i n I S J t h e n e x t a v a i l a b l e OUTPUT s l o tC*C********* **** T *********** t:*-1!6***** ************************ *************

SUBROUTINE NXTOUT( G N U N * I p J )I M P L I C I T T N T E G E R ( A - Z )INCLUDE • COMPLN. I NC*

I F ( GNUM . 5 0 . 0 ) GO TO 4 00I F ( GL I NK I GNUM) . E Q. 0 ) GO TO 320I = u L l N K ( G N U M )

100 I F ( I . EQ. 0 ) GO TO 2 00 DO 110 K = 1 , 2I F ( l UL I S T ( I p K ) . N E . 0 ) G 0 TO 110

C FOUND AN EMPTY SLOT J 3 K GU TO 4 00

110 CONTINUE I SAV = I I = I Q L 1ST( 1 , 3 )GU 10 100

C THE LAST SLOT TO BE CHANGED TO A L I NK200 1 Q L I S T ( I 3 A V , 3) = IONEXT

I = IONEXT

Page 158: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

l ONEXr = I DNEXT + 1 J * 1GO TO 400

G F I RST OUTPUT TO THE GATE 320 OL I NK( GNUH) - TONE XT

3 30 I = I UN EXT J = 1l O N t X T = I ON EXT + 1

400 CONTI NUE RETURN END

C * * ❖ * ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦ ♦C* ‘ 'C* ST3CLU5 CLUNTT STAGE 3 OUTPUT ROUTINE C*

SUBROUTI NE ST3CLU I M P L I C I T I N T E G E R ( A - Z )COMMON/ CLU/ CL UT B( 8 0 » 11 ) » C L U L p CLUP I NCLUDE ' OOMP . I N C*I NCLUDE • CGMPLNo I NC” •I NCLUDE ' G T Y P E . I N C DATA OFI L / 2 2 /

DO 300 1 = 1? CLULI F ( CLUT B ( I ? 1) . N E o 0 ) GO TO 300 1 F ( C L U T 3 ( I ? 4 ) oEO, 0 ) GO TO 10 G A T T YP ( C L U T B ( I ? 4 ) ) = - I CLUTBt i ? 9 ) = 0 GOTO 3CC

10 I F ( C L U T B T 1 , 1 ) oNEo 0) GO TO 300 I F ( C L U T B T I ? 11) oNEo 1 ) GO TO 150 DO 30 J = C L U T B ( I ? 7 ) ? C L U T B ( I ? 8 ) - 1 CALL S E E I N ( J » I G ? 1 )CALL DEL GAT( J )I F T J oNE, C L U T B T I ? ? ) ) GO TO 20 CALL S E T G A T T J ? - l )C L U T B T I ? 4 ) = J

20 CALL A D D I N ( C L U T B T I ? 4 ) ? r G ? l )30 CONTI NUE

DO 40 J = C L U T 8 ( I ? B ) ? C L U T B ( I ? 9 ) - 1 CALL A O D I N T J ? C L U T 9 ( I ? 4 ) ? 1 )

40 CONTINUEC L U T 8 ' ( I ? 7 ) = C L U T B ( I ? 0 ) - 11 F ( C L U T B ( I ? 9 ) o GT o C L U T B T I ? 1 0 ) ) GO TO 50 DO 50 J = C L U T B ( I ? 9 ) , C L U T B T 1 , 1 0 )

Page 159: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

CALL O t L G A T U ) .50 CONTI NUE

' C L U T B ( I # 9 ) * 0 C L U 1 B ( I , 1 0 ) = 0I F ( C L U T B t I # 6) oLEo 0 ) GO TO 100 NN = GLUT 3 ( I p 6 )NI - I

70 N I = N I » 1I F ( C L U T B ( M I , 6 ) = GT » 0 ). NN» NN + CLUTB ( N i p 6 ) 00 80 J*Ip 11 C L U T B ( N I » J ) = 0

8 0 CONTINUE N N = N N - 1I F INN o GT o 0 ) GO TO 70

100 CONTI NUE

150 CONI I NOE00 200 J * C L U T 8 ( I p 7 > p C L U T B ( I p 8 ) - 1CALL SEEGAT ( JpGTpS-YMPTRp A U X P T R p GINp N O U T )CALL B E E I N ( J o IG ?1)I F ( NOUT oEOo 0 ) GO TO 160 CALL S E E O U T ( J p FRMARRpNOUT)00 160 K=I pNOUTCALL ADDTN( -FPMARR(K)p T G p l )

1 60 CONTI NUECALL D E L GA T ( J )

200 CONTI NUE00 250 J = CLUTR( Ip 3 ) p C L U T B t Ip9)-1 C A L L S E E G A T ( J p G T p S Y M P T R »A U X P T R p G I N p N O U T ) I F (G IN oEQo 0) GO TO 210 CALL S E E I N U p I G p I )I F ( N O U T o E 0 o 0) GO TO 210 CALL S E E O U T ( J p F R M A R R p N O U T )DU 210 K = I p NOUTCALL A O D I N ( F R M A R R ( K ) pIGpI)

210 CONTINUECALL D E L GA T ( J )

2 50 CONTI NUE 300 CONTINUE

C------------------------ :------------------------------- --------------------------------------------NGNUM=1OU 310 I * l p G N E X fI F ( G A T T Y P ( I ) oLE= 0 ) GO TO 3 10O L l N K ( I ) = HGNt)MNGNUM*NGNUM+1 ■ “

310 CONTINUE

Du 330 1 = 1 p 10NEXT

Page 160: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

3 30 C —

333

3 35

340345

34b

350

C —

360

C*

C * 370

C*

C*

c*3 85

3 90

I F ( 10L I S f ( T > 1) . G T o 0 ) j : O L I S T ( I p l ) = n i . r N K ( i a L L S T ( I p l i F ( l U L l S T ( I # 2 ) « GT o 0 ) I 0 L I S T ( I # ? ) « 0 L I N K t I 0 L I S T ( I » 2 ) )CONTI NUE

00 350 I =1» C L ULI F ( C L U T B ( I p 9 ) oEO, 0 ) GO TO 350 J » C L U T B ( I # 9 )I F ( G A 1 i Y P ( J ) . I E . 0) GO TO 3 35 CLUTBt I » 9 ) = J GOTO 340 Jaj+lI F ( J . I E . C L U T B C I » 1 0 ) ) GO TO 333CLUTB ( I » 9 ) - 0CLUTBt I j>10 ) = 0GOTO 3 50J = C L U T B ( I v 10 )I F ( G A T T Y P ( J ) . L E. 0 ) GO TO 348 CLUTBt 1 » 1 0 ) = J GOTO 3 50j * j -1GOTO 3 45 ,CONTI NUE

OPEN( UNI T = 2 2> F I L F = 0 C L U N I T . ST 3 0 )^ R I T E t O F I L p 3 6 0 )F O R M A T (» ***** CLUNIT COMPILER STAGE 3 O U T P U T s 0p //p1 « *** -1 := VCC -2 :=■ GNO -4 t = FLO AT11 p//p1 8 R# n a m e LOCAL NAME CLU# USED IN ip1 » TNTERNAL«,/,70('-'))O u t p u t CLUTB t a b l e ,DO 450 I = 1 p CLULF i n a CLU d e f i n e d name.CALL F I ND S Y ( C L U T B ( I p 2 ) p A I p A 2')I F ( CLUTBt I p 3) . E 9 , 0 ) GO' TO 430F i n d CLU d e c l a r e d name.CALL F I N D S Y ( C L U T B ( I p 3 ) p A 3 p A4)i F t C L U T B t I p 1 ) . 2 0 . 0 ) GO TO 400Us ed i n MODULE:.. F i n d MODULE name and STEP f .SI E P = C LUTB ( Ip 5 )CALL F I N D S Y t C L U T B t [ p ! ) p A 5 p A6)C h e c k t o s ee i f i t i s a B L A C K - B O X .I F t C L U T B t I p 4) . NE. 0) GO TO 390*/R I T E t QFI Lp 38 5 ) I , A I p A2p A3p A4p A5p A6p STEP*1 OL INK ( CLUTBt Ip 9 ) ) p OL TNK (CLUTB ( Ip 1.0 ) )FORMAT(Z p I3pIX,?A5 p 2Xp 2A5 p 11X p 2 A 5 p » STEP= 6 p I3p 1 4X, I 3 p 1 - * p 13 )GOTO 450 CONTI NUE

Page 161: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

WR I TE ( O F L l t 398 ) [.» A l * A2p A3, A-W OL I N K ( CL UT 9 ( I ? 8 ) ) p 1 Q L I N K ( C L U T 6 ( I » 7 ) ) » A 5 » A 6 p S T E P

39b F 0 R M A T ( / , T 3 , 1 X , 2 A 5 , 2 X , 2 A 5 , I X , I 3 , » - 0p T 3 p 1 X » 2 6 5 9 ” STEPe Op I T1 A X , «BLACK BOX’ )GOTO A !>0

A 00 CONTINUEC* Us ed i n a n o t h e r CLUNI To F i n d i t s name*

CALL F I N D S Y ( C L U T B ( C L U T 8 ( I » 5 ) » 2 ) p A5 p A6 )C* C h e c k t o see i f i t i s a BLACK- BOXo

I F ( C L U T B ( I , A ) . ME. 0 ) GO TO A10 v # R 1 T E ( 0 F I L p A 0 5 ) I p A 1 p A 2 p A 3 p AAp A5p A6pCLUTBCI . p5 ) p 1 O L I N K t C L U T B (1 , 9 ) ) »O L I N K ( C L U T B ( I p 1 0 ) )

A 0 b F 0 R M A T ( / p I 3 p 1 X » 2 A 5 p 2 X p 2 A 5 p I I X p Z A S p -1 R D W # » e » I 3 p 1 A X , I 3 p » - N 1 3 )GOTO A50

A10 CONTI NUE ■, W R 1 T E ( 0 F I L , A 1 3 ) I , A 1 , A 2 , A 3 p A A p O L I N K ( C L U T B ( I p 8 ) ) 9

1 O L I N K ( CLUTB( 1 9 7 ) ) p A5p A6p C L U T B U p 5 SA i d FORMAT( /p I 3 p 1 X , 2 A 5 p 2 X p 2 A 5 9 I X p 1 3 , 0 - 0p I 3 p I X , 2 4 5 p 0 ROWS = 0PT3p

1 AXp* BLACK B O X ' )GOTO A50

C* N o t u s e d i n MODULE o r a n o t h e r CLUNI To A 30 CONTI NUEC* C h e c k t o see i f i t i s a BLACK- BOXo

I F ( C L U T 8 ( I p A) ,NEo 0 ) GO TO AAOWRITE(OFIL,A3 5 )Ip A 1 p A2 p O L I N K (CLU TB(Ip9 ))p O L I N K (C L U T B (Ip 10))A 35 FORMAT ( / p I 3 p 1 X . p 2 A 5 p A6 Xp I 3p 4 - « , I 3 )

GOTO A 50 A AG CONTINUE

W R I T E ( O F I L , A A b ) I p A I , A 2 p O L I N K ( C L U T 8 ( 1 , 8 ) J p Q l I N K CCLUTB( I , 7 ) )A A 5 FORMAT ( Z p 1 3 , 1 X , 2 A 5 p T A X , 1 3 , 1 - « p I 3 )A 5 0 CONTI NUEC-------------------------------- :-------------------------------------------------------------------------

Du 600 K » 1 p CLULI F( . CLUTB( Kp 1) o F Q <, 0 ) GO TO 6 001 F ( GLUT B ( Kp 9 ) ,E0. , 0 ) GO TO 600CALL H N 0 S Y ( C L U T B ( K p 2 ) p A 1 p A2)W R I T E ( G f l L p A b l ) A 1 p A2

A 51 F OR MA T ( Z / p * * * * CL UN I T " * 9 2 4 5 , * " ELEMENT L I S T : " p Z ,1 » H TYPE' p H X p • INPUT L I S T 1 p Z p 38 ( 0 - 0 ) )I » C L U T 8 ( K p 7) f I N A L « C L U T B ( K p 10) -

Abb CALL SEEGAT( I , GT , SYMPTR, AUXPTRpGI N, NOUT)I F ( G T ) A60p 5 5 0 , 500

A 6 0 CALL S E E I N ( I p F R MA R R p GI N )J = - G TZ = C L U T 8 ( J p 3)I F ( C L u T 8 ( . j , 2 ) o NE = 0 ) Z = CLUT9 ( J , 2 )

by

Page 162: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

470

500

510

5205 30550

6 00

CALL f-INDSY(Z.pAlj>A2)WRI lfc(uFIL» 470)0LINK(CLUT9(J»B))»0LINK(CLUT8(J»7))pA1 p A 2 p 1 (FRMARR<IL)*IL*1>GIN)FORMAT(IXpI3 p » - »p 13»3X p 2 A 5 p 5X p (9(13 p 2X) p / p ?8X))1=CLUTB(J p 7)GOTO 550IF(GIN oEQo 0) GO TO 520 CALL SLFIN(I p FRMARR p GIN)WRITE (OFILp 510) OLINK (I) p GM A P (G T - 3997) p (FRM ARR ( 11) p IL = l.p GT N ) F O R M A T (14p9X»A bp9Xp (9(13»2X)p/p 2BX ))GOT 1 550WRITE( OFIL p 530 ) OLINK ( I ) p GM AP ( GT-3 9.97 )F O R MAT(14 p 9 X p A 6)1 = 1+1IF (I =LEo FINAL ) Gf) TO 455 CONTINUERETURNEND

153

Page 163: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

c*C* I NCLUDE F I L ES C*C **** ************* **9******* ******"**** ************************* ***** C* ALWAYS o INC

CUNHON/ ALWAYS/ VALPNTp SYSTAPp SnTP»REFPp S0RTP» QTA8LPpTOTSPo i PARAMPpARGP ,IFPpFQRP pTHUNKPpPI NTAPp LRTPpPULSEPp SRTPCOMMON / L I M I T S / S D T L T pLRTLTp SR t LT p QT ARLT p SORTLT p TOTSL Tp RF. FLT »1 THUNLTp FORLTp PARALTp ARGLT p SYSTL T p P I N L T p I F L T p P U L S L Tc * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *

C* AUX.INCC0MM0N/ 8 SZ / OSI ZF COMMON STORE( 4 0 0 0 )C*******************************************************************

C* CJMPLNoI NCCOMMON / N E X T / IONEXT.CUMMON/GAFUN/ GNEXT COMMON / L I N K S / I L I N K ( 8 0 0 )CuMhuN / OLMK/ O L I N K ( 8 0 0 )COMMON/ GATDAT/ GATTYPt 8 0 0 )CQMMON/LSTFUN/ IOL IS T O O O O p 3) c******************************** ***********************************

c * PER Mo I NCCOMMON / PERM/ S Y M T B ( 4 p l S 0 ) p SYMPT c*******************************************************************

C* TEMPO oI NCCOMMON / T E M P I / TEMP( 5 , 1 0 0 )COMMON / T E MP 27 PTEM(5 )Q*******************************************************************

C* XB o INCCo m m o n / x b i / s o t COMMON/ X82/ LPT C0 MM0 N/ X83 / SRT COMMON/ X84 / 0TA8LE COMMON/ X85/ SORT COMMON/X37 / TOTS C0MM0N/ X3. 17 / SYSTA8 COMMON/XB1 8 / THUNK C0MMUN/ X31 9 /PARAM C OM MON/ XB20/ ARG COMMON/ X822 / PI NTAB COMMON/ XB23/ PEF COMMON/XB2 4 /FOR COMMON / X 8 2 5 / I F C OMMGN/ XB 2 6 / PUL S F

C * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * C* GTYPE. 1NC

DI MENSI ON GM A P ( 3 6 )DOUBLE PRECI SI ON GMa P- •

154

Page 164: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

DATA GMAP/ 1 PASS 1 5 AND *,1 " D - F F it 1 ’ R u S t S *,1 • EXBUSG1* I ' F N R E G ’ -

1 NANO *AUX1 9 U S E S n « »* E X BU S A • »* C N D 0 -

•WIPE ! p "HR ' » » MEM-EN* j> * BUSES A 1 9 1EX8UST 0, 'ORCS

’XHR «$» "NOR 5 P »MEM-CK',*MEM-JK»P ' RUSE Sf 5 p "EXTNRU’p

o - ' C L U I N 8 pAND NANO

°OFCS »p ” INPUT °p ” EX1 ! JTP«p •CLUOUT »p 8 OR « •

0 OUT PUT 0 p 0 E X BUSE 0 p “ CTEPNS 0 p ®XOR ®7********4:*** *************

C * COM P . I N CD I M E N S I O N A ( 1 0 0 )C O MMO N / C 0 M P 1 / A R G L I S ( 3 » 1 0 0 )C O M M O N / C O M P ? / M I N ( 3)COMMON /COMP 3 / FRMARR( 1 0 0 )C O MMO N / C O M 0 A / V CC p GNO.» C L O C K p F L O A T ? A N D p N A N O p H R p X D R p N O R p 1 O F C S p D F F p A U X p M E M E N p M F M C K p M E M J K p I N P U T S p O U T P U T p1 R U S E S P B U S E S O p R U S E S A » B U S E S T p E X T N P U p E X O U T P p E X B U S E p1 E X B U S O ? E X 9 U S A , E X R U S T p C L U N I T p C L U I p C L U O p C T E R M S p1 F H R E G p C N D p O R C S p C L A N D p C L N A N D p C L O R p C L X O R p P A S S p w i r eE Q U I V A L E N C E ( F A R R A Y p A ) -c * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *c* C O M P D o I N C D A T A V C C p / —I p —2p—3 p —4 /

/4 0 0 1 p 4 0 0 2 p 4 0 0 3 p 4 0 0 4 p

G N D p CLOCK9 f l o a tDATA PASS? W I R E / 3 9 9 8 9 3 9 9 9 /DATA AN Dp NANDp OR? XO-Rp NOR1 4 0 0 5 /DATA DFCSp OFF p AUXp MF.MENp MEMCKp MEMJKp INPUTSpOUTPUTp1 BUSES, RUSESOpRUSES ApBUSESTpEXINPUp EXOUTPpEX8USE pE XRUSOp1 E XBUSApEXBUST/ 4 0 0 6 p 40 0 7 p 4 0 0 8 p 4 0 0 9 p 4 0 1 0 , 4 0 1 1 p 4 0 1 2 p4 0 1 3 p1 4 0 1 4 , 4 0 1 5 , 4 0 1 6 , 4 0 1 7 p4 0 1 8 p 4 0 1 9 p4 0 2 0 p4 0 2 1 p 40 2 2 p1 402 3 /DATA C L U N I T p C L U I , CLUO, CTERMS» FNREGp CND, ORCSp CLANDp1 CLNAND,CLOR, CLXOR / 40 2 4, 4 0 2 5 , 4 0 2 6 , 4 0 2 7 p 4 0 2 3 p 4 0 2 9 p 4 0 3 0 ,1 4 0 3 1 , 4 0 3 2 , 4 0 3 3 , 4 0 3 4 /DATA O L I NE , C L K L I N / 1 , 2 /

Page 165: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

APPENDIX C

RESULT OE EXAMPLE 2 RUN 1

156

Page 166: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

157* * * * * CLUNI T COMPILER STAGE 3 OUTPUT:

* * * - 1 : = VCC - 2 := GND - 4 : = FLOATR* NAME LOCAL NAME CLU# USED IN INTERNAL

1 CL ADD 30 - 87

23'Z’ >7>

LPG 30 - 32 CLADD ROW # = BLACK BOX

3 LSUM 33 - 33 CLADD RGW# = BLACK BOX

4 LPG 34 - 36 CLADD ROW# = BLACK BOX

5 LSUM 37 - 37 CLADD ROW#* 8LAC K BOX

6 LPG 38 - 40 CLADD ROW#* BLACK BOX

7 LSUM 41 - 41 CLADD ROW#* BLACK BOX

3 LPG 42 - 44 CLADD ROW#* BLACK BOX

9 LSUM 45 - 45 CLADD ROW#* BLACK BOX

10 LPG 46 - 48 CLADD ROW#* BLACK BOX

11 LSUM 49 - 49 CLADD ROW#* BLACK BOX

12 LPG 50 - 52 CLADD ROW#* BLACK • BOX1

13 LSUM 53 - 53 CLADD ROW#* BLACK BOX

14 LPG 54 - 56 CLADD ROW#* BLACK BOX

13 LSUM 57 - 57 CLADD ROW#* BLACK BOX

16 LPG 58 - 60 CLADD ROW#* BLACK BOX

17 LSUM 61 - 61 CLADD ROW#* BLACK BOX

18 LPG 62 - 6 4 CLADD ROW#* BLACK BOX

19 LSUM 65 - 65 CLADD ROW#* BLACK BOX

20 LCLA 66 - 70 CLADD ROW#* BLACK BOX

21 LCLA 71 - 75 CLADD ROW#* BLACK BOX

22 LCLA 76 - 80 CLADD ROW#* BLACK BOX

23 LCLA 81 — 85 CLADD ROW.#* BLACK BOX

Page 167: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

158

* * * CLUNIT "CLADD " ELEMENT L I S T ?# TYPE INPUT L I S T

12

CLUI NCLUI N

3 CLUI N4 CLUI N5 CLUI N6 CLUI N

- 7 CLUI N8 C L U I N9 CLUIN

10 CL U I N11 C L UI N12 C L U I N13 CLUI N14 C L U I N15 CLUI N16 CLUI-N17 CLUI N18 CLUI N -

19 C L U I N20 CLUQUT 8721 CLUOUT 6522 CLUQUT • 6123 CLUOUT 5724 CLUOUT 5325 CLUOUT 49

. 26 CLUOUT 4527 CLUOUT 4126 CLUOUT 372 9 CLUOUT 3330 - 32 LPG 9 1 833 - 33 L SUM 30 3134 - 36 LPG 8 173 7 - 37 LSUM 34 353 8 - 40 L PG 7 1641 - 41 LSUM. 38 394 2 - 44 LPG 6 1545 - 45 LSUM 42 43

70

69

6 8 75

Page 168: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

159

4 6 - 48 LPG49 49 L SUM50 ■ — 52 LPG53 - 53 L SUM54 ■ * 56 LPG57 - 57 L SUM58 - 60 LPG61 - 61 LSUM62 - 64 LPG65 - 65 LSUM66 - 70 LCLA71 - 75 LCLA76 - 80 LCLA81 - 85 LCLA86 AND87 OR

4 7 741351 731255 301159 7910.6 3 7 835 31 40 36 32 1947 43 52 48 44 8459 55 64 60 56 8372 67 76 71 66 1982

546

450

354

2581

62395163771936

Page 169: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

APPENDIX D

RESULT OF EXAMPLE 2 RUN 2

160

Page 170: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

161* * * * * CLUNIT COMPILER STAGE 3 OUTPUTS * * * - 1 s= VCC - 2 := GND - 4 s= FLOAT

R# NAME LOCAL NAME CLU# USED I N INTERNAL

1 CLADD 30 - 130

2 PG LPG CLADD ROW# = 1 30 - 32

3 SUM L SUM CLADD ROW# = 1 33 — 36

4 PG LPG CLADD ROW# = ' 1 37 - 39

5 SUM LSUM CLADD ROW# = 1 40 - 43

6 PG LPG CLADD ROW# = 1 44 — 46

7 SUM LSUM CLADD ROW# = 1 47 - 50

8 PG LPG CLADD ROW# = 1 51 - 53

9 SUM LSUM • CLADD ROW# = 1 54 - 57

10 PG LPG CLADD ROW# = 1 58 — 60

11 SUM LSUM CLADD ROW# = 1 61 — 64

12 PG LPG CLADD ROW# - 1 65 — 6 7

13 SUM LSUM CLADD ROW # = 1 68 - 71

14 PG LPG CLADD ROW# = 1 72 - 74

l b SUM LSUM CLADD ROW# = 1 75 - 76

16 PG LPG CLADD ROW# = 1 79 - 81

17 SUM LSUM CLADD ROW# = 1 82 85

18 PG ' LPG CLADD ROW# = 1 86 - 86

19 SUM LSUM CLADD ROW# = 1 89 - 92

20 CLA LCL A CLADD ROW # = 1 93 - 101

21 CL A LCLA CLADD ROW# = 1 102 - ■ 110

22 CLA LCL A CLADD ROW # = 1 111 - • 119

23 CLA LCLA CLADD ROW # = 1 120 - • 1 2 8

Page 171: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

* * * CLUNIT "CLADD " ELEMENT L I S T :• # TYPE INPUT L I S T

1 C L J I N2 CL U I N3 CLUI N4 CLUI N5 CLUI N6 CLUI N7 CLUI N89

CLUI NCLUI N

10 CLUI N11 CLUI N12 CLUI N13 CLUI N14 CLUI N15 CLUI N1 6 CLUI N17 CLUI N18 CLUI N19 CLUI N20 CLUOUT 13021 CLUOUT 9222 CLUOUT 8523 CLUOUT 7824 CLUOUT 7125 CLUOUT 642 6 CLUOUT 57 .27 CLUOUT 5028 CLUOUT 4329 CLUOUT 363 0 XOR 18 931 HAND 3032 AND 18 933 AND 19 3134 • NAND 1935 AND 34 3036 OR 35 3337 XOR 17 838 N AN D 37 .39 AND 17 84 0 AND 101 3 841 NANO 1014 2 AND 41 37

Page 172: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

1634 4 XCR 16 745 NAND 444 6 AND 16 747 AND 99 4548 NAND 9949 AND . 48 4450 OR 49 4751 XGR 15 652 NAND 5153 AND 15 654 AND 1 28 5255 NAND 12856 AND 55 5157 OR 56 5458 X OR 14 559 - N A'N D 5860 AND 14 561 AND 110 5962 NAND 11063 AND 62 5864 OR 63 6165 X OR 13 466 NAND 6567 AND 13 .46 8 AND 1 0 8 6 669 HAND 108 ,

70 AND 69 6571 OR 70 6872 XOR 12 373 NAND 7274 . AND 12 375 AND 126 7376 NANO 12677 AND 76 7278 OR 77 7579 XOR 11 280 NAND ■ 7981 AND 11 282 AND 1 1 9 8 08 3 NANO 11984 AND 83 7985 OR 84 8286 XOR 10 187 NAND 8688 AND 10 189 AND 117 87

Page 173: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

1649 0 NANO 11791 AND 90 8692 OR 91 899 3 AND 3 9 4 494 AND 37 32 4495 OR 94 93 4696 AND 37 30 4497 AND 32 3 798 AND 30 19 3799 OR 98 9 7 39

1 0 0 AND 19 30101 OR 100 32102 AND 60 65103 AND 58 5 3 6 51 04 OR 103 1 0 2 67105 AND 58 51 651 06 AND 53 58107 AND 51 12 8 58108 OR. 107 1 0 6 601 0 9 AND 1 2 8 51110 OR 1 09 5 31 11 AND 81 86112 AND 79 74 8 6113 OR 112 1 1 1 881 14 AND 79 72 86115 AND 74 . 79116 ' AND 72 1 2 6 7 9117 OR 1 16 115 81118 AND 1 2 6 721 19 OR 1 18 7412 0 AND 104 1 1 4121 AND 105 95 1 1412 2 OR 1 21 1 2 0 113123 AND 105 96 1141 24 AND 95 1 0 5125 AND 96 19 105126 OR 125 1 2 4 10412 7 AND 19 9612 8 . OR 127 951 2 9 AND 19 123130 OR 129 1 2 2

Page 174: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

APPENDIX E

RESULT OF EXAMPLE 3

165

Page 175: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

( S O U ; SYMBOL DECLARATION TABLE

ROW# SYMBOL TYPE SUBTY COLS ROWS

1 ROM2 ADOR3 CNT4 READ5 CLOCK6 ABUS7 ■ DBUS8 BUS FN9 DEC

10 INC11 IN12 I13 OUT14 M15 TERM16 MM17 AA18 R19 C20 BUS OUT21 CC22 . N23 X24 125 Y26 J

0 4 160 4 10 3 10 1 10 1 10 4 10 4 11 4 12 16 13 3 10 I 10 0 00 1 10 0 00 0 00 1 10 1 10 0 00 0 00 1 10 1 10 0 00 1 10 0 00 1 10 0 0

1251251.2 51.2 3123122122151151151681253682006816812532536 8 268 506812536820

CTUN R TUN °NTR P I N UNUS

0 00 00 00 00 00 00 00 00 00 04 00 08 00 00 0

24 262 8 0

0 00 0

30 032 34

0 0104 0

0 0106 0

0 0

00000000000000000000000000

10016416817117217317718113 52010000000000000000

OOOOOOOOOOOOO ooooooooooooo

Page 176: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

* * * * * CLUNIT COMPILER VIRTUAL W I R E ! 1ST OUTPUTS

* * * - 1 s = VCC - 2 s= GND - 4 := FLOAT

R# NAME LOCAL NAME USED IN INPUT OUTPUT INT

1 DECODER DEC READOM

2 BUSFUNC 3USFN READOM

3 I NCR INC READOM

* * * * *

EL EM #

ELEMENTS L I S T

EL EM TYPE

* * * * *

IN - OUT L I S T

236 CLUIN INPUT s 164OUTPUT? 259 268

274 275237 CLUI N INPUT s 165

OUTPUTS 258 264274 275

238 CLUI N INPUT s 1 6 6OUTPUT! 2 5 7 262

274 2752 39 CLUIN INPUT s 167

OUTPUTS 2 5 6 2 612 73 275

240 CLUOUT INPUT s 2 60OUTPUTS 3 4 0

241 . CLUOUT INPUT : 261OUTPUTS 3 41

242 CLUOUT INPUT s 2 62OUTPUTS 3 42

243 CLUOUT INPUT s 2 63OUTPUT: 3 43

244 CLUOUT INPUT : 2 64OUTPUT: 3 44 .

245 CLUOUT INPUT : 2 65 'OUTPUTs 345

2 46 CLUOUT INPUT s 2 66OUTPUT: 346

247 CLUOUT INPUT s 2 6 7OUTPUTS 3 4 7

248 CLUOUT INPUT $ 2 68OUTPUT: 348

STEP38 2 236 - 239 240 - 255 2 5 6

STEP38 9 276 - 35 5 356 - 359 3 6 0

STEP = 2 543 - 550 551 - 553 554

269 270 271 272 273

265 266 267 272 2 73

263 266 267 270 271

2 63 265 267 269 271

Page 177: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

249 CLUDUT INPUTOUTPUT

26 9 3 49

250 CLUOUT INPUTOUTPUT

2 70350

251 CLUDUT INPUTOUTPUT

271351

252 CLUDUT INPUTOUTPUT

2723 52

253 CLUDUT INPUTOUTPUT

2 733 53

254 CLUOUT INPUTOUTPUT

2 743 54

255 CLUOUT INPUTOUTPUT

2 75 35 5

256 NANO INPUT 2 39OUTPUT 2 60

2 74262 264

2 57 NANO INPUT :: 2 36OUTPUTi : 2 60

2 732 61 264

258 NANO INPUT i: 2 3 7OUT PUT': 2 60

271261 262

259 NANO INPUT !: 236OUTPUT:: 2 6 0 '

2 6 7261 262

260 AND INPUTOUTPUT

2 592 40

258 257

261 AND INPUTOUTPUT

2 59241

258 257

262 AND INPUTOUTPUT

259242

258 238

263 AND INPUTOUTPUT

2 59243

258 238

264 AND INPUTOUTPUT

2 59 244

2 37 2 57

265 AND INPUTOUTPUT

2 592 45

237 2 57

2b6 AND INPUTOUTPUT

259246

2 37 238

267 AND INPUT.OUTPUT

2 5 92 4 7

237 238

268 AND INPUTOUTPUT

2 36248

258 2 57

2 69 AND INPUTOUTPUT

2 36 2 49

258 2 57

2 70 AND INPUTOUTPUT

2 362 50

258 238

271 AND INPUTOUTPUT

2 36251

258 238

266 268 270 272

265 268 269 272

263 263 269 2 70

263 264 265 2 66

2 56

239

256 -

2 3 9

2 56

239

256

239

256

239

256

239 168

Page 178: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

272 ' AND INPUTO U T P U T27 3 AND I N P U T ' O U T P U T274 A ND IN PU TO U T P U T275 AND IN PU TO U T P U T276 C LU IN IN PU TO U T P U T277 C L U I N IN PU TO U T P U T276 C L U I N INPUTO U T P U T2 79 C L U I N IN P U TO U T P U T280 C L U I N INPUTO U T P U T281 C L U I N I N P U TO U T P U T282 C L U I N IN PU TO U T P U T2 83 C L U I N IN PU TO U T P U T284 C L U I N INPU TO U T P U T285 C L U I N IN P U TO U T P U T266 C L U I N INPU TO U T P U T287 C L U I N IN P U TO U T P U T288 C L U I N IN PU TO U T P U T289 C L U I N I N P U TO U T P U T290 C L U I N IN PU TO U T P U T291 C L U I N I N P U TO U T P U T292 C L U I N INPUTO U T P U T293 C L UIM IN P U TO U T P U T294 C L U I N INPUTO U T P U T29 5 C L U I N IN PU TO U T P U T296 C L U I N INPUTO U T P U T

2 3 6 237 2572 5 22 3 6 2 37 2572 532 3 6 2 3 7 2 382 542 3 6 23 7 2 382 551 0 04 2 41014 2 51024 2 61034 2 710 44 2 81 054 2 91 0 64 3 01074 311 084 3 61094 371 1 043 81114 391124 4 41 134 451144 461 154 471 164 521 1 745 31184 5 41194 5 51 204 6 0

256"2392 56239

169

Page 179: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

297 CLUIN INPUT 121OUTPUT 4 61

298 CLUINI INPUT 122OUTPUT 462

299 CLUIM INPUT 123OUTPUT 463

300 CLUIN INPUT 124OUTPUT 4 6 8

301 CLUIN i N P u r 125OUTPUT 4 69

302 CLUIN INPUT 126OUTPUT 4 7 0

30 3 CLUIN INPUT 1 2 7OUTPUT 471

304 CLUIN INPUT 128OUTPUT 4 7 6

305 CLUIN INPUT 129OUTPUT 4 77

306 CLUIN INPUT 130OUTPUT 4 7 8

307 CLUIN INPUT 131OUTPUT 479

308 CLUIN INPUT 132OUTPUT 4 84

309 CLUIN INPUT 133OUTPUT 4 85

310 CLUIN INPUT 134o u r p u t 4 86

311 CLUIN INPUT 135OUTPUT 4 8 7

312 CLUIN INPUT 136OUTPUT 4 9 2

313 CLUIN INPUT 1 3 7OUTPUT 493

314 CLUIN INPUT 138OUTPUT 49 4

315 CLUIM INPUT 139OUTPUT 495

316 CLUIN INPUT 1 40OUTPUT 5 00

317 CLUIN INPUT 141o u r PUT 5 01

318 CLUIN INPUT 142OUT PUT 502

319 CLUIN INPUT 143OUTPUT 503

320 CLUIN INPUT 144OUTPUT 508

321 CLUIN INPUT 1 45OUTPUT 509

170

Page 180: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

322 'C LU IN INPUT 146OUT PUT 5 1 0

32 3 CLUIN INPUT 147OUTPUT 511

324 CLUI-M INPUT 148OUTPUT 516

325 CLUIN INPUT 149OUTPUT 517

326 CLUI N INPUT 150OUTPUT 518

3 27 CLUIN INPUT 151OUTPUT 519

3 28 CLUIN INPUT 152OUTPUT 524

329 CLUIN INPUT 1 5 3OUTPUT 5 25

3 30 CLUIN INPUT 154OUTPUT 526

331 CLUIN INPUT 155OUTPUT 5 27

332 CLUIN INPUT 1 56OUTPUT 532

3 33 CLUIN INPUT 157OUTPUT 5 3 3

334 CLUIN INPUT 158OUTPUT 534

335 CLUIN INPUT 159OUTPUT 5 35

336 CLUIN INPUT 160OUTPUT 5 40

337 CLUIN INPUT 161OUTPUT 5 41

338 CLUIN INPUT 162OUTPUT 5 42

'3 39 CLUIN INPUT 1 63OUTPUT 543

340 CLUIN INPUT 2 40OUTPUT 4 24 425 426

341 CLUIN INPUT 2 41OUTPUT 428 4 29 430

342 CLUIN INPUT 2 42OUTPUT 4 36 4 37 438

343 CLUIN INPUT 2 43OUTPUT 4 44 445 446

344 CLUIN INPUT 244OUTPUT 4 52 453 454

345 CLUIN INPUT 245OUTPUT 4 60 461 462

346 CLUIN INPUT 2 46OUTPUT 4 68 469 470

427 4 31

439

447

455

463

471

Page 181: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

347 CLUIN INPUT 247OUTPUT 476 477

348 CLUIN INPUT 248OUTPUT 484 485

349 CLUIN INPUT 249OUTPUT 492 493

350 CLUIN INPUT 250 ,OUTPUT 500 501

351 CLUIN INPUT 251OUTPUT 5 08 509

352 CLUIN INPUT , 252OUTPUT 516 517

353 CLUIN INPUT 253OUTPUT 524 525

354 CLUIN INPUT 254OUTPUT 532 533

355 CLUIN INPUT 255OUTPUT 5 40 541

356 CLUOUT INPUT 544357 CLUUUT INPUT 545358 CLUOUT INPUT 546359 CLUOUT INPUT 547424 AND INPUT 3 40 276

OUTPUT 432425 AND INPUT 340 277

OUTPUT 433426 AND INPUT 340 278

OUTPUT 434427 AND INPUT 340 2 79

OUTPUT 435428 AND INPUT 3 41 280

OUTPUT 4324 29 AND INPUT 341 .281

OUTPUT 433430 AND INPUT 341 2 82

OUTPUT 434431 AND INPUT 341 28 3

OUTPUT 4354 32 OR INPUT 424 4 28

OUTPUT 440433 OR INPUT 4 2 5 429

OUTPUT 441434 OR INPUT 426 430

OUTPUT 442435 OR INPUT 427 4 31

OUTPUT 4434 36 AND INPUT 342 284

OUTPUT 44043 7 AND INPUT 342 2R5

OUTPUT 441

478 479

486 487

494 495

502 503

510 511

,518 519

526 527

5 34 5 35

542 543

172

Page 182: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

43b AMO INPUT s 342 2 86OUTPUTS 4 42

439 AMD INRUT : 3 42 237OUTPUT? 4 4 3

4 40 DR INPUT s 4 3 2 4 36OUTPUT? 4 48

441 HR INPUT : 433 4 37OUTPUTS 4 4 9.

442 OR INPUT s 4 34 438OUTPUTS 4 50

443 DR INPUT S 4 35 439OUTPUTS 4 51

444 AND INPUT s 3 43 238OUTPUT s 4 48

445 AND INPUT s 343 289OUTPUTS 4 4 9

446 AND INPUT s 343 290OUTPUTS 4 5 0

447 AND INPUT s 3 43 2 91OUTPUTS 4 51

448 OR INPUT s, 4 4 0 444OUTPUTS 4 5 6

449 OR INPUT s 4 41 445OUTPUTS 4 5 7

450 OR INPUT s 4 4 2 4 46OUTPUTS 458

451 OR INPUT s 443 447OUTPUTS 459

452 AND INPUT s 344 292OUTPUTS 4 5 6

453 AND INPUT s 3 44 293OUTPUTS 4 5 7

454 AND INPUT s 344 294OUTPUTS 4 58

455 AND INPUT s 3 44 295OUTPUTS 459

456 OR INPUT 8 448 4 52OUTPUTS 4 6 4

4 5.7 OR INPUT : 4 49 453OUTPUTS 465

4 58 OR INPUT s 4 50 454OUTPUTS 4 66

459 OR INPUT ■ s 4 51 455OUTPUTS 4 67

460 AND INPUT s 3 45 296OUTPUTS 4 6 4

461 AND INPUT S 3 45 2 97OUTPUTS 465

462 AND INPUT s 3 45 2.98OUTPUTS 4 6 6

173

Page 183: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

463 AMD INPUT ; 3 45 299OUTPUT: 4 67

464 OR INPUT : 4 56 460OUTPUT 4 7 2

465 OR INPUT : 4 5 7 461OUTPUT: 4 73

466 OR INPUT : 4 5 8 4 62OUTPUT: 474

467 OR INPUT : 4 59 4 63OUTPUT: 4 7 5

468 AND INPUT : 346 300, OUTPUT: 4 72469 AND INPUT s 346 3 01

OUTPUT: 4 73470 AND INPUT i 3 4 6 302

OUTPUT: 474471 AND INPUT : 3 4 6 303

' OUTPUT: 4 754 72 OR INPUT : 4 6 4 468

OUTPUT: 4 8 0473 OR INPUT : 4 65 4 69

OUTPUT: 481474 OR INPUT : 4 66 4 70

OUTPUT: 4 82475 OR INPUT : 4 67 471

OUTPUT: 483476 AND INPUT : 3 47 304

OUTPUT: 480477 AND INPUT : 34 7 305

OUTPUT: 4 81478 AND INPUT : 3 4 7 3 0 6

OUTPUT: 482479 AND INPUT : 3 47 307

OUTPUT: 4 834 80 OR INPUT : 4 72 476

OUTPUT: 488481 OR INPUT : 4 7 3 477

OUTPUT: 4 8 94 82 OR INPUT : 474 478

OUTPUT: 4 9 0483 OR INPUT : 4 75 4 79

OUT PUT: 4 91484 AND INPUT : 3 4 8 308

OUTPUT: 4 8848 5 AND INPUT : 348 309

OUTPUT: 4 8 9486 AND INPUT : 3 4 8 310

OUTPUT: 4 90487 AND INPUT : 348 311

OUTPUT: 4 91

174

Page 184: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

48b OR INPUT 4 80 484OUTPUT 496

489 OR INPUT 4 81 485OUTPUT 4 9 7

490 OR INPUT 4 82 4 86OUTPUT 498

491 OR INPUT 483 487OUTPUT 4 9 9

492 AMD INPUT 349 312OUTPUT 4 96

493 AND INPUT 3 49 313OUTPUT 4 97

494 AND INPUT 349 314OUTPUT 4 98

495 AND INPUT 3 49 315OUTPUT 4 9 9

496 OR INPUT 488 49 2OUTPUT 504

497 . OR INPUT 4 89 493OUTPUT 505

498 OR INPUT 4 9 0 494OUTPUT 5 0 6

4 99 OR INPUT 491 495OUTPUT 5 07

500 AND INPUT 3 50 316OUTPUT 504

501 AND INPUT 3 50 31 7OUTPUT 505

5 02 AND INPUT 3 50 318OUTPUT 5 06

503 AND . INPUT 3 50 319OUTPUT 5 07

5 04 OR INPUT 4 9 6 500OUTPUT 512

5 05 OR INPUT 4 9 7 501OUTPUT 513

506 ' OR INPUT 498 5 02OUTPUT 514

507 OR INPUT 4 9 9 503OUTPUT 515

508 AND INPUT 3 51 320OUTPUT 5 12

509 AND INPUT 351 321OUTPUT 5 13

510 AND INPUT 351 322OUTPUT 5 14

511 AND INPUT 351 323OUTPUT 5 15

512 OR INPUT 5 04 508OUTPUT 5 20

175

Page 185: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

513 OR INPUT 505 509OUTPUT 521

a ! 4 OR INPUT 5 06 510OUTPUT 522

y 15 OR INPUT 507 511OUTPUT 523

516 AND INPUT 352 324OUTPUT 520

517 AND INPUT 352 3 25OUTPUT 521

518 AND INPUT 352 3 2 6OUTPUT 522

519 AND INPUT 352 3 27OUTPUT 5 23

520 OR INPUT 512 516OUTPUT 528

521 OR INPUT 5 13 517OUTPUT 529

522 OR INPUT 5 14 518OUTPUT 530

523 OR INPUT 515 519nUT°UT 531

524 AND INPUT 3 53 328OUTPUT 5 28

525 AND INPUT 353 3 29OUTPUT 529

526 AND INPUT 353 330OUTPUT 530

527 AND INPUT 353 331OUTPUT 531

528 OR INPUT 520 524OUTPUT 536

529 OR INPUT 521 525OUTPUT 5 37

530 OR INPUT 5 22 526OUTPUT 5 38

531 OR INPUT 523 5 27OUTPUT 5 39

532 AND . INPUT 354 332OUTPUT 536

5 33 AND INPUT 354 333OUTPUT 537

5 34 AND INPUT 354 3 34OUTPUT 5 38

535 AND INPUT 354 335OUTPUT 5 39

5 36 UR INPUT 5 28 532OUT°UT 544

5 37 OR INPUT 5 29 533OUTPUT 545

Page 186: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

538 HR

539 HR

540 AND

541 AND

54Z AND

543 AND

544 HR

5 45 OR

546 OR

547 OR

548 CLUIH

549 CLUIN

550 CLUIN

5 51 CLUOUT552 CLUOUT553 CLUOUT554 NANO

5.56 XOR

557 AND

558 XOR

INPUT 5 30 534OUTPUT 546INPUT 531 535OUTPUT 5 47INPUT 355 336OUTPUT 544INPUT 355 337OUTPUT 545INPUT 3 55 - 338OUTPUT 5 46INPUT 355 339OUTPUT 5 47INPUT 536 540OUTPUT 356INPUT 5 37 5 41OUTPUT 3 57INPUT 538 542OUTPUT 3 5 8INPUT 539 5 43OUTPUT 359INPUT 168OUTPUT ■ 5 58INPUT 169OUTPUT 556 5 57INPUT 170OUTPUT 554 5 56INPUT 558INPUT 556INPUT 554INPUT 5 5 0OUTPUT 553INPUT 5 50 549OUTPUT 552INPUT 549 550OUTPUT 558INPUT 5 57 548OUTPUT 551

557

177

Page 187: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

LIST OF REFERENCES

Chu. Y. H. "Why Do We Need Hardware Languages?M. Computer. Dec. 1974, pp. 18-22.

Hill, F. J. and G. R. Peterson, Digital Systems: Hardware Organization and Design, John Wiley and Sons, Inc. 2nd Edition, 1978.

Hill, F. J. and G. R. Peterson, Introduction to Switching Theory and Logic Design. John Wiley and Sons, Inc. 3rd Edition, 1981.

Masud, M. "Module Implementation of A Digital Hardware Design Automation System", unpublished Doctor's Dissertation, The University of Arizona.

Navabi, Z. and F. J. Hill, "System Manual for AHPL Simula­tor (HPSIM2)", Design Language Research Memo 005, Department of Electrical Engineering, The Univer­sity of Arizona, June 1979.

Swanson, R. E. "Extensions of AHPL and Optimization of the AHPL Compiler for MSI/LSI Design", Ph.D. Disserta­tion, The University of Arizona, May 1978.

"Listing: Compiler for Universal AHPL CLUNITS", unpublished Design Language Research Memo 009, Department of Electrical Engineering, The University of Arizona.

178

Page 188: COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL ...arizona.openrepository.com/arizona/bitstream/10150/557625/1/...141.pdf · COMPILATION OP COMBINATIONAL LOGIC UNITS FOR UNIVERSAL

■T*