Introduction To Software Rendering On Embedded Systems
Introduction To Software Rendering On Embedded Systems
SOFTWARE RENDERING ON
EMBEDDED SYSTEMS
AHMED TOLBA
IN THE BEGINNING THERE WERE THE PIXEL
)13-1 في البدأ كان الكلمه ( يوحنا
GPU ( GRAPHICS PROCESSING UNIT )
• Things that are left like transformation, it’s basically a 3D mathematical models of
transforming the vertices from local coordinates to world coordinates.
• A lot of matrices are involved, multiplication,..etc
• Microcontrollers are not supported for these purposes, usually as I said in modern mobile
phones, there is a dedicated GPU for that purpose.
• But you can do fully 3D Graphics on new generation of ARM Cortex series.
• They have full hardware implementation for DSP thinness like matrix multiplications,
calculating fast Fourier transform, they even have FPUs!.
IMPORTANT STUFF NOT RELATED TO
SESSION
• There are few things that I need to talk about to become a very good embedded software engineer.
• Know your hardware and its capabilities.
• Lets talk about State Machines, Data Structure and algorithms, whey they are important in
embedded software.
• Usually any CS guy is proficient in those stuff, they study automata, deterministic, not
deterministic machines, petri nets,..etc.
• They know more about Data structures and algorithms, their complexities, how to use a specific
algorithm in certain problem.
DATA STRUCTURES AND ALGORITHMS
• Binary search, suppose you have a dictionary and you want to search for a word.. You open in the
middle and look for that word, if it’s on the left, then you got to the middle, and check if the word is
the middle element, if its not then it should be in the right part, you continue that process…
• Complexity in terms of time is O Log N, you keep dividing the problem into two.
• A Constraint, the data should be sorted to look for items. (1,2,3,9,11)… search for 3 in that list..
• Suppose you have a phone book embedded system, and you have million of items.. And you need to
search for name Ahmed.. If the data is not sorted you need to make a loop that has 1M counts, and you
keep checking in the name Ahmed is in the list or not.
• By sorting the data and using binary search, you can optimize the time complexity to LOG 1M
DATA STRUCTURE AND ALGORITHMS
• Look up tables
• Build a table of pre-calculated values of sin and cos
• Useful for rotating a point in 2D, or calculating distances between two GPS points.
• Unrolling the loop, a simple loop is constructed by comparison, increment and jump
• If the body of the loop is simple, you can unroll the loop, or if you are doing heavily calculations inside
the body of the loop then there is no need to unroll the loop.
• Fixed point math is emulating the floating point arithmetics using integers
• Most microcontrollers don’t have FPUs, it’s very useful to use fixed point math instead of simulated
floating points that are done by the compiler.
QUESTION RELATED TO THE SESSION
OPEN QUESTIONS
MANY THANKS!