| 数据搜索系统,热门电子元器件搜索 |
|
HCS12 数据表(PDF) 307 Page - Freescale Semiconductor, Inc |
|
|
|||||||||||||||||||||||||||||
HCS12 数据表(HTML) 307 Page - Freescale Semiconductor, Inc |
|
307 / 452 page ![]() Glossary S12CPUV2 Reference Manual, Rev. 4.0 Freescale Semiconductor 307 Operation: Do until B = 0, leave SOP in Y : D, SOW in X Partial Product = (M pointed to by X) × (M pointed to by Y) Sum-of-Products (24-bit SOP) = Previous SOP + Partial Product Sum-of-Weights (16-bit SOW) = Previous SOW + (M pointed to by Y) (X) + $0001 ⇒ X; (Y) + $0001 ⇒ Y (B) – $01 ⇒ B Description: Performs weighted average calculations on values stored in memory. Uses indexed (X) addressing mode to reference one source operand list, and indexed (Y) addressing mode to reference a second source operand list. Accumulator B is used as a counter to control the number of elements to be included in the weighted average. For each pair of data points, a 24-bit sum of products (SOP) and a 16-bit sum of weights (SOW) is accumulated in temporary registers. When B reaches zero (no more data pairs), the SOP is placed in Y : D. The SOW is placed in X. To arrive at the final weighted average, divide the content of Y : D by X by executing an EDIV after the WAV. This instruction can be interrupted. If an interrupt occurs during WAV execution, the intermediate results (six bytes) are stacked in the order SOW[15:0], SOP[15:0], $00:SOP[23:16] before the interrupt is processed. The wavr pseudo-instruction is used to resume execution after an interrupt. The mechanism is re-entrant. New WAV instructions can be started and interrupted while a previous WAV instruction is interrupted. This instruction is often used in fuzzy logic rule evaluation. Refer to Section 9. Fuzzy Logic Support for more information. WAV Weighted Average WAV CCR Details: S X HIN Z V C –– ? – ? 1 ?? Z: 1; set H, N, V and C may be altered by this instruction Source Form Address Mode Object Code Access Detail(1) HCS12 M68HC12 WAV Special 18 3C Of(frr,ffff)O Off(frr,fffff)O (replace comma if interrupted) SSS + UUUrr SSSf + UUUrr 1. The replace comma sequence in parentheses represents the loop for one iteration of SOP and SOW accumulation. |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |