Software tools for microcode generation of the Am29300 series

Software tools for microcode generation of the Am29300 series

Software tools for microcode generation of the Am29300 series The major functional modules of the MetaStep Plus system are described by Abdullah Warda...

344KB Sizes 0 Downloads 29 Views

Software tools for microcode generation of the Am29300 series The major functional modules of the MetaStep Plus system are described by Abdullah Wardak and R l Rhodes together with the relevant commands and their usage for each of the system's processors

The major functional modules of the MetaStep Plus system are described and the relevant commands and their usage for each of the MetaStep processors are explained. An application example is given and all the source files and commands required for the Am29325 floating-point processor are presented. The generated microcode has been used in developing the software for an Am29300 microprogrammable computer board, which has been applied to the speeding up of highly repetitive portions of the programs in three-dimensional image generation. MetaStep Plus generation

generatedmicrocode

three-dimensional image

Inherently, microinstructions are binary and often a single-bit controls a single-enable-line; therefore, it would be a tedious and difficult process to write them manually from the related data sheets. To ease this task, some software tools are required to generate the microcodes. As more supporting facilities are provided, the design process improves significantly and the possibility of making mistakes is reduced. In general, it is far easier to support a fixed architecture/ fixed instruction set device compared with a microprogrammable one. This is due to the fact that for the latter group, the architecture is not fixed and it is not possible to predefine a compiler or assembler for the system. A separate compiler or assembler has to be developed for each specific processor architecture. In this paper, the major functional modules of the MetaStep Plus system are described and the required source files for the Am29325 floating-point processor, a member of the Am29300 family, are presented. The

required commands and their usage for each of the functional modules are outlined.

METASTEP PLUS SYSTEM OVERVIEW The microcode development process comprises three phases: the definition phase, where the instruction format and the language structure of the target machine are defined; the programming phase, where the microcode is written; and the verification phase, where the microcode is tested and corrected 1. Step Engineering offers a set of powerful development tools for the design and development of microprogram based systems, especially for the Am29300 family series1-4. The task of developing microcode is greatly simplified by the MetaStep Plus, Step Engineering's retargetable, relocatable, and macro driven microassembler. The major functional groups of the MetaStep Plus system are as follows: • • • • •

MetaStep MetaStep MetaStep MetaStep MetaStep cessor.

Plus Definition (MD) Processor, Plus Assembler (MA) Processor, Plus Linker (ML) Processor, Plus Format (MF) Processor, Plus User Defined Symbolic (UDS) Pro-

These software tools solve the problem of predefining a compiler or assembler for the system, by allowing the hardware configuration to be described in a file, called definition file. Then, based on this file, the microcode is generated for any bit-slice architecture 3, s, 7

MetaStep Plus Definition Processor Department of ElectricalEngineering,Universityof Bradford, Bradford, West Yorkshire,BD7 1DP, UK Paperreceived:19 March 1991. Revised:29 May 1991

The MetaStep Plus Definition (MD) Processor accepts the definition source file (.mdl) as input, which contains the

0141-9331/91/090489-04 © 1991 Butterworth-Heinemann Ltd Vol 15 No 9 November 1991

489

MD Processor source statements, describing the target system architecture and development environment. The M D Processor translates the description of the definition file into an internal form, and generates an internal definition file (.def). It generates a macro file (.mac), if macros are declared in the definition file Similarly, when the -le option is used, the file (.lis) i~ generated. The output files (.def, .mac and .lis) have the same names and are either named MetaStep by default. or user determined by giving the option, -d to lhe MD Processor. A standard MD Processor definition source file has the following format: < Instruction Definition.> end lnstruction; <::Macro and other Definitions> endDefinition statement; The general form of invocation of the MD Processor is as follows: mmd ~optionsl

for PC XT/AT versions

where options are the options to the MD ProcessoL which must be specified in lower case, and source names the MD Processor definition source file. Some of th,~ options are: -d NAME: sets the name of the M D Processor definition and macro output files to NAME.def and NAME.mac, respectively. If the -d option is used at the invocation time, then it must be used at assembly, link and extraction times, to name the two (.def and .mac) output files. The option, -d NAME, will have the same effects on all the processors. -le: directs the error messages to the terminal and to the listing file. The complete list of the options to all the MetaStep Plus Processors are contained in Reference 2.

MetaStep Plus Assembler Processor The MetaStep Plus Assembler (MA) Processor accepts as input the output of the MD Processor (.def and .mac files) plus the MA Processor source file (.mal). It translates the source file and generates an internal relocatable object version of the source code (.ob). A second file (.lis) is generated, if the option -le is used. The names of these output files are the same as the source file. The basic format for the .mal file is as follows. segment l,abs( I l,commoni end; The general form of invocation of the MA Processor ~s as follows: ma/optionst where options are the options to the MA Processor, and source names the source file. Some of the options are: -le: directs e,ror messages to the terminal and to the listing file. -Ic: directs the MA Processor to generate a list of binary code following each microinstruction. -I NAME: directs the MA Processor to send any listing to the file, named NAME.lis.

490

MetaStep Plus Linker Processor The Met&Step Plus i_inke~ !.: ~, mM ma(:)pIodu{{~i by th~P MD Pr(>ce~.~o~ Th{, Nil_ Pro~.essor produce-.~ ~[~Prr~ai torn; abP,(liLllt' , {~t{, i ii~- Labs) a~ output. Thi~ t:i{,- h{~s the ~arm ~ name, .~s

m; ~plionsl <(ommandFile where options are the options h~ ',he ML Pro(essol su(h as k , and commandFile na~,.~,, the ML Pro(ess()~ ,, ( ) m m a r u J

H[~ ~

MetaStep Plus Format Processor The MetaStep Plus Fornqat (MF) Processor takes the absolute object file (.abs) and uses the internal form definition file (.def), that must have been produced by the MD Processor. Hence, the MF Processor generates: a .bin file that contains the binary code; an .obj file that contain~ the microcode in an ASCII hexadecimal format; a .sym file that contains the user's global labels and their respective addresses in the source file; and a .bug file that contains the user's source code interleaved with the corresponding address and hexadecimal microcode. The general form of invocation of the MF Processor is mf ',options'~ where options are the options io the MF Processor and absoluteFile names the absolute file (.abs). The options: -hh, -ho, and -ht cause the (.bin, .ob, and .sym) files to be produced. Their names are either the name of the absolute file or the name provided by the -o option.

APPLICATION EXAMPLE In the following sections, it is intended to provide a user with the formats and the contents of the input files plus the relevant commands, which are required to generate the microcode for a particular bit-slice architecture. As an example, all the necessary source files, the commands and their usage are presented for the Am29325 floatingpoint processor. (a) The definition source file for the Am29325 floatingpoint processor (Am29325.mdl) is presented as follows: am29325:

instruction length (16); include 'am2932S.md' endlnstruction; include 'am29325.mc' endDefinition;

M i c r o p r o ( essors a n d Mi~ rosystem~

The include file, Am29325.md, which always starts with a semicolon and describes the architecture of the target system (Am29325 FPP), is as follows:

where mmd is the MD Processor command, which generates three output files: (zabak.def, zabak.mac and Am29325.1is). For debugging purposes, the file (Am29325.lis) should be used.

enr:

(b) In this step, the formatter command is applied as follows:

length

(i), values (0 : LOAD, default (NOP);

1 : NOP),

mu -d zabak ens:

enf:

length

(i), values (0 : LOAD, default (NOP);

The successful execution of the above command will generate an output file, zabak.uds.

1 : NOP),

length

(I), values (0 : LOAD, default (NOP);

R select:

S select:

Am29325:

(c) In this step, the MA Processor source file (Am29325.mal), which contains the user generated source code and statements, is given below:

1 : NOP),

length

(i), values (0 : BUS, default (BUS);

1 : F-Reg), s e g m e n t main;

(i), values (0 : S-Reg, default (S-Reg;

l o a d r BUS; l o a d r F-Reg; loads; loadf;

length

length

1 : F-Reg),

(3), values

(0 : PLUS, 1 : MINUS, 2 : MUL, 3 : 2MINUS, 4 : FLOAT, 5 : INT, 6 : DEC, 7 : IEEE), default (0); round:

length

loadr F-Reg, fpu fpu fpu fpu fpu fpu fpu fpu

(2), values

(0 : NEAREST, 1 : DOWN, 2 : UP, 3 : ZERO), default (NEAREST);

macro

macro

macro

loadr begin R endm;

&src; select

loads; begin ens endm; loadf; begin enf endm;

=

loadf;

S-Reg; S-Reg; S-Reg; S-Reg; F-Reg; F-Reg; F-Reg; F-Reg;

fcvrt INT; fcvrt IEEE; fcvrt FLOAT; fcvrt DEC;

Similarly, the include file, Am29325.mc, which describes the target system environment by specifying constraints, macros, and processing limits, is given below: macro

PLUS MINUS MUL 2MINUS PLUS MINUS MUL 2MINUS

loads,

loadf, fcvrt INT ; loadf, fcvrt DEC ; l o a d r F-Reg, loads,

loadf,

fpu PLUS S-Reg;

end;

The MA Processor command is applied to execute the source file (Am29325.mal) as follows: &src,

enr

= LOAD

ma -d zabak am29325 -le -Ic -I sdlist Then two files (Am29325.ob and sdlist.lis) are generated and the output file, sdlist.lis, which will have the generated microcode is shown below:

= LOAD

line

1 2 segment main; 3 3 loadr BUS; 000000: XXXXXX0000000110

= LOAD

fpu &op &s; begin Am29325 endm;

4 4

=

instruction field

&op,

S

select

=

&s

loadr

F-Reg;

000001: xxxxxx0000001110 5 5 loads ; 000002: xxxxxx0000000101 6

macro

fcvrt &op; begin Am29325 endm;

=

&op

The command to execute the Am29325.mdl file is as: mmd -d zabak am29325 -le

Vol 15 N o 9 N o v e m b e r 1991

6 loadf ; 000003: xxxxxx0000000011 7 8

8 000004:

loadr F-Reg, loads, loadf; xxxxxx0000001000

9

10 i0 fpu PLUS S-Reg; 000005: xxxxxx0000000111

491

11 ii fpu MINUS S-Reg; 000006: xxxxxx0000100111 12 12 fpu MUL S-Reg; 000007: xxxxxx0001000111 13 13 fpu 2MINUS S-Reg; 000008: xxxxxx0001100111 14 14 fpu PLUS F-Reg; 000009: xxxxxx0000010111 15 15 fpu MINUS F-Reg; 00000a: xxxxxx0000110111 16 16 fpu MUL F-Reg; 00000b: xxxxxx0001010111 17 17 fpu 2MINUS F-Reg; 00000c: xxxxxx0001110111 18 19 19 fcvrt INT; 00000d: xxxxxx0010100111 20 20 fcvrt IEEE; 00000e: xxxxxx0011100111 21 21 fcvrt FLOAT; 00000f: xxxxxx0010000111 22 22 fcvrt DEC; 000010: xxxxxx0011000111 23 24 24 loadf, fcvrt INT ; 000011: xxxxxx0010100011 25 26 26 loadf, fcvrt DEC ; 000012: xxxxxx0011000011 27 28 28 loadr F-Reg, loads, loadf, 000013: xxxxxx0000001000 29 3O 30 end;

CONCLUSION The software tools, employed t~ generate the required microcode for a particular bit-sli~e architecture are pre ~ented The formats, contents, and description of the so~c:e files plus the relevant commands for each of the, MetaStep Processors are explained in detail. A~3 appli(at:ion example is given and all the commands are exe(:ule{~ ~(~t the Am29 .~25 floating-point t:);{)cessor. The generate~i microcode (m file sdlist.lis) has been used i~ developing, the software l()r the Am29300 mi(roprogrammable con~ purer board. For maximum efficiency and speed, MetaStep

PhJs should be run on the hard dis< drive, with a minimtm: base rnemo~y size of 640k.

REFERENCES ! Wilburn, D 'Step engineering: Step development system' S I G M I C R O N e w s l e t t e r Vol 20 No 2 (Jun~~ 1989) pp 19-25 2 'l-he MetaStep Plus Language System Vrogrammmg Manual' Revision 3.0, Step Engineering, Inc (May ! 988) Bailey, B 'Microprogrammmg: [he fast track to high performance' Electron. Engng/imes (March 17, 1986) 4 ~,2-Bit Microprogrammable Products Am29c300/ 29300', Data Book 1988, Chapter 5. Advanced Micro Devices

fpu PLUS S-Reg;

(d) In this step, the ML Processor source file (Am29325.ml), which contains directives that control its operation is presented as follows: place main; load am29325; end;

!, Power, V M and Jose, H H 'Microprogram assemblers tot bit-slice microprocessor~' !EEE Computer Vol 1! No 7 (July 1978) pp 108-120 6 Skordalakis, E 'Meta-assembler' IEEEMicro Vol 3 Ne 2 (April 1983) pp 6-16 7 Eager, M J 'M29-An advanced retargetable micro (ode assembler' ACM SIGMICRO Newsletter Vol 14 No 4 (December 1983) pp 92=100 Abdullah Wardak was a lecturer at the University, of Kabul, Afghanistan, ~rom 1978 to 198~, where he received his BS( in EJectrica( b~gineering and Electroni(s in 1978 He received his MSc i;~ Electronic Control DTgineering from Salford University, UK, in t 986. He is currently carrying out research in ~l) image generation leading to a i PhD. His field ot interest is 3D image generation in real-time and P,~ic,,oprogramming~

The execution command for the above file is: ml -d zabak am29325 -le After executing the above command, the two files (am29325.abs, and am29325.1is) are generated. (e) In the final step, the command of the MF Processor is applied as follows: mf -d zabak am29325 -ho -hh -ht As a result of the above command, three files (am29325.sym, am2932S.bin and am29325.obj) are generated.

492

Rodney Rhodes graduated from Bradford University in l!m ~ and after a short period in industry, returned ,~s a lecturer where he has remained to the, present time. He has been working in the mi( ropro( essor field since 197(; and jointly started the firstmonthly course,oP, microprocessors k~r industrial users, in ~he country. For the f)ast 12 years he has been an active consultant to a number of firms, particularly in the area of video displays. His current research interests include the real-time generation of three~ dimensional images, three-dimensional obiect recognition and analysis and processing of musical sounds,

Microprocessors

and

Microsystems