COP2: Difference between revisions

From PSP Developer wiki
Jump to navigation Jump to search
m (Correction of the formatting and some additions.)
 
(One intermediate revision by one other user not shown)
Line 2: Line 2:


== Specifications ==
== Specifications ==
* Functionality is similar to PS2's VFPU Macromode
* Functionality is similar to PS2's VU0 Macromode, but with less exposed pipeline and without own memory and DMA interface.
* It is designed for vector and matrix operations.
* It is designed for vector and matrix operations.
* It supports some <b>trigonometric functions</b>, <b>binary logarithm</b>, <b>square root</b>, and others.
* It supports some <b>trigonometric functions</b>, <b>binary logarithm</b>, <b>square root</b>, and others.
* It has <b>128</b> 32-bit registers.
* It has <b>128</b> 32-bit registers, and additional 16(?) 32 bits control registers.
* Reconfigurable as scalar, vector or matrix.
* Reconfigurable as scalar, vector or matrix.
* It can handle these types of numbers:
* It can handle these types of numbers:
** 32-bit IEEE 754 floating-point numbers.
** 32-bit IEEE 754 floating-point numbers  
*** Note: Unit is not fully IEEE 754 compliant. Denormals are treated as zero. Hardcoded nearest rounding mode. Some other not yet reversed math quirks which ends up with different results comparing to IEEE 754. While unit is much closer to IEEE 754 than FPU/VU in PS2, its behavior is still not fully understood.
** 32-bit integer numbers.
** 32-bit integer numbers.
** 16-bit integer numbers.
** 16-bit integer numbers.
Line 24: Line 25:
| 4×4 matrix multiply
| 4×4 matrix multiply
| <b>22</b> cycles
| <b>22</b> cycles
|}


|}
== See also ==
* [https://pspdev.github.io/vfpu-docs/ VFPU documentation by davidgfnet]

Latest revision as of 15:22, 21 January 2024

COP2 is the nomenclature for PSP's CPU Vector Floating Point Unit, or shortly VFPU.

Specifications[edit | edit source]

  • Functionality is similar to PS2's VU0 Macromode, but with less exposed pipeline and without own memory and DMA interface.
  • It is designed for vector and matrix operations.
  • It supports some trigonometric functions, binary logarithm, square root, and others.
  • It has 128 32-bit registers, and additional 16(?) 32 bits control registers.
  • Reconfigurable as scalar, vector or matrix.
  • It can handle these types of numbers:
    • 32-bit IEEE 754 floating-point numbers
      • Note: Unit is not fully IEEE 754 compliant. Denormals are treated as zero. Hardcoded nearest rounding mode. Some other not yet reversed math quirks which ends up with different results comparing to IEEE 754. While unit is much closer to IEEE 754 than FPU/VU in PS2, its behavior is still not fully understood.
    • 32-bit integer numbers.
    • 16-bit integer numbers.
    • 8-bit integer numbers.
    • 16-bit floating-point numbers (half-precision float).

Instructions[edit | edit source]

Instruction Operation Time (in cycles)
vmmul.q vd, vs, vt 4×4 matrix multiply 22 cycles

See also[edit | edit source]