Chapter 07 - HWSW Co-Design and Prog Modeling
Chapter 07 - HWSW Co-Design and Prog Modeling
1
@ McGraw-Hill Education
2
@ McGraw-Hill Education
❑Model Selection
✓ A Model captures and describes the system characteristics
✓ A model is a formal system consisting of objects and composition
rules
✓ It is hard to make a decision on which model should be followed
in a particular system design.
✓ Most often designers switch between a variety of models from the
requirements specification to the implementation aspect of the
system design
✓ The objectives vary with each phase
3
@ McGraw-Hill Education
Architecture Selection
✓ A model only captures the system characteristics and does not
provide information on ‘how the system can be manufactured?’
✓ The architecture specifies how a system is going to implement in
terms of the number and types of different components and the
interconnection among them
✓ Controller architecture,
✓ Datapath Architecture,
✓ Complex Instruction Set Computing (CISC), Reduced Instruction
Set Computing (RISC),
✓ Very long Instruction Word Computing (VLIW),
✓ Single Instruction Multiple Data (SIMD), Multiple Instruction
Multiple Data (MIMD) etc are the commonly used architectures in
system design
4
@ McGraw-Hill Education
Language Selection
✓ A programming Language captures a ‘Computational Model’ and
maps it into architecture
✓ A model can be captured using multiple programming languages
like C, C++, C#, Java etc for software implementations and
languages like VHDL, System C, Verilog etc for hardware
implementations
✓ Certain languages are good in capturing certain computational
model. For example, C++ is a good candidate for capturing an
object oriented model.
✓ The only pre-requisite in selecting a programming language for
capturing a model is that the language should capture the model
easily
5
@ McGraw-Hill Education
6
@ McGraw-Hill Education
y 8
@ McGraw-Hill Education
9
@ McGraw-Hill Education
10
@ McGraw-Hill Education
a T b
F
11
@ McGraw-Hill Education
12
@ McGraw-Hill Education
13
@ McGraw-Hill Education
14
@ McGraw-Hill Education
15
@ McGraw-Hill Education
Ignition Key ON
Alarm
Ignition Key OFF Waiting
Off
A Seat Belt ON
la
rm
ire
Ig Sea Ti
p
ni t m
Ex
tio Be eE
er
n lt xp
m
K O ire
Ti
ey N
O
FF Alarm
On
16
@ McGraw-Hill Education
17
@ McGraw-Hill Education
18
@ McGraw-Hill Education
Ignition Key ON
Hardware Software Co-Design and Program Modeling
Wait for 10 Seconds
Ignitiont ON?
Y
Seat Belt ON?
N
Set Timer for 5 Seconds
Start Alarm
Ignition ON
NO
Y
YES
NO Seat Belt ON?
N
Stop Alarm
19
End
@ McGraw-Hill Education
#define ON 1
#define OFF 0
#define YES 1
#define NO 0
void seat_belt_warn()
{
wait_10sec();
if (check_ignition_key()==ON)
{
if (check_seat_belt()==OFF)
{
set_timer(5);
start_alarm();
while ((check_seat_belt()==OFF )&&(check_ignition_key()==OFF )&&
(timer_expire()==NO));
stop_alarm();
}
} 20
}
@ McGraw-Hill Education
(a)
22
@ McGraw-Hill Education
(b) 23
@ McGraw-Hill Education
24
@ McGraw-Hill Education
25