Definitions Flashcards
Real-time system
- Must meet a timing deadline
- Must be able to validate that their timing is corrrect
When is a system safety critical
If a failure can cause loss of goods, money or life
Give 2 benefits of smaller sampling period
- Better approximation of analogue signal
- Reduces oscillation
Disadvantage of smaller sampling period
Demanding of processor time
Multi-rate control systems
Have aspects (sensors, actuators etc.) that depend on different timing rates
Give 3 difficulties associated with RT systems
- Requires concurrent control of separate system components
- Reactive behaviour is unpredictable
- If the system guarantees a certain response time, the worst case response times must be predicted
- Haha here’s a 4th fuck you James
Fast RT system
System must act in a short amount of time in response to an input
Slow RT system
The system doesn’t need to act quickly in response to an input
Hard RT system
Must meet a hard deadline
Soft RT system
The moment in time that an action must occur isn’t that important
Embedded system
Performs one type of job
What converts assembly to machine code
Assembler
Give 4 benefits of C over assembly language
- Easier and quicker
- Easier to modify and update
- Can use function libraries
- Code is portable
Register
Storage location that can read/write to ALL bits at the same time
Which is quicker, a register or RAM?
Register
Do values from RAM go straight into processing?
No, they are stored in a register first
Accumulator
Accumulates the RESULT of arithmetic. Is the most versatile
R Registers
General purpose
B Registers
Like an accumulator but only for * and /
Data pointer
Points to data
Program Counter (PC)
Points to next instruction in memory
Stack pointer
Points to the next value to be removed from the stack
Signed integer data type
16 bit signed integer
Bit data type
1 bit, used for RAM
S bit data type
1 Bit, used for SFRs
Special Function Registers
Registers that deal with things such as I/O, power management. Can be bit or byte addressable
Sfr data type
8 bit, for byte-addressable SFRs
Give 2 benefits of software delays
- Don’t require hardware timers
- Work (imprecisely) on any micro-processor
Give 2 drawbacks of software delays
- It is difficult to make them accurate (use oscilloscope)
- Must be readjusted to use on different micro-processor, clock frequency or even compiler
What is the Machine Cycle?
Fetch, Decode, Execute, Store
What determines the clock period?
Crystal frequency
Give each stage of the Waterfall model for system development
- Requirements analysis and specification
- High level design
- Detailed design
- Coding
- Unit testing
- Integration testing
- System and acceptance testing
Interrupt
Signal sent to the CPU that pauses the current program execution to instead execute some code associated with the event
External interrupts
Interrupts that come from outside the chip, via interrupt pins
Unit testing
Test individual components for functionality. Should be able to write the tests before the code
Test driven development (TDD)
Write the tests first, implement the code, test code and adjust until it passes the tests. Then repeat for the next part of the program