CN101923466A - Access method of decorator mode order - Google Patents

Access method of decorator mode order Download PDF

Info

Publication number
CN101923466A
CN101923466A CN2010102374504A CN201010237450A CN101923466A CN 101923466 A CN101923466 A CN 101923466A CN 2010102374504 A CN2010102374504 A CN 2010102374504A CN 201010237450 A CN201010237450 A CN 201010237450A CN 101923466 A CN101923466 A CN 101923466A
Authority
CN
China
Prior art keywords
decorator
instruction
class
action
adl
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2010102374504A
Other languages
Chinese (zh)
Other versions
CN101923466B (en
Inventor
董渊
王生原
曹震
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tsinghua University
Original Assignee
Tsinghua University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tsinghua University filed Critical Tsinghua University
Priority to CN201010237450.4A priority Critical patent/CN101923466B/en
Publication of CN101923466A publication Critical patent/CN101923466A/en
Application granted granted Critical
Publication of CN101923466B publication Critical patent/CN101923466B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

The invention discloses an access method of a decorator mode order, belonging to the technical field of system architecture description language ADL. The access method is characterized in that an object machine is provided with an ADL description file and an ADL analysis program, wherein the ADL description file successively carries out decorator description and order description; a decorator analysis module, an order analysis module and an order processing module in the ADL analysis program describe the system architecture information into class, attribute and object to respectively represent very similar behaviour, other orders provided by certain route behaviour, attribute of the decorator described by the formatted order and order self information; a suffix added on the decorator on the basis represents the inheritance of the order of different decorator modes. Thus, the invention has high conciseness and expressiveness, has less redundancy than other ADL description files, produces high-quality description and has few program faults.

Description

The access method of the instruction of decorator pattern
Technical field
The invention belongs to computer body system structure field, particularly architectural framework descriptive language ADL.
Background technology
Along with flush bonding processor becomes increasingly complex and introduces the new feature of various kinds, compiler is continually developed new optimisation technique simultaneously, describe processor in detail and architectural framework information becomes increasingly complex for compiler, the wide gap of flush bonding processor and compiler is also increasing.Strong, succinct, the extendible high quality bulk system structure of ability to express descriptive language becomes the instrument that presses for.
A lot of compilers are difficult to be redirected, and they need a large amount of coding and bad debug work and understanding in depth compiler.And on the other hand, many architectural framework descriptive languages (ADL) design for simulator, are difficult to extract semantic information for compiler is redirected.Though exist to support the ADL and the semantic extension work of compiler, the complete description of a framework still needed a large amount of work, because various features and a large amount of instructions.And it is pretty troublesome to revise description, and because redundant information and consistency problem may produce indiscoverable bug, and this may be a major issue to the processor (ASIP) towards application program, because they need often to adjust to instruct.
Architecture description language traditionally mainly is redirected design for simple target as generating simulator or compiler, expand to other application then, therefore very direct but other instruments of incompatibility to design tool, this is because development kit needs the description of the different abstraction hierarchies of hardware behavior.Other ADL are the design of design tool collection, but mainly pay close attention to accurate simulator of cycle and lack effective support to compiler.According to the difference of its target, ADL is divided three classes: structure, behavior and mixing.
MIMOLA belongs to the first kind.In MIMOLA, hardware configuration is modeled as register transfer netlist with the language of a similar HDL, and the module of door level is the special case of netlist.The advantage of the structural method of MIMOLA is that same description can be used for that processor is synthetic, code generates, test and simulation.But this language is very rudimentary, and it is very big to write workload, and the dirigibility that is used for compiler is subjected to strict restriction.
NML and ISDL are the examples of behavior class.The processor information that they catch the instruction set layer that exemplary program person's handbook provides generates the design tool case, describes instruction set with attributed grammar.ISDL is mainly the VLIW architecture design.Explicit pipeline organization and microoperation in detail do not described in these language, lacks the ability that generates cycle accurate simulator.
Most of ADL belong to the mixing class.MDes and EXPRESSION are the ADL of two similar LISP, and the framework information of their while arresting structures and behavior is mainly the design space and explores (DSE) design.In MDes, information is divided into several sections: form, resource use, delay, operation, register etc.And EXPRESSION is divided into two classes with description: instruction set and structure.Each class further is subdivided into three subclasses: operation, instruction and operation are hinted obliquely at; Assembly, streamline/data transfer path and memory subsystem.MDes has define pre-service feature to be used for succinct description.EXPRESSION is used to the DSE of isomorphism framework able to programme, and is used for the generation of the framework exploration instrument of SOC able to programme.But, in history these language in compiler, use few.
LISA has the grammer of a similar C, mainly is designed for the accurate compiling fast in cycle and position simulator, and its principal character is to use timing model in the description of operation layer to streamline.RADL expansion LISA supports multiple pipeline, is used for cycle and simulator accurately mutually.But these language lack compiler is redirected required high-level semantic, because these information generally can't be from extracting the C statement arbitrarily.
ArchC is an ADL who pays close attention to SystemC user, and it is mainly based on the grammer of C++ and SystemC.Its principal character is based on the consistency checking of storage.ArchC has been used to generate the simulator and the assembler of some frameworks.
But, do not have work object-oriented mechanism to be introduced ADL for the instruction of decorator pattern.The instruction of decorator pattern occurs frequent and has customary pattern, and manual description is complicated and very dull, and occurs problems such as redundant and information inconsistency easily.The present invention proposes an OO method and carries out ADL and describe, and has solved the problem of the instruction of access decorator pattern, and it has fully eliminated the redundancy of describing, and language is succinct healthy and strong flexibly, writes and safeguards all simply many than other ADL thereby make.
Summary of the invention
The present invention utilizes computer body system structure access technique, designs a kind of access method of instruction of decorator pattern, and this method will be instructed abstract in elementary instruction and decorator, and is class, attribute and object with an inheritance mechanism with the architectural framework information description.It not only has the terseness and the ability to express of height, and than the redundancy of other architectural framework descriptive language ADL lack many, and can produce high-quality description and still less mistake is arranged.
The access method of the instruction of decorator pattern of the present invention, realize in target machine successively according to the following steps:
1. the access method of the instruction of decorator pattern is characterized in that, described method realizes in target machine successively according to the following steps:
Step (1), the initialization of target machine:
Set up: architectural framework descriptive language ADL description document and architectural framework descriptive language ADL routine analyzer, hereinafter to be referred as ADL description document and ADL routine analyzer, wherein:
The ADL description document comprises decorator description part and instruction description part at least, wherein:
Decorator is described part,
Set up following 6 instructions of carrying out add operation:
Add represents two register additions,
Addc is meant add carrying, represents that two register phase adductions are provided with carry,
Adde is meant add extended, represents two register phase adduction add carries and carry is set,
Addi is meant add immediate, expression register and several additions immediately,
Addic is meant add immediate carrying, represents register and counts adduction add carries mutually immediately,
Addis is meant add immediate shift, the expression register with move to left 16 count additions immediately,
Define following decorator: carrying decorator, extended decorator, immediate decorator, immediate shift decorator, wherein:
Carrying decorator, expression use carry CARRY position,
The extended decorator, carry CARRY position is used and is provided with in expression,
The immediate decorator is represented operand for several immediately,
Immediate shift decorator, expression operand are 16 count immediately of moving to left,
Above decorator also is applicable to the other types instruction of same pattern, comprising subtraction sub, multiplication mul, immediate decorator and immediate shift decorator decorator also can be in the binary operation instruction as arithmetic and and, arithmetic or or, with back negate nand
The instruction of definition decorator pattern, be meant one group of instruction of carrying out the operation of same type, as long as distinguished with operand or specific child-operation, so, just distinguishing operand or child-operation can be controlled with a specific decorator, an instruction can have several decorators, and a decorator also can be used for polytype instruction
Decorator is extracted as semantic category, will carry out the operation of same type and have that the instruction of different decorators is abstract merges into an elementary instruction,
Described decorator is described to:
<class name=" ExtendedDecorator " base=" Decorator " suffix=" e ", wherein: keyword class is defined as a class,
Attribute name represents class name,
Attribute suffix represents that the suffix of decorator is e,
Attribute base represents the analysis processor Decorator of decorator,
Define this decorator and revise the Semantic Actions action section of elementary instruction, the modification action that this instruction action section is added the elementary instruction action by the action of the instruction in the described elementary instruction again forms, described instruction action action section is described to: $action, (%instruction), the action of expression elementary instruction, testset CARRY represents to test carry CARRY, $action, (%instruction) testset CARRY is illustrated in and just revises carry CARRY position in case satisfy condition after the instruction action is finished
To the immediate decorator of modify instruction operand, then in operand operand section, redefine the operand field of a modification,
<src2 type=" imm16 "/, the type of expression source operand 2 is 16 and counts immediately;
The instruction description part, every elementary instruction is described in a command information section that is called XML tag with its instruction name, described command information comprises: instruction action action, order number encoding, instruction operands operand and instruction compilation form assembly pattern, for every instruction:
If: it is ordinary instruction then that this instruction does not have decorator, then directly defines the information of this instruction self,
If: it then is elementary instruction that this instruction has decorator, then define corresponding decorator decorator section therein, each decorator segment table shows the instruction of a decorator pattern, specify its decorator class name by attribute name, the information of defined instruction self then, if the instruction of decorator pattern has the undefined modification of decorator class, then in the decorator section, define;
The ADL routine analyzer, contain: the decorator analysis module, instruction analysis module and command process module, wherein:
The decorator analysis module defines a decorator memory object class, instruction decorator info class and a command information class, wherein:
Decorator memory object class, comprise the title of decorator, suffix, instruction action action and the instruction operands operand of decorator, to be used to store and handle the information of each elementary instruction that decorator covers, thereby set up the mapping table DecoratorMap of decorator class name to this decorator memory object
Instruction decorator info class, additional modifications, a decorator memory object of comprise decorator class title, whether having the decorator class not describe are used to store and handle the additional modifications that the decorator class is not described, to be used for the decorator information of storage instruction;
The command information class, comprise instruction title, instruction decorator information array, instruction action action, order number encoding, instruction operands operand and instruction compilation form assembly pattern, be used for storing and handling each command information of described instruction description part
The instruction analysis module is analyzed each bar elementary instruction of described instruction description part, comprising the instruction title, instruct each decorator information and described command information, and then sets up the classification of this command information in the described instruction description part,
Command process module according to the command information that the DecoratorMap and the instruction analysis module of described decorator analysis module foundation are set up, is handled the command information that generates the decorator pattern;
Step (2) generates the ADL source file successively according to the following steps:
Step (2.1), described target machine carries out described decorator description of step (1) and instruction description to the order format of each input,
Step (2.2), described decorator analysis module are described part to the decorator of input according to the following steps successively and are carried out analyzing and processing:
Step (2.2.1), the title, suffix of analyzing each decorator be so that set up the memory object of this decorator,
Step (2.2.2), judge whether defined instruction action section of decorator, if define then reading command action section, analyze presumptive instruction action part that Yong $action represents and the instruction action part that elementary instruction is increased, analysis result is stored in the decorator memory object of step (2.2.1) foundation
Step (2.2.3), judge whether defined instruction operand field of decorator,, analyze the instruction operands of the conduct section that decorator revises if define then reading command operand field, analysis result is stored in the decorator memory object of step (2.2.1) foundation
Step (2.2.4) is judged whether defined instruction coding section of decorator, if define then read command encodings section, analyzes bit position and value that this decorator is revised,
Step (2.2.5), to each decorator definition in the order format description of described ADL description document, repeating step (2.2.1)~step (2.2.4), in internal memory, set up corresponding decorator memory object, then the decorator memory object of decorator class name and analysis foundation is added among the described mapping table DecoratorMap;
Step (2.3), the instruction analysis module analyzes each attribute in described instruction decorator info class and the command information class to each the bar instruction in the instruction description part of the described ADL description document of input, sets up each command information object,
Wherein the detailed step of analysis instruction decorator information is as follows, to each decorator section, analyze its decorator class title, judge the additional modifications whether it has additional section not describe with the definition decorator, if have, then call decorator memory object class each additional section is analyzed and handled, set up a decorator class object, set up instruction decorator information object according to the result who analyzes then, and this instruction decorator information object is added in the instruction decorator information array;
Step (2.4), command process module is according to analyzing each command information class object of setting up in the step (2.3), judge whether it has decorator, (i) if decorator is arranged, then to each instruction decorator information A, obtain corresponding decorator class memory object according to its decorator class name by described DecoratorMap, with this command information object is that this decorator class memory object of parameter call is handled, generate the command information B of corresponding decorator class description, if A has the additional modifications that the decorator class is not described simultaneously, be decorator class memory object among the parameter call A with the command information B that generates again then, generation has the command information of corresponding decorator, if (ii) there is not decorator, then should instruct constant;
Wherein the detailed step that the decorator memory object is handled command information in the situation (i) is as follows, analysis according to step (2.2) and step (2.3), decorator to the modify instruction action, the presumptive instruction action part is replaced with self action of instruction, and the instruction action that increases of extra-instruction form promptly obtains the instruction action that generates; To the decorator of modify instruction operand, then the operand of revising with the decorator that analyzes is replaced the operand of this instruction in the relevant position, promptly obtains the instruction operands of the instruction that generates; To the decorator of each modify instruction coding, then use the value of the coding bit position of the decorator modification that analyzes to replace the value of this order number in the relevant position, promptly obtain the order number of the instruction that generates;
Step (3), each bar command information that step (2.4) is generated is converted to instruction description output, to generate corresponding ADL source file.
The required ADL description document of the access method of the instruction of decorator pattern of the present invention has succinctly, ability to express strong, the describing mass advantages of higher, it produces mistake still less, easier modification simultaneously and maintenance more than lack of the redundancy of other architectural framework descriptive language ADL.
The access method of the instruction of this decorator pattern can combine with the design of all kinds of general processors, graphic process unit, flush bonding processor etc. and related tool chain such as simulator, compiler, development of assembler, is applied to the software-hardware synergism design.And this method also can be used as the research and development that are redirected automatically of striding architectural framework that the hardware description method is used for compiler.
Description of drawings
Fig. 1 shows process flow diagram of the present invention;
Fig. 2 shows the ADL instruction description file of example of the present invention;
Fig. 3 shows the ADL instruction description source file of ADL routine analyzer output of the ADL instruction description file correspondence of Fig. 2 example.
Embodiment
There are some to form the instruction of decorator (decorator) pattern in the instruction set of target machine of the present invention, the instruction of decorator pattern is meant the operation of one group of instruction execution same type, and only have any different at operand or specific child-operation, then distinguishing operand or child-operation can be regarded as by specific decorator control, an instruction perhaps has several decorators, and a decorator also may be used for polytype instruction;
As the instruction of carrying out add operations to 6: add (two register additions), addc (add carrying, two register phase adductions influence carry), adde (add extended, two register phase adduction add carries and influence carry), addi (add immediate, register with count additions immediately), addic (add immediate carrying, register with count adduction add carries mutually immediately), addis (add immediate shift, register with move to left 16 count additions immediately); The carrying decorator means and uses the CARRY position, extended means and uses and be provided with the CARRY position, the immediate decorator represents that operand is for several immediately, immediate shift decorator represents that operand is 16 counts immediately of moving to left, Carrying and extended also are used for the subf instruction, and immediate and shift also are used for mul, and and or etc.;
Because the instruction of decorator pattern has a lot of similar parts, decorator can be extracted as semantic category, to carry out the operation of same type and have that the instruction of different decorators is abstract merges into an elementary instruction, only need then to add different decorators to elementary instruction, can describe a large amount of instructions, have outstanding dirigibility and extensibility.
The access method of decorator instruction comprises architectural framework descriptive language ADL description document and ADL routine analyzer, wherein comprise decorator description part and instruction description part in the ADL description document at least, set up decorator analysis module, instruction analysis module, command process module in the ADL routine analyzer, handle the final ADL of generation source file by this method, described method comprises the steps:
Step (1), the decorator in the described ADL description document is described;
Describe in the part each decorator that needs with class of class keyword definition at the decorator of described ADL description document, point out its class name, point out the suffix of decorator by the suffix attribute by the name attribute; Specifying its base class by the base attribute is decorator Decorator, and what show definition is the decorator class, and described decorator analysis module will call the method for decorator memory object class described order format is analyzed and handled;
If decorator is revised some instruction attributes, as instruct and move or instruction operands, then in the decorator class, define corresponding section to cover the information of instruction correspondent section, to instruction action section, can use ” $action (%instruction) " instruction action in the acute pyogenic infection of finger tip instruction definition, add the modification action of decorator again to instruction, to the instruction operands section, the title of the instruction operands that redefinable is revised and classification; As to the carrying decorator, then in decorator, cover instruction action action section, add modification action therein to the CARRY position, similar ” $action (%instruction) testset CARRY ", show that instruction finishes the comparison zone bit that is provided with after himself Semantic Actions in the control register when satisfying condition, to the immediate decorator, then in the instruction operands operand section in decorator covers the source operand section, redefines therein to count source operand immediately;
Step (2), the instruction description in the described ADL description document;
In the instruction description part in described ADL description document, every instruction is described in be called a message segment of XML tag with it, to every instruction, (i) be elementary instruction if it has decorator, then in the command information section, each decorator is defined decorator (decorator) section, define the information of elementary instruction self then, in each decorator section definition, point out the title of decorator class with the name attribute, if elementary instruction also is the processor instruction of an arming frilled organ simultaneously, then define the decorator section of a name for " " expression empty name, there is not decorator if (ii) instruct, then the information of direct defined instruction self;
The instruction that this decorator of definable generates in each decorator section need be made amendment and the unmodified command information of decorator class to elementary instruction, as order number; Definition in the information of every instruction self each son section in the command information section comprises instruction action (action), order number (encoding), instruction operands (operand), instruction compilation form (assembly);
Step (3), the decorator analysis module of described ADL routine analyzer;
Define a decorator memory object class, be used for storing and handling the information of each section of decorator class, comprise instruction suffix, instruction action and instruction operands;
Define an instruction decorator info class, be used for the decorator information of storage instruction, additional modifications, a decorator memory object of comprise decorator class title, whether having the decorator class not describe are used to store and handle the additional modifications that the decorator class is not described;
Define a command information class, be used for storing and handling each command information of described instruction description part, comprise instruction title, instruction decorator information array, instruction action, order number, instruction operands and instruction compilation form;
In internal memory, set up the mapping table DecoratorMap of decorator class name to the decorator memory object;
To instruction action section, analyze the instruction action that presumptive instruction action part and this order format increase, to the instruction operands section, analyze the position and the classification of the instruction operands that decorator revises;
To each the decorator class in the decorator description of described ADL description document, the ADL routine analyzer calls the method for decorator memory object class each section in the decorator class is analyzed and handled, set up corresponding decorator class memory object in internal memory, the decorator memory object with decorator class name and analysis foundation adds among the mapping table DecoratorMap then;
Step (4), the instruction analysis module of described ADL routine analyzer, wherein to each the bar instruction in the instruction description of described ADL description document, ADL parser analysis processing instruction is described, comprise the information, instruction operands and the instruction compilation form that instruct title, instruction decorator information, instruct action, order number fellow deputies, set up the object of command information class then;
Wherein the detailed step of analysis instruction decorator information is as follows, to each decorator section, analyze its decorator class title, judge the additional modifications whether it has additional section not describe with the definition decorator, if have, then calling the method for decorator memory object class analyzes and handles each additional section, set up a decorator class object, set up instruction decorator information object according to the result who analyzes then, and this instruction decorator information object is added in the instruction decorator information array;
Step (5), the command process module of described ADL routine analyzer, wherein to analyzing each command information class object of setting up in the step (4), judge whether it has decorator, (i) if decorator is arranged, then to each instruction decorator information A, obtain corresponding decorator class memory object according to its decorator class name by DecoratorMap, with this command information object is that the method for this decorator class memory object of parameter call is handled, generate the command information B of corresponding decorator class description, if A has the additional modifications that the decorator class is not described simultaneously, be decorator class memory object among the parameter call A with the command information B that generates again then, generation has the command information of corresponding decorator, if (ii) there is not decorator, then should instruct constant;
Wherein the detailed step that the decorator memory object is handled command information in the situation (i) is as follows, analysis according to step (3) and step (4), decorator to the modify instruction action, the presumptive instruction action part is replaced with self action of instruction, and the instruction action that increases of extra-instruction form promptly obtains the instruction action that generates; To the decorator of modify instruction operand, then the operand of revising with the decorator that analyzes is replaced the operand of this instruction in the relevant position, promptly obtains the instruction operands of the instruction that generates; To the decorator of each modify instruction coding, then use the value of the coding bit position of the decorator modification that analyzes to replace the value of this order number in the relevant position, promptly obtain the order number of the instruction that generates;
Step (6) is handled each the bar command information that generates with step 5 and is converted to the corresponding ADL source file of instruction description output generation.
For making the purpose, technical solutions and advantages of the present invention clearer, embodiments of the present invention are described in further detail below in conjunction with accompanying drawing.
Fig. 1 shows process flow diagram of the present invention.As shown in Figure 1, in the ADL description document, decorator is described.This example is described a subclass add (two register additions) of integer arithmetic instruction, adde (two register phase adduction add carries and influence carry), addi (register and several additions immediately), wherein adde and addi are with extended and immediate decorator respectively, and the add instruction does not have decorator.Fig. 2 shows the ADL instruction description file of example of the present invention.Fig. 3 shows the ADL instruction description source file of ADL routine analyzer output of the ADL instruction description file correspondence of Fig. 2 example.

Claims (1)

1. the access method of the instruction of decorator pattern is characterized in that, described method realizes in target machine successively according to the following steps:
Step (1), the initialization of target machine:
Set up: architectural framework descriptive language ADL description document and architectural framework descriptive language ADL routine analyzer, hereinafter to be referred as ADL description document and ADL routine analyzer, wherein:
The ADL description document comprises decorator description part and instruction description part at least, wherein:
Decorator is described part,
Set up following 6 instructions of carrying out add operation:
Add represents two register additions,
Addc is meant add carrying, represents that two register phase adductions are provided with carry,
Adde is meant add extended, represents two register phase adduction add carries and carry is set,
Addi is meant add immediate, expression register and several additions immediately,
Addic is meant add immediate carrying, represents register and counts adduction add carries mutually immediately,
Addis is meant add immediate shift, the expression register with move to left 16 count additions immediately,
Define following decorator: carrying decorator, extended decorator, immediate decorator, immediate shift decorator, wherein:
Carrying decorator, expression use carry CARRY position,
The extended decorator, carry CARRY position is used and is provided with in expression,
The immediate decorator is represented operand for several immediately,
Immediate shift decorator, expression operand are 16 count immediately of moving to left,
Above decorator also is applicable to the other types instruction of same pattern, comprising subtraction sub, multiplication mul, immediate decorator and immediate shift decorator decorator also can be in the binary operation instruction as arithmetic and and, arithmetic or or, with back negate nand
The instruction of definition decorator pattern, be meant one group of instruction of carrying out the operation of same type, as long as distinguished with operand or specific child-operation, so, just distinguishing operand or child-operation can be controlled with a specific decorator, an instruction can have several decorators, and a decorator also can be used for polytype instruction
Decorator is extracted as semantic category, will carry out the operation of same type and have that the instruction of different decorators is abstract merges into an elementary instruction,
Described decorator is described to:
<class name=" ExtendedDecorator " base=" Decorator " suffix=" e ", wherein: keyword class is defined as a class,
Attribute name represents class name,
Attribute suffix represents that the suffix of decorator is e,
Attribute base represents the analysis processor Decorator of decorator,
Define this decorator and revise the Semantic Actions action section of elementary instruction, the modification action that this instruction action section is added the elementary instruction action by the action of the instruction in the described elementary instruction again forms, described instruction action action section is described to: $action, (%instruction), the action of expression elementary instruction, testset CARRY represents to test carry CARRY, $action, (%instruction) testset CARRY is illustrated in and just revises carry CARRY position in case satisfy condition after the instruction action is finished
To the immediate decorator of modify instruction operand, then in operand operand section, redefine the operand field of a modification,
<src2type=" imm16 "/, the type of expression source operand 2 is 16 and counts immediately;
The instruction description part, every elementary instruction is described in a command information section that is called XML tag with its instruction name, described command information comprises: instruction action action, order number encoding, instruction operands operand and instruction compilation form assembly pattern, for every instruction:
If: it is ordinary instruction then that this instruction does not have decorator, then directly defines the information of this instruction self,
If: it then is elementary instruction that this instruction has decorator, then define corresponding decorator decorator section therein, each decorator segment table shows the instruction of a decorator pattern, specify its decorator class name by attribute name, the information of defined instruction self then, if the instruction of decorator pattern has the undefined modification of decorator class, then in the decorator section, define;
The ADL routine analyzer, contain: the decorator analysis module, instruction analysis module and command process module, wherein:
The decorator analysis module defines a decorator memory object class, instruction decorator info class and a command information class, wherein:
Decorator memory object class, comprise the title of decorator, suffix, instruction action action and the instruction operands operand of decorator, to be used to store and handle the information of each elementary instruction that decorator covers, thereby set up the mapping table DecoratorMap of decorator class name to this decorator memory object
Instruction decorator info class, additional modifications, a decorator memory object of comprise decorator class title, whether having the decorator class not describe are used to store and handle the additional modifications that the decorator class is not described, to be used for the decorator information of storage instruction;
The command information class, comprise instruction title, instruction decorator information array, instruction action action, order number encoding, instruction operands operand and instruction compilation form assembly pattern, be used for storing and handling each command information of described instruction description part
The instruction analysis module is analyzed each bar elementary instruction of described instruction description part, comprising the instruction title, instruct each decorator information and described command information, and then sets up the classification of this command information in the described instruction description part,
Command process module according to the command information that the DecoratorMap and the instruction analysis module of described decorator analysis module foundation are set up, is handled the command information that generates the decorator pattern;
Step (2) generates the ADL source file successively according to the following steps:
Step (2.1), described target machine carries out described decorator description of step (1) and instruction description to the order format of each input,
Step (2.2), described decorator analysis module are described part to the decorator of input according to the following steps successively and are carried out analyzing and processing:
Step (2.2.1), the title, suffix of analyzing each decorator be so that set up the memory object of this decorator,
Step (2.2.2), judge whether defined instruction action section of decorator, if define then reading command action section, analyze presumptive instruction action part that Yong $action represents and the instruction action part that elementary instruction is increased, analysis result is stored in the decorator memory object of step (2.2.1) foundation
Step (2.2.3), judge whether defined instruction operand field of decorator,, analyze the instruction operands of the conduct section that decorator revises if define then reading command operand field, analysis result is stored in the decorator memory object of step (2.2.1) foundation
Step (2.2.4) is judged whether defined instruction coding section of decorator, if define then read command encodings section, analyzes bit position and value that this decorator is revised,
Step (2.2.5), to each decorator definition in the order format description of described ADL description document, repeating step (2.2.1)~step (2.2.4), in internal memory, set up corresponding decorator memory object, then the decorator memory object of decorator class name and analysis foundation is added among the described mapping table DecoratorMap;
Step (2.3), the instruction analysis module analyzes each attribute in described instruction decorator info class and the command information class to each the bar instruction in the instruction description part of the described ADL description document of input, sets up each command information object,
Wherein the detailed step of analysis instruction decorator information is as follows, to each decorator section, analyze its decorator class title, judge the additional modifications whether it has additional section not describe with the definition decorator, if have, then call decorator memory object class each additional section is analyzed and handled, set up a decorator class object, set up instruction decorator information object according to the result who analyzes then, and this instruction decorator information object is added in the instruction decorator information array;
Step (2.4), command process module is according to analyzing each command information class object of setting up in the step (2.3), judge whether it has decorator, (i) if decorator is arranged, then to each instruction decorator information A, obtain corresponding decorator class memory object according to its decorator class name by described DecoratorMap, with this command information object is that this decorator class memory object of parameter call is handled, generate the command information B of corresponding decorator class description, if A has the additional modifications that the decorator class is not described simultaneously, be decorator class memory object among the parameter call A with the command information B that generates again then, generation has the command information of corresponding decorator, if (ii) there is not decorator, then should instruct constant;
Wherein the detailed step that the decorator memory object is handled command information in the situation (i) is as follows, analysis according to step (2.2) and step (2.3), decorator to the modify instruction action, the presumptive instruction action part is replaced with self action of instruction, and the instruction action that increases of extra-instruction form promptly obtains the instruction action that generates; To the decorator of modify instruction operand, then the operand of revising with the decorator that analyzes is replaced the operand of this instruction in the relevant position, promptly obtains the instruction operands of the instruction that generates; To the decorator of each modify instruction coding, then use the value of the coding bit position of the decorator modification that analyzes to replace the value of this order number in the relevant position, promptly obtain the order number of the instruction that generates;
Step (3), each bar command information that step (2.4) is generated is converted to instruction description output, to generate corresponding ADL source file.
CN201010237450.4A 2010-07-23 2010-07-23 Access method of decorator mode order Active CN101923466B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010237450.4A CN101923466B (en) 2010-07-23 2010-07-23 Access method of decorator mode order

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010237450.4A CN101923466B (en) 2010-07-23 2010-07-23 Access method of decorator mode order

Publications (2)

Publication Number Publication Date
CN101923466A true CN101923466A (en) 2010-12-22
CN101923466B CN101923466B (en) 2014-04-16

Family

ID=43338424

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010237450.4A Active CN101923466B (en) 2010-07-23 2010-07-23 Access method of decorator mode order

Country Status (1)

Country Link
CN (1) CN101923466B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049215A (en) * 2012-12-07 2013-04-17 记忆科技(深圳)有限公司 Input/output (IO) command processing method and solid state disk thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11397663B2 (en) * 2017-11-02 2022-07-26 Silicon Mobility Sas Software environment for control engine debug, test, calibration and tuning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7111278B1 (en) * 2000-03-01 2006-09-19 Mindspeed Technologies, Inc. Automated translation of a microprocessor opcode summary table to an architecture description language
CN101211262A (en) * 2007-12-25 2008-07-02 覃征 Software architecture description language quick construction and support method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7111278B1 (en) * 2000-03-01 2006-09-19 Mindspeed Technologies, Inc. Automated translation of a microprocessor opcode summary table to an architecture description language
CN101211262A (en) * 2007-12-25 2008-07-02 覃征 Software architecture description language quick construction and support method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103049215A (en) * 2012-12-07 2013-04-17 记忆科技(深圳)有限公司 Input/output (IO) command processing method and solid state disk thereof
CN103049215B (en) * 2012-12-07 2015-11-25 记忆科技(深圳)有限公司 The method of IO command process and solid state hard disc thereof

Also Published As

Publication number Publication date
CN101923466B (en) 2014-04-16

Similar Documents

Publication Publication Date Title
Eles et al. System synthesis with VHDL
Lee et al. Compass: A framework for automated performance modeling and prediction
KR100186869B1 (en) Methodology for deriving executable low-level structural descriptions and valid physical implementations of circuit and system
US20070288885A1 (en) Action languages for unified modeling language model
EP0628911A2 (en) Test program generator
US20040143801A1 (en) Structured algorithmic programming language approach to system design
Cardoso et al. Performance‐driven instrumentation and mapping strategies using the LARA aspect‐oriented programming approach
Chattopadhyay et al. LISA: A uniform ADL for embedded processor modeling, implementation, and software toolsuite generation
US9424005B1 (en) Templatized component
Vachharajani et al. The Liberty Structural Specification Language: A high-level modeling language for component reuse
Stirewalt et al. A component-based approach to building formal analysis tools
US11593540B1 (en) Systems and methods for performing concurrency analysis in simulation environments
CN101923466B (en) Access method of decorator mode order
Bergé et al. High-level system modeling: specification languages
Prochnow et al. Synthesizing safe state machines from Esterel
CN101916179B (en) Access method of bit zone in control register
Shershakov Vtmine for visio: A graphical tool for modeling in process mining
Hsieh et al. Microprocessor power analysis by labeled simulation
Hammond et al. The design of hume: a high-level language for the real-time embedded systems domain
August et al. A disciplined approach to the development of platform architectures
Hammond et al. Towards formally verifiable resource bounds for real-time embedded systems
Badreddin et al. Investigation and evaluation of UML Action Languages
Goli et al. Design Understanding Methodology
Malm et al. Towards automated analysis of executable models
Todorovich et al. TCL/TK for EDA Tools

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant