Glossary (Digital Systems)

From Spivey's Corner
Jump to: navigation, search
ABI(Application Binary Interface). A set of conventions about the use of registers and memory in calling subroutines, including which registers are used to pass parameters, and which must be saved and restored if they are used by a subroutine. By adhering to the same conventions, subroutines compiled from different languages can be made to operate together.
(Application Binary Interface). A set of conventions about the use of registers and memory in calling subroutines, including which registers are used to pass parameters, and which must be saved and restored if they are used by a subroutine. By adhering to the same conventions, subroutines compiled from different languages can be made to operate together.
assembly languageA symbolic representation of the machine code for a program.
A symbolic representation of the machine code for a program.
callee-save registerIn an ''ABI'', a register whose value must be preserved by a subroutine, and restored before the subroutine returns to whatever value it had before the call. On ARM Cortex-M machines, the ABI defines registers @r4@--@r7@ (and, less importantly, @r8@--@r11@) to be callee-save.
In an ABI, a register whose value must be preserved by a subroutine, and restored before the subroutine returns to whatever value it had before the call. On ARM Cortex-M machines, the ABI defines registers r4--r7 (and, less importantly, r8--r11) to be callee-save.
condition codesFour bits, @N@, @Z@, @V@ and @C@, in the processor status word that indicate the result of a comparison or other arithmetic operation. Briefly, @N@ indicates whether the result of the operation was negative, @Z@ indicates whether it was zero, @C@ is the value of the carry-out bit from the ALU, and @V@ indicates whether the operation overflowed, yielding a result that was different in sign from what could be predicted from the inputs to the operation. A comparison is treated like a subtraction as far as setting the condition codes is concerned. After the condition codes have been set, a subsequent conditional branch instruction can test them, and make a branch decision based on a boolean combination of their values. All ten arithmetic comparisons (equal, not-equal, and less-than, less-than-or-equal, greater-than, and greater-than-or-equal for both signed and unsigned representations) can be represented in this way. When a process is interrupted, the condition codes must be saved and restored as part of the processor state, in case the interrupt came between a comparison and a subsequent conditional branch.
Four bits, N, Z, V and C, in the processor status word that indicate the result of a comparison or other arithmetic operation. Briefly, N indicates whether the result of the operation was negative, Z indicates whether it was zero, C is the value of the carry-out bit from the ALU, and V indicates whether the operation overflowed, yielding a result that was different in sign from what could be predicted from the inputs to the operation. A comparison is treated like a subtraction as far as setting the condition codes is concerned. After the condition codes have been set, a subsequent conditional branch instruction can test them, and make a branch decision based on a boolean combination of their values. All ten arithmetic comparisons (equal, not-equal, and less-than, less-than-or-equal, greater-than, and greater-than-or-equal for both signed and unsigned representations) can be represented in this way. When a process is interrupted, the condition codes must be saved and restored as part of the processor state, in case the interrupt came between a comparison and a subsequent conditional branch.
CMSIS(Cortex Mobile Software Interface Standard)
(Cortex Mobile Software Interface Standard)
cross compilingusing a compiler on one machine to translate programs into binary code for a different machine. In the course, we will use a PC running Linux to compile code the the <span style="font-family: 'Roboto Slab', Ubuntu, sans-serif">micro:bit</span>, and ARM-based device: this is convenient because the <span style="font-family: 'Roboto Slab', Ubuntu, sans-serif">micro:bit</span> itself is too small to run a compiler and other tools.
using a compiler on one machine to translate programs into binary code for a different machine. In the course, we will use a PC running Linux to compile code the the micro:bit, and ARM-based device: this is convenient because the micro:bit itself is too small to run a compiler and other tools.
crystal oscillatoran electronic oscillator with a highly stable frequency, determined by piezo-electric vibrations in a quartz crystal. Most microcontroller chips contain the active parts of a crystal oscillator, requiring only the addition of an external crystal and a couple of loading capacitors in order to form a stable oscillator for the system clock. The <span style="font-family: 'Roboto Slab', Ubuntu, sans-serif">micro:bit</span> has a 16MHz crystal that determines the clock frequency for the nRF51822.
an electronic oscillator with a highly stable frequency, determined by piezo-electric vibrations in a quartz crystal. Most microcontrollerA single integrated circuit that contains a microprocessor together with some memory (usually both RAM for dynamic state and ROM for storing a persistent program) and peripheral interfaces. chips contain the active parts of a crystal oscillator, requiring only the addition of an external crystal and a couple of loading capacitors in order to form a stable oscillator for the system clock. The micro:bit has a 16MHz crystal that determines the clock frequency for the nRF51822.
flash memorysee ''Read-only memory''.
see Read-only memory.
GPIO(General-Purpose Input/Output). A peripheral interface that provides direct access to pins of the microcontroller chip. Pins may be configured as inputs or outputs, and interrupts may be associated with state changes on certain input pins. On the <span style="font-family: 'Roboto Slab', Ubuntu, sans-serif">micro:bit</span>, the LEDs and pushbuttons are connected to GPIO pins.
(General-Purpose Input/Output). A peripheral interface that provides direct access to pins of the microcontroller chip. Pins may be configured as inputs or outputs, and interrupts may be associated with state changes on certain input pins. On the micro:bit, the LEDs and pushbuttons are connected to GPIO pins.
I2C
(Inter-Integrated Circuit Bus). A synchronous serial communications standard widely used for internal communication within a computer system, especially between a microcontroller and peripherals implemented as integrated circuits, with a bandwidth of 100kbaud or higher. Apart from power and ground, only two wires are required for a bus connecting many chips: the data line SDA and the clock line SCL. Both are active-high with pullup resistors, and are driven by each device using an open-collector (open-drain) output, acheiving effectively wired-or logicA bus convention where a wire carries a 1 bit if any device connected to it is transmitting a 1. This is commonly implemented by having each device connected to the bus with an open-collector output, and wiring a pullup resistor from the wire to the positive power rail. Devices then signal a 1 by pulling the wire low.; this makes bus arbitration fairly simple. Each device on an I2C bus has a distinct, seven-bit address, and ignores transactions that do not begin with its own address, so that multiple slave devices can share the bus.
linker scriptA text, written in a specialised language, that describes the layout in memory of a program. Compilers typically divide their output into four named sections: @text@ for the program code and embedded constants, @data@ for statically allocated data that has a specified initial value other than zero, @rodata@ for initialised data that is constant, and @bss@ for data that is statically allocated but can initially be filled with zeroes. The linker script may add another section for the program's stack. For microcontrollers, a linker script is needed that puts the @text@ and @rodata@ in Flash, and lays out the RAM so that @stack@ and @bss@ are in separate areas, with the @data@ copied into its own part of RAM from an image held in Flash.
A text, written in a specialised language, that describes the layout in memory of a program. Compilers typically divide their output into four named sections: text for the program code and embedded constants, data for statically allocated data that has a specified initial value other than zero, rodata for initialised data that is constant, and bss for data that is statically allocated but can initially be filled with zeroes. The linker script may add another section for the program's stack. For microcontrollers, a linker script is needed that puts the text and rodata in Flash, and lays out the RAM so that stack and bss are in separate areas, with the data copied into its own part of RAM from an image held in Flash.
link registerOn ARM processors, a register (@r14@) in which the ''program counter'' value is saved by the instructions @bl@ and @blx@ that call a subroutine. The subroutine can return by branching to this address with the instruction @bx lr@, or can save the value on the stack (with @push {..., lr}@) and later return by restoring the same value back into the program counter (with @pop {..., pc}@).
On ARM processors, a register (r14) in which the program counterA register that contains the address of the next instruction to be executed. Because of pipelining, on ARM Cortex-M machines, reading the program counter yields a value that is 4 bytes greater than the address of the current instruction. value is saved by the instructions bl and blx that call a subroutine. The subroutine can return by branching to this address with the instruction bx lr, or can save the value on the stack (with push {..., lr}) and later return by restoring the same value back into the program counter (with pop {..., pc}).
low registerOn Cortex-M processors, one of the general-purpose registers @r0@--@r7@ that can be used in most instructions. Of the remaining, ''high'' registers, the stack pointer @r13@, the link register @r14@, and the program counter @r15@ serve special purposes, and are accessed implicitly by certain instructions. The other high registers, @r8@--@r11@ are accessible using only a very few instructions, and are little used.
On Cortex-M processors, one of the general-purpose registers r0--r7 that can be used in most instructions. Of the remaining, high registers, the stack pointera register @sp@ that holds the address of the most recent occupied word of the subroutine stack. On ARM, as on most recent processors, the subroutine stack grows downwards, so that the @sp@ holds the lowest address of any occupied work on the stack. r13, the link register r14, and the program counter r15 serve special purposes, and are accessed implicitly by certain instructions. The other high registers, r8--r11 are accessible using only a very few instructions, and are little used.
map fileA report produced by the linker, showing what library modules were included in the program, and for each module where in the program image it has been put.
A report produced by the linker, showing what library modules were included in the program, and for each module where in the program image it has been put.
memory management unitA processor component that comes between the CPU and the memory, and efficiently translates ''virtual addresses'' generated by the running process into ''physical addresses'' denoting a specific storage location. By varying the parameters of the translation, an operating system can arrange that different processes exist in distinct, separate address spaces. Microcontrollers commonly lack an MMU, and all processes then run in the same address space, and must be carefully written not to interfere with each other.
MMUA processor component that comes between the CPU and the memory, and efficiently translates ''virtual addresses'' generated by the running process into ''physical addresses'' denoting a specific storage location. By varying the parameters of the translation, an operating system can arrange that different processes exist in distinct, separate address spaces. Microcontrollers commonly lack an MMU, and all processes then run in the same address space, and must be carefully written not to interfere with each other.
A processor component that comes between the CPU and the memory, and efficiently translates virtual addresses generated by the running process into physical addresses denoting a specific storage location. By varying the parameters of the translation, an operating system can arrange that different processes exist in distinct, separate address spaces. Microcontrollers commonly lack an MMU, and all processes then run in the same address space, and must be carefully written not to interfere with each other.
microcontroller
A single integrated circuit that contains a microprocessorAn integrated circuit that contains a complete CPU. together with some memory (usually both RAM for dynamic state and ROM(Read-Only Memory) A form of storage whose contents are non-volatile (are not lost when the power is off) but cannot be changed under program control. Modern ROM is usually EEPROM -- Electrically Erasable Programmable Read Only Memory, and ''can'' be changed electrically, and even under control of a program running on the microcontroller, but using special peripheral registers and not the normal store instructions. ''Flash memory'' is a modern, super-compact implementation of EEPROM, but for our purposes it does exactly the same job. We will modify the contents of the <span style="font-family: 'Roboto Slab', Ubuntu, sans-serif">micro:bit</span>'s flash memory by downloading programs, but we will probably not be writing programs that change the contents of the flash memory. for storing a persistent program) and peripheral interfaces.
microprocessor
An integrated circuit that contains a complete CPU.
nop
An instruction that has no effect, but takes a little time (perhaps one cycle) to execute. In ThumbAn alternative instruction encoding for the ARM in which each instruction is encoded in 16 rather than 32 bits. The advantage is compact code, the disadvantage that only a selection of instructions can be encoded, and only the first 8 registers are easily accessible. In Cortex-M microcontrollers, the Thumb encoding is the only one provided. code, the nop instruction is a synonym for mov r8, r8, and does indeed take one cycle on Cortex-M0.
NVIC(Nested Vector Interrupt Controller). An ARM processor component that is able to assign priorities to external interrupts (as opposed to those generated by internally by the processor) and control the servicing of interrupts. As the name indicates, it is able to cope with nested interrupts, where servicing of one interrupt is itself interrupted by another with higher priority. Note that, according to ARM conventions, higher priorities are indicated by lower numbers.
(Nested Vector Interrupt Controller). An ARM processor component that is able to assign priorities to external interrupts (as opposed to those generated by internally by the processor) and control the servicing of interrupts. As the name indicates, it is able to cope with nested interrupts, where servicing of one interrupt is itself interrupted by another with higher priority. Note that, according to ARM conventions, higher priorities are indicated by lower numbers.
open-collector outputA gate output that consists of a single transistor connected between the output and ground. When the gate is active, it can sink current and pull the output low, but when it is inactive it does not prevent other outputs connected to the same wire from pulling it low. Open collector outputs are commonly used with a separate pull-up resistor connected between the wire and the positive power rail.
open-drain outputA gate output that consists of a single transistor connected between the output and ground. When the gate is active, it can sink current and pull the output low, but when it is inactive it does not prevent other outputs connected to the same wire from pulling it low. Open collector outputs are commonly used with a separate pull-up resistor connected between the wire and the positive power rail.
A gate output that consists of a single transistor connected between the output and ground. When the gate is active, it can sink current and pull the output low, but when it is inactive it does not prevent other outputs connected to the same wire from pulling it low. Open collector outputs are commonly used with a separate pull-up resistor connected between the wire and the positive power rail.
pre-emptive schedulingA form of process scheduling where a process may be suspended when it has run for a certain time, or a process with higher priority becomes ready. Without pre-emptive scheduling, processes are only suspended when they wait for an event.
A form of process scheduling where a process may be suspended when it has run for a certain time, or a process with higher priority becomes ready. Without pre-emptive scheduling, processes are only suspended when they wait for an event.
program counter
A register that contains the address of the next instruction to be executed. Because of pipelining, on ARM Cortex-M machines, reading the program counter yields a value that is 4 bytes greater than the address of the current instruction.
PC-relative addressingAn addressing mode that involves adding a ''small'' constant to the value of the ''program counter'' in order to form an address. On the ARM, PC-relative addressing is used to access tables of large constants that are located at the end of the code for each procedure, giving access to the values of these constants without having to embed large constants in instructions.An addressing mode that involves adding a fixed offset to the value of the program counter in order to form an address. On ARM, a large constant that does not fit in the immediate field of an instruction can be loaded into a register using a PC-relative load instruction. The assembler generated such instructions, and automatically lays out a table of literal values, when a programmer uses the syntax <code>ldr r''n'', =''const''</code>.
An addressing mode that involves adding a fixed offset to the value of the program counter in order to form an address. On ARM, a large constant that does not fit in the immediate field of an instruction can be loaded into a register using a PC-relative load instruction. The assembler generated such instructions, and automatically lays out a table of literal values, when a programmer uses the syntax ldr rn, =const.
RC oscillatorA cheap alternative to a crystal oscillator. A capacitor (''C'') charges through a resistor (''R''), until it reaches a threshold voltage, at which a transistor is switched on to discharge it again, creating an oscillation. The frequency of the oscillation is determined by the time constant ''RC''; it is rather less stable than a crystal oscillator, because both the resistor and the capactor tend to have values that vary significantly with temperature.
A cheap alternative to a crystal oscillator. A capacitor (C) charges through a resistor (R), until it reaches a threshold voltage, at which a transistor is switched on to discharge it again, creating an oscillation. The frequency of the oscillation is determined by the time constant RC; it is rather less stable than a crystal oscillator, because both the resistor and the capactor tend to have values that vary significantly with temperature.
RISC(Reduced Instruction Set Computer) A style of computer design where there are multiple, identical registers, arithmetic instructions that operate between registers, and separate load and store instructions with a limited set of addressing modes.
(Reduced Instruction Set Computer) A style of computer design where there are multiple, identical registers, arithmetic instructions that operate between registers, and separate load and store instructions with a limited set of addressing modes.
ROM
(Read-Only Memory) A form of storage whose contents are non-volatile (are not lost when the power is off) but cannot be changed under program control. Modern ROM is usually EEPROM – Electrically Erasable Programmable Read Only Memory, and can be changed electrically, and even under control of a program running on the microcontroller, but using special peripheral registers and not the normal store instructions. Flash memory is a modern, super-compact implementation of EEPROM, but for our purposes it does exactly the same job. We will modify the contents of the micro:bit's flash memory by downloading programs, but we will probably not be writing programs that change the contents of the flash memory.
stack pointer
a register sp that holds the address of the most recent occupied word of the subroutine stack. On ARM, as on most recent processors, the subroutine stack grows downwards, so that the sp holds the lowest address of any occupied work on the stack.
three-state logicA convention where multiple outputs can share a single wire; those outputs that are not currently driving the wire high or low must be put into a third, high impedance state so as not to interfere with others.
A convention where multiple outputs can share a single wire; those outputs that are not currently driving the wire high or low must be put into a third, high impedance state so as not to interfere with others.
Thumb
An alternative instruction encoding for the ARM in which each instruction is encoded in 16 rather than 32 bits. The advantage is compact code, the disadvantage that only a selection of instructions can be encoded, and only the first 8 registers are easily accessible. In Cortex-M microcontrollers, the Thumb encoding is the only one provided.
twos-complement representationA representation for signed numbers, common to all recent computer systems, where negating a number involves complementing each bit and then adding 1. An advantage of twos-complement representation is that the same adder circuit can be used for both signed and unsigned arithmetic, though the criteria for detecting overflow are different in the two cases.
A representation for signed numbers, common to all recent computer systems, where negating a number involves complementing each bit and then adding 1. An advantage of twos-complement representation is that the same adder circuit can be used for both signed and unsigned arithmetic, though the criteria for detecting overflow are different in the two cases.
UART(Universal Asynchronous Receiver/Transmitter). A peripheral interface that is able to send and receive characters serially, commonly used in the past for communication between a computer and an attached terminal. It is commonly used in ''duplex'' mode, with the transmitter of one device connected to the receiver of the other with one wire, and the receiver of the one connected to transmitter of the other with a different wire. The ''asynchronous'' part of the name refers to the fact that the transmitter and receiver on each wire do not share a common clock, but rely instead on the signalling protocol and precise timing to achieve synchronisation.
(Universal Asynchronous Receiver/Transmitter). A peripheral interface that is able to send and receive characters serially, commonly used in the past for communication between a computer and an attached terminal. It is commonly used in duplex mode, with the transmitter of one device connected to the receiver of the other with one wire, and the receiver of the one connected to transmitter of the other with a different wire. The asynchronous part of the name refers to the fact that the transmitter and receiver on each wire do not share a common clock, but rely instead on the signalling protocol and precise timing to achieve synchronisation.
wired-or logic
A bus convention where a wire carries a 1 bit if any device connected to it is transmitting a 1. This is commonly implemented by having each device connected to the bus with an open-collector output, and wiring a pullup resistor from the wire to the positive power rail. Devices then signal a 1 by pulling the wire low.
Personal tools

Variants
Actions
Navigation
Tools