Changes

Jump to: navigation, search

SPO600 Inline Assembler Lab

297 bytes added, 12:52, 2 October 2019
no edit summary
[[Category:SPO600 Labs- Retired]]
{{Admon/lab|Purpose of this Lab|This lab is designed to explore the use of inline assembler, and its use in open source software.}}
{{Admon/important|This lab is not used in the current semester.|Please refer to the other labs in the [[:Category:SPO600 Labs|SPO600 Labs]] category.}}
== Lab 6 ==
Many of the AArch64 "Advanced SIMD" instructions are designed for use with multimedia data. In this example, we will be using the SQDMULH instruction, which is a "Signed Saturating Doubling Multiply returning High Half". Breaking this down:
* As a vector (SIMD) instruction, this operation works on multiple values in parallel. It can operate on 16- or 32-bit values; since we're dealing with 16-bit signed sound samples, we will use 16-bit values.
* "Saturating" means that if the result overflows (or underflows) the maximum (or minimum) values, the result will be the maximum (or minimum) value. This is useful for graphics, where brightening a pixel that is at 90% brightness by an addition additional 50% should produce a pixel that is at maximum brightness, even though that's not mathematically correct. Likewise, a sound sample that is increased in volume should not increase past the maximum signal limit.
* We're going to use this instruction to multiply sound samples by a volume scaling factor (V). This instruction doubles the result, so that the V factor will effectively be converted from a 16-bit value to a 17-bit value. We can treat this as a fixed-point number with a maximum value of about 1.
* The result of multiplying two 16-bit numbers together is a 32-bit number. In our fixed-point representation, the 32-bit result has sixteen bits to the right of the radix point. Since this instruction takes the "high half" of the result, lowest 16 bits are discarded, keeping only the integer portion of the result -- which is exactly what we need.
 
=== Part A - Class Lab ===
1. Select one of the following open source packages which is not claimed by another person in the class. Put your name beside it in (parenthesis) to claim it.
* amule ( Jacob Adach )
* ardour (Muchtar Salimov)
* avidemux(Guozhao Liang)
* blender (Nathan Misener)
* bunny
* gridengine
* groonga
* hoard(Colin McManus)
* iaxclient
* k9copy
* lame (Edgard Arvelaez)
* libfame
* libgcroots
* libmad(Danny Chen)
* libmlx4
* lightsparc
* mediatomb
* mjpegtools(Elliot Maude)
* mlt
* mosh
* mpich2
* ocaml-zarith
* openblas(Hojung An)
* opencore-amr
* openser
* picprog
* qlandkartegt
* sooperlooper(Fahad Karar)* traverso (Ebaad Ali)

Navigation menu