Professional Documents
Culture Documents
UNI TV
CA SE STUDY
hardware/software systems:
Degree of programmability
Access to programming
Levels of programming
Implementation Features
Discrete vs. integrated components
Fabrication technologies
Categories of Codesign Problems
Codesign of embedded systems
Usually consist of sensors, controller, and actuators
Are reactive systems
Usually have real-time constraints
Usually have dependability constraints
Codesign of ISAs
Application-specific instruction set processors (ASIPs)
Compiler and hardware optimization and trade-offs
Hardware/Software Partitioning
Architectural assumptions - type of processor, interface style between hardware and
software, etc.
Partitioning objectives - maximize speedup, latency requirements, minimize size, cost,
etc.
Partitioning strategies - high level partitioning by hand, automated partitioning using
various techniques, etc.
Scheduling
Operation scheduling in hardware
Instruction scheduling in compilers
Process scheduling in operating systems
Modeling the hardware/software system during the design process
CPUs
Example: data compressor.
Goal:
Compress data transmitted over serial line.
Receives byte-size input symbols.
Produces output symbols packed into bytes.
Will build software module only here.
Collaboration diagram for compressor
1..m: packed
1..n: input output
symbols symbols
buffer: data-buffer
table: symbol-table
current-bit: integer
encode(): boolean,
data-buffer
flush()
new-symbol-table()
data-compressor behaviors
encode: Takes one-byte input, generates packed
encoded symbols and a Boolean indicating whether
the buffer is full.
new-symbol-table: installs new symbol table in object,
throws away old table.
flush: returns current state of buffer, including
number of valid bits in buffer.
Auxiliary classes
data-buffer symbol-table
databuf[databuflen] : symbols[nsymbols] :
character data-buffer
len : integer len : integer
1 1
data-buffer symbol-table
Encode behavior
create new buffer return true
T add to buffers
input symbol
F
add to buffer return false
Insert behavior
pack into
input T this buffer
symbol
F
pack bottom bits
into this buffer,
top bits into
overflow buffer
Program design
In an object-oriented language, we can reflect the
UML specification in the code more directly.
In a non-object-oriented language, we must either:
add code to provide object-oriented features;
diverge from the specification structure.
C++ classes
Class data_buffer {
char databuf[databuflen];
int len;
int length_in_chars() { return len/bitsperbyte; }
public:
void insert(data_buffer,data_buffer&);
int length() { return len; }
int length_in_bytes() { return (int)ceil(len/8.0); }
int initialize();
...
C++ classes, cont’d.
class data_compressor {
data_buffer buffer;
int current_bit;
symbol_table table;
public:
boolean encode(char,data_buffer&);
void new_symbol_table(symbol_table);
int flush(data_buffer&);
data_compressor();
~data_compressor();
}
C code
struct data_compressor_struct {
data_buffer buffer;
int current_bit;
sym_table table;
}
typedef struct data_compressor_struct data_compressor,
*data_compressor_ptr;
boolean data_compressor_encode(data_compressor_ptr
mycmptrs, char isymbol, data_buffer *fullbuf) ...
Testing
Test by encoding, then decoding:
symbol table
compare
Code inspection tests
Look at the code for potential problems:
Can we run past end of symbol table?
What happens when the next symbol does not fill the
buffer? Does fill it?
Do very long encoded symbols work properly? Very
short symbols?
Does flush() work properly?
Program design and analysis
Software modem.
Theory of operation
Frequency-shift keying:
separate frequencies for 0 and 1.
0 1
time
FSK encoding
Generate waveforms based on current bit:
0110101
bit-controlled
waveform
generator
FSK decoding
A/D converter
zero filter detector 0 bit
sample-in()
input()
bit-out()
Transmitter 1 1 Line-out*
bit-in()
output()
sample-out()
System architecture
Interrupt handlers for samples:
input and output.
Transmitter.
Receiver.
Transmitter
Waveform generation by table lookup.
float sine_wave[N_SAMP] = { 0.0, 0.5, 0.866, 1, 0.866,
0.5, 0.0, -0.5, -0.866, -1.0, -0.866, -0.5, 0};
time
Receiver
Filters (FIR for simplicity) use circular buffers to hold
data.
Timer measures bit length.
State machine recognizes start bits, data bits.
Hardware platform
CPU.
A/D converter.
D/A converter.
Timer.
Component design and testing
Easy to test transmitter and receiver on host.
Transmitter can be verified with speaker outputs.
Receiver verification tasks:
start bit recognition;
data bit recognition.
System integration and testing
Use loopback mode to test components against each
other.
Loopback in software or by connecting D/A and A/D
converters.
Personal digital assistant
Uses
Automobile navigation
Ruggedized PDAs
Medical and scientific uses
Educational uses
Sporting uses
SET-TOP-BOX
SET-TOP-BOX ARCHITECTURE
“Briefly,
What OSS/FSSource
is Free/Open programs are programs whose licenses give users the
Software?
freedomto run the program for any purpose, to study and modify the
program, and toredistribute copies of either the original or modified
program (without having topay royalties to previous developers).” David
Wheeler1
WHY FOSS?
“Open-source software has been called many things: a movement, a fad, a
virus,a Communist conspiracy, even the heart and soul of the Internet. But
one point isoften overlooked: Open-source software is also a highly
effective vehicle for thetransfer of wealth from the industrialized world to
developing countries.”Andrew Leonard13
The FOSS development method
Reduced duplication of effort
Building upon the work of others
Better quality control
Reduced maintenance costs
The benefits of using FOSS
Besides the low cost of FOSS, there are many other
reasons
Security
Reliability/Stability
Open standards and vendor independence
Reduced reliance on imports
Developing local software capacity
Piracy, IPR, and WTO
Localization