Keil Logo

Peripheral Simulation

For Silicon Laboratories, Inc. C8051F364 — Multiply And Accumulate (MAC)

Simulation support for this peripheral or feature is comprised of:

  • Dialog boxes which display and allow you to change peripheral configuration.

These simulation capabilities are described below.

Multiply And Accumulate Dialog

Multiply And Accumulate

The Multiply And Accumulate dialog displays and configures the dialog simulating the 16 x 16 Multiply And Accumulate engine. The controls in this dialog are separated into several logical groups.

Configuration

  • MAC0CF contains the following MAC0 configuration register settings:
  • MAC0SR (MAC0 Accumulator Shift Control) is set to shift the accumulator during the next SYSCLK cycle.
  • MAC0CA (MAC0 Clear Accumulator) is set to clear the accumulator and reset the MAC0STA on the next SYSCLK cycle.
  • MAC0FM (MAC0 Fractional Mode) is set to operate in Fractional mode, and reset to operate in Integer mode.
  • MAC0SD (MAC0 Shift Direction) is set to shift the accumulator to the right.  When reset, the accumulator shifts to the left.
  • MAC0SAT (MAC0 Saturate Rounding Register) is set to saturate the rounding register when a soft overflow occurs. When reset, no saturation occurs. 
  • MAC0MS (MAC0 Mode Select) is set to operate in Multiply Only mode and reset to operate in Multiply And Accumulate mode.

Status

  • MAC0STA contains the following MAC0 status register settings:
  • MAC0HO (MAC0 Hard Overflow) is set whenever the MAC0OVR register changes from 0x7F to 0x80, or 0x80 to 0x7F.  This flag must be cleared by software. 
  • MAC0SO (MAC0 Soft Overflow) is set whenever the MAC0OVR register does not equal 0x00 or 0xFF.   For all other MAC0OVR values, it is cleared.
  • MAC0Z (MAC0 Zero Flag) is set whenever the result of a MAC0 operation is zero.  It is cleared for all non-zero results. 
  • MAC0N (MAC0 Negative Flag) is set whenever the result of a MAC0 operation is negative.  It is cleared for all positive or zero results.

A & B

  • MAC0A (MAC0 A Register) contains the 16-bit A register value.
  • MAC0B (MAC0 B Register) contains the 16-bit B register value.

Accumulator

  • MAC0OVR (MAC0 Accumulator Overflow Register) contains the accumulator overflow bits (bits 39-32) of the 40-bit accumulator.
  • MAC0ACC32 (MAC0 HIgh Accumulator) contains the upper 16-bits of the 32-bit MAC0 accumulator value.
  • MAC0ACC10 (MAC0 Low Accumulator) contains the lower 16-bits of the 32-bit MAC0 accumulator value.

Rounding

  • MAC0RND (MAC0 Rounding Register) contains the rounded value of MAC0A, based on the value of MAC0B. 
Get more information about the
Peripheral Simulation Capabilities
of the µVision Debugger.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.