
1
2
3
APPEN-
DIX
6
7
8
Appendix 3 Me
thod of R
epla
cing Basic Mod
el QCPU
or H
igh
Perfor
mance
Model QCPU with U
niversal
Model QCPU
Appendix 3.4 Fun
ctions
APPENDICES
App
-
46
(c) Replacing a part of floating-point operation instructions with double-precision floating-point
operation instructions using subroutine programs
The flow of a replacement program described in (b) can be regarded as one subroutine program.
Create a subroutine program for each floating-point operation instruction and then replace the original floating-
point operation instructions with the CALL(P) instruction so that the corresponding subroutine program is
called.
With this method, changes in the program are minimized, but the processing for calling subroutine programs
increases the scan time.
In addition, since conversions from double precision to single precision are performed for each instruction,
rounding-off errors generated during operations are larger than those in the replacement program described in
(b).
1)
Device assignment
2)
Program before replacemen
nt
Example
Replacing the floating-point operation[A
B+C] (Using a subroutine program)
TableApp.38 Device assignment
Before replacement
After replacement
Application
Device
Data type
Application
Device
Data type
Data A
D0 to D1
Floating-point data
(single precision)
Data A
D0 to D1
Floating-point data
(single precision)
Data B
D2 to D3
Data B
D2 to D3
Data C
D4 to D5
Data C
D4 to D5
Result
D6 to D7
Result
D6 to D7
Subroutine input
data 1
D900 to D903
Floating-point data
(double precision)
Subroutine input
data 2
D904 to D907
Subroutine
operation result
D908 to D911
Figure App.24 Sample program
Содержание melsec q00ucpu
Страница 2: ......
Страница 3: ......
Страница 13: ...A 10 Memo ...
Страница 620: ......
Страница 621: ......