CN103164220A - Automatic processing method of floating point immediate operand for spaceborne computer on-track maintenance - Google Patents
Automatic processing method of floating point immediate operand for spaceborne computer on-track maintenance Download PDFInfo
- Publication number
- CN103164220A CN103164220A CN2013100554883A CN201310055488A CN103164220A CN 103164220 A CN103164220 A CN 103164220A CN 2013100554883 A CN2013100554883 A CN 2013100554883A CN 201310055488 A CN201310055488 A CN 201310055488A CN 103164220 A CN103164220 A CN 103164220A
- Authority
- CN
- China
- Prior art keywords
- floating
- point
- floating point
- immediate
- point immediate
- 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
Links
Images
Landscapes
- Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)
Abstract
An Automatic processing method of floating point immediate operands for spaceborne computer on-track maintenance comprises the following steps: (1) extracting floating point immediate operand sets and floating point global variable sets for representing the floating point immediate operands; (2) defining a union type variable containing unsigned integer type members and floating point type members; (3) selecting one untreated floating point immediate operand from the extracted floating point immediate operand sets, calculating 32-bit base-2 representation value of the one untreated floating point immediate operand in the computer memory according to the IEEE754 data format, and assigning the unsigned integer type members in the union type variable; and (4) reading values of the floating point type members in the union type variable, and assigning one corresponding floating global variable in the extracted floating point global variable sets. Processing of the floating point immediate operands is achieved, and following-up processing is conducted on a spaceborne computer until all the floating point immediate operands are processed.
Description
Technical field
The present invention relates to a kind of spaceborne computer and safeguard the autonomous disposal route of floating-point immediate used at rail, belong to spaceborne computer software in rail maintenance technology field.
Background technology
The program that satellite solidifies in PROM can not satisfy mission requirements, need to implement repeatedly software and safeguard at rail, to carry out Attitude and orbit control.
Satellite attitude and orbit control subsystem AOCC application software adopts ANSI C language development, object code after software translating solidifies in PROM, the single-precision floating point immediate that each function module uses is deposited in the code segment (Code) of PROM, before this function entrance address.
Implement spaceborne computer software when rail is safeguarded, the floating-point immediate of using due to new function after safeguarding can't realize its expression by injecting program before being stored in the object code that this function is corresponding after the associating compiling; And there is not its expression in the code segment that on star, original software code is corresponding (Code) the floating-point immediate that the working service function is not corresponding yet.This just requires to safeguard in rear new function and the floating-point immediate can not occur, and corresponding floating-point immediate need to use the floating-point global variable to replace.
Safeguard at rail the floating-point immediate of using in function for AOCC application software in the past, generally inject the internal memory modify instruction by ground, revise one by one floating-point global variable corresponding to floating-point immediate, realize its expression, implementation step is complicated, and on star, software can not independently be processed.In the situation that whole energy source of star is in an emergency and is needed to implement software and safeguard at rail, time is pressing and the task is heavy when satellite, and maintenance process relates to a large amount of floating-point immediates, adopts method in the past to process the floating-point immediate, can not satisfy mission requirements.How to improve the efficient that software uses the floating-point immediate to represent in the rail maintenance process, need to be resolved hurrily.
Summary of the invention
Technology of the present invention is dealt with problems and is: for the deficiencies in the prior art, provide a kind of spaceborne computer to safeguard the autonomous disposal route of floating-point immediate used at rail, improve spaceborne computer software and safeguard at rail the efficient that in function, a large amount of floating-point immediates represent.
Technical solution of the present invention is:
A kind of spaceborne computer is safeguarded the autonomous disposal route of floating-point immediate used at rail, step is as follows:
(1) extract the floating-point global variable set that floating-point immediate set that spaceborne computer uses and expression floating-point immediate are used in the rail maintenance program;
(2) sharing body categorical variable that comprises signless integer type member and floating type member of definition;
(3) select a untreated floating-point immediate from the floating-point immediate set of extracting, calculate 32 2 systems of this floating-point immediate in calculator memory according to the IEEE754 data layout and represent value, and described 32 2 systems are represented to be worth assignment to the signless integer type member in described sharing body categorical variable, enter afterwards step (4);
(4) read the numerical value of the floating type member in described sharing body categorical variable, and assignment is given a floating-point global variable corresponding in the described floating-point global variable set that extracts, namely realized the processing of this floating-point immediate, return to afterwards step (3), until all floating-points immediately number average enter step (5) after being disposed;
(5) On board computer carries out subsequent processes according to the floating-point global variable that obtains after being disposed.
The floating-point immediate set that extracts in step (1) and the set of floating-point global variable are man-to-man mapping relations.
The present invention compared with prior art has following advantage:
The invention provides a kind of software and safeguard the autonomous method for expressing of floating-point immediate at rail, the application of the invention method, no longer need to upload one by one from ground in prior art modifying of order floating-point immediate, but the soft ware autonomous processing of completing automatically a large amount of floating-point immediates of spaceborne computer, greatly improve the treatment effeciency of floating-point immediate in the rail maintenance process, reduced the complicacy of terrestrial operation.
Description of drawings
Fig. 1 is process flow diagram of the present invention;
Fig. 2 is the graph of a relation of floating-point immediate and floating-point global variable;
Embodiment
Below just by reference to the accompanying drawings the present invention is described further.
The present invention is from improving the spaceborne computer software efficient that the floating-point immediate represents the rail maintenance process, used in the C language " sharing body " (union), by sharing storage space between its different types of data that has, realize the function of the automatic type conversion between the different types of data member, solve the autonomous problem of representation of software floating-point immediate in the rail maintenance process on the star, improved the treatment effeciency that the floating-point immediate represents in the rail maintenance process.
For realize AOCC application software floating-point immediate from principal representation (processing) process, the present invention includes following steps, as shown in Figure 1:
(1) extract the floating-point global variable set that floating-point immediate set that spaceborne computer uses and expression floating-point immediate are used in the rail maintenance program, the set of floating-point immediate and the set of floating-point global variable are man-to-man mapping relations.Such as, floating-point immediate and floating-point global variable in satellite orbit control and attitude are controlled;
As shown in Figure 2, the corresponding relation schematic diagram of the floating-point global variable set FG that the floating-point immediate set FS that uses in the rail maintenance program for satellite carried computer and expression floating-point immediate are used, certain safeguards function at rail for spaceborne software, supposes the floating-point immediate FS of its use
i, i=0 ... n, all FS
iThe set that element consists of is FS; With floating-point immediate FS
iCorresponding floating-point global variable is FG
i, FG
iThe set that element consists of is FG, wherein element FS
iWith element FG
iMan-to-man mapping relations.
(2) sharing body (union) variable in C language of definition, its member comprises single-precision floating point type (float) member variable and a signless integer type (unsignedint) member variable;
For example: in the C language, the sharing body of definition (union) type Typeconvert and variable tcvar;
(3) select a untreated floating-point immediate FS from the floating-point immediate set of extracting
iCalculate 32 2 systems of this floating-point immediate in calculator memory according to the IEEE754 data layout and represent value, and described 32 2 systems are represented to be worth assignment to signless integer type (unsignedint) the member Word in described sharing body (union) categorical variable tcvar, enter afterwards step (4);
IEEE754 single-precision floating-point data form (32bit) sees the following form:
The single-precision floating-point data type is stored in computing machine according to the data layout of IEEE754, takies 4 byte 32bit.Wherein the bit31 position is sign bit, and the bit30 position is exponent bits to bit23, and the bit22 position is truth of a matter position to bit0.The computing formula of single-precision floating point numerical value R is R=(1)
s* M * 2
E
Sharing body provides a kind of share storage space between different types of data member method, with the conversion that can realize between the different types of data data member.Word member variable in sharing body variable tcvar is represented the corresponding 32 bit values (IEEE754 standard) of floating-point immediate in calculator memory, the Float member variable numerical value assignment of sharing body variable tcvar is arrived the floating-point global variable of correspondence.Memory value as floating number 1.0f is 0x3f800000, give corresponding global variable with the 0x3f800000 assignment, namely realized floating-point immediate 1.0 on the star from principal representation, other floating-point numerical representation mode immediately is identical.
(4) read the numerical value of floating type (float) the member Float in described sharing body type (union) variable, and assignment is given a floating-point global variable FG corresponding in the described floating-point global variable set that extracts
i, namely realized the processing of this floating-point immediate, return to afterwards step (3), until all floating-points immediately number average enter step (5) after being disposed;
(5) On board computer carries out subsequent processes according to the floating-point global variable that obtains after being disposed, control such as carrying out track the follow-up correlation computations of controlling with attitude, the inventive method has solved On board computer can't independently realize direct processing problem to the floating-point immediate.
The unspecified part of the present invention belongs to general knowledge as well known to those skilled in the art.
Claims (2)
1. a spaceborne computer is safeguarded the autonomous disposal route of floating-point immediate used at rail, it is characterized in that step is as follows:
(1) extract the floating-point global variable set that floating-point immediate set that spaceborne computer uses and expression floating-point immediate are used in the rail maintenance program;
(2) sharing body categorical variable that comprises signless integer type member and floating type member of definition;
(3) select a untreated floating-point immediate from the floating-point immediate set of extracting, calculate 32 2 systems of this floating-point immediate in calculator memory according to the IEEE754 data layout and represent value, and described 32 2 systems are represented to be worth assignment to the signless integer type member in described sharing body categorical variable, enter afterwards step (4);
(4) read the numerical value of the floating type member in described sharing body categorical variable, and assignment is given a floating-point global variable corresponding in the described floating-point global variable set that extracts, namely realized the processing of this floating-point immediate, return to afterwards step (3), until all floating-points immediately number average enter step (5) after being disposed;
(5) On board computer carries out subsequent processes according to the floating-point global variable that obtains after being disposed.
2. a kind of spaceborne computer as claimed in claim 1 is safeguarded the autonomous disposal route of floating-point immediate used at rail, and it is characterized in that: the floating-point immediate set that extracts in step (1) and the set of floating-point global variable are man-to-man mapping relations.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310055488.3A CN103164220B (en) | 2013-02-21 | 2013-02-21 | A kind of spaceborne computer safeguards the autonomous disposal route of floating-point immediate used in-orbit |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310055488.3A CN103164220B (en) | 2013-02-21 | 2013-02-21 | A kind of spaceborne computer safeguards the autonomous disposal route of floating-point immediate used in-orbit |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103164220A true CN103164220A (en) | 2013-06-19 |
CN103164220B CN103164220B (en) | 2016-03-02 |
Family
ID=48587341
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310055488.3A Active CN103164220B (en) | 2013-02-21 | 2013-02-21 | A kind of spaceborne computer safeguards the autonomous disposal route of floating-point immediate used in-orbit |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103164220B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110427172A (en) * | 2019-08-01 | 2019-11-08 | 龙芯中科(合肥)技术有限公司 | Floating number processing method, device, equipment and computer readable storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020194152A1 (en) * | 2000-07-02 | 2002-12-19 | Treil Nicolas Herve Edouard | Method for processing structured data using an object-oriented computer language |
US20050097523A1 (en) * | 2003-11-05 | 2005-05-05 | Kabushiki Kaisha Toshiba | System for compiling source programs into machine language programs, a computer implemented method for the compiling and a computer program product for the compiling within the computer system |
CN101393554A (en) * | 2008-09-12 | 2009-03-25 | 北京邮电大学 | Conversion method and device from IDL information to OWL information |
-
2013
- 2013-02-21 CN CN201310055488.3A patent/CN103164220B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020194152A1 (en) * | 2000-07-02 | 2002-12-19 | Treil Nicolas Herve Edouard | Method for processing structured data using an object-oriented computer language |
US20050097523A1 (en) * | 2003-11-05 | 2005-05-05 | Kabushiki Kaisha Toshiba | System for compiling source programs into machine language programs, a computer implemented method for the compiling and a computer program product for the compiling within the computer system |
CN101393554A (en) * | 2008-09-12 | 2009-03-25 | 北京邮电大学 | Conversion method and device from IDL information to OWL information |
Non-Patent Citations (1)
Title |
---|
JACK骆: "使用union共用体(联合体)将32位int数转换成4个8位char", 《新浪博客》 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110427172A (en) * | 2019-08-01 | 2019-11-08 | 龙芯中科(合肥)技术有限公司 | Floating number processing method, device, equipment and computer readable storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN103164220B (en) | 2016-03-02 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106126189A (en) | Method in microprocessor | |
CN104025043B (en) | Zoned format is converted to from decimal floating point form | |
CN107315741B (en) | Bilingual dictionary construction method and equipment | |
DE102015007943A1 (en) | Mechanisms for a weight shift in folding neural networks | |
DE112012003714T5 (en) | Compiling code for an extended application binary interface (ABI) with decryption time instruction optimization | |
CN104025044A (en) | Convert from zoned format to decimal floating point format | |
CN107402746A (en) | A kind of method and device of automatic code generating file | |
CN102362274A (en) | Processing of linear systems of equations | |
US10095475B2 (en) | Decimal and binary floating point rounding | |
US10416962B2 (en) | Decimal and binary floating point arithmetic calculations | |
CN105335127A (en) | Scalar operation unit structure supporting floating-point division method in GPDSP | |
CN101488126A (en) | Double-language sentence alignment method and device | |
CN112596697A (en) | Floating-point multiplication hardware using decomposed component numbers | |
CN103135960A (en) | Design method of integrated floating point unit based on FPGA (field programmable gate array) | |
EP3992774A1 (en) | Method and device for implementing dot product operation, electronic device, and storage medium | |
US20140244704A1 (en) | Fused multiply add pipeline | |
CN103164220A (en) | Automatic processing method of floating point immediate operand for spaceborne computer on-track maintenance | |
CN105373414A (en) | Method and device for realizing MIPS platform-supporting Java virtual machines | |
Franke et al. | Model-based control with FMI and a C++ runtime for Modelica | |
GB2506614A (en) | Extracting core data for a summary dump file based upon most recent trace data entries | |
Yu et al. | GPU-based JFNG method for power system transient dynamic simulation | |
CN104881293A (en) | Rule data processing system and method for Linux system | |
CN102929575B (en) | Modular multiplier | |
CN103699729B (en) | Modulus multiplier | |
CN112036561A (en) | Data processing method and device, electronic equipment and storage medium |
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 |