Fab Academy 2022

@ Opendot, Milan

Embedded programming

For the Group assignment, we had to compare the performance and development workflows of different architectures.

Embedded hardwares are based around microprocessors and microcontrollers, also include memory, bus, Input/Output, Controller, where as embedded software includes embedded operating systems, different applications and device drivers.

Microcontrollers

A microcontroller is a complete programmable circuit, capable of executing the orders recorded in its memory. It is composed of several functional blocks that fulfill a specific task. A microcontroller includes within it the three main functional units of a computer: microprocessor, memory, and input/output peripherals. Essentially, a microcontroller gathers input, processes this information, and outputs a certain action based on the information gathered. Microcontrollers usually operate at lower speeds, around the 1MHz to 200 MHz range, and need to be designed to consume less power because they are embedded inside other devices that can have greater power consumptions in other areas.

Microprocessors

A Microprocessor is an electronic component that is used by a computer to do its work. It is a central processing unit on a single integrated circuit chip containing millions of very small components including transistors, resistors, and diodes that work together. Some microprocessors in the 20th century required several chips. Microprocessors help to do everything from controlling elevators to searching the Web. Everything a computer does is described by instructions of computer programs, and microprocessors carry out these instructions many millions of times a second.

Von Neumann

The Von Neumann architecture is a type of hardware architecture for stored-program digital programmable computers that shares programme data and program instructions in the same memory space: programs and data are stored in a separate storage unit called memories and are treated the same.

It is also known as IAS computer and is having five basic units:

Inside the ALU is a register called the accumulator, which acts as a bridge between input and output thanks to a special instruction that loads a word from the memory to the accumulator and vice versa. It is important to emphasise that this architecture, unlike others, is distinguished by the fact that it stores both the data of running programmes and their code within the memory unit.



Whatever is done to enhance performance, it cannot be gotten away from the fact that instructions can only be done one at a time and can only be carried out sequentially. Both of these factors hold back the competence of the CPU: this is commonly referred to as the ‘Von Neumann bottleneck’.

Harvard architecture

Harvard Architecture was basically developed to overcome the bottleneck of Von Neumann Architecture. It is the digital computer architecture whose design is based on the concept where there are separate storage and separate buses (signal path) for instruction and data. The main advantage of having separate buses for instruction and data is that the CPU can access instructions and read/write data at the same time.



A comparison between the two architectures.

VON NEUMANN HARVARD
Same physical memory address is used for instructions and data. Separate physical memory address is used for instructions and data.
There is common bus for data and instruction transfer. Separate buses are used for transferring data and instruction.
Cheaper. Expensive.
CPU can not access instructions and read/write at the same time. CPU can access instructions and read/write at the same time.
It is used in personal computers and small computers. It is used in microcontrollers and signal processing.

CISC and RISC

CISC and RISC (Complex and Reduced Instruction Set Computer, respectively) are dominant processor architecture paradigms.

CISC

A complex instruction set computer (CISC) is a computer architecture in which single instructions can execute several low-level operations (such as a load from memory, an arithmetic operation, and a memory store) or are capable of multi-step operations or addressing modes within single instructions.

To improve performance, CISC systems try to reduce the number of instructions programs must call. To do this, they have large sets of microcode instructions that cover a broad range of tasks. A single microcode instruction, in turn, when translated in the CPU, may become several tasks the processor performs. As a consequence, instructions are of variable length and often require more than one clock cycle to complete.



RISC

A Reduced Instruction Set Computer is a type of microprocessor architecture that utilizes a small, highly-optimized set of instructions rather than the highly-specialized set of instructions typically found in other architectures. RISC is an alternative to the CISC architecture and is often considered the most efficient CPU architecture technology available today. With RISC, a CPU implements the processor design principle of simplified instructions that can do less but can execute more rapidly. The result is improved performance. A key RISC feature is that it allows developers to increase the register set and increase internal parallelism by increasing the number of parallel threads executed by the CPU and increasing the speed of the CPU's executing instructions. ARM, or “Advanced RISC Machine” is a specific family of instruction set architecture that’s based on reduced instruction set architecture developed by Arm Ltd. Processors based on this architecture are common in smartphones, tablets, laptops, gaming consoles and desktops, as well as a growing number of other intelligent devices.

RISC systems, on the other hand, seek to improve performance by reducing the number of clock cycles required to perform tasks. They have small sets of simplified instructions, doing away with microcode altogether in most cases. While this means that tasks require more instructions, instructions are all of the same length and usually require only one clock cycle to complete. Because of this, RISC systems are capable of processing instructions in parallel in a process called pipelining. The CPU works on more than one instruction at once by starting the second instruction before it completes the first one.





Resources
UITS

Instructor

Contacts