Model Based Design (MDB)
De la simulation au programme embarqué
$\underbrace{1}_{sign\ (1)} \ \underbrace{1111111}_{mantisse\ (7)} * \underbrace{slope}_{\text{LSB value}}$
$v = (mantisse-sign*128) * slope $
plage: $\pm 2^{7} * slope$
2 digit [0-9] significatifs
$\underbrace{1}_{sign\ (1)} \ \underbrace{11111111}_{exponent\ (8)} \ \color{yellow}{1}\underbrace{11111111111111111111111}_{mantisse\ (23)} $
$v \approx (1-2 sign) * mantisse * 2^{exponent-127}$
plage: $\pm 2^{128} = \pm 3.4*10^{38}$
7 digit [0-9] significatifs
IEEE 754 | Single | Double |
---|---|---|
Format width | 32 | 64 |
Sign bit | 1 | 1 |
exponent width | 8 | 11 |
Precision width | 23+1 | 52+1 |
1st phantom bitof the significand is always 1.
$\underbrace{1}_{sign\ (1)} \ \underbrace{1111}_{exponent\ (4)} \ \color{yellow}{1}\underbrace{111}_{mantisse\ (3)} $
$v \approx (1-2 sign) * mantisse * 2^{exponent-127}$
plage: $\pm 2^{128} = 3.4*10^{38}$
0.9 digit [0-9] significatifs
Parameter | Single | Double | Custom |
---|---|---|---|
Format width | 32 | 64 | 8 |
Sign bit | 1 | 1 | 1 |
exponent width | 8 | 11 | 4 |
Precision width | 23+1 | 52+1 | 3+1 |
% 4 bit exponent (signed)
emin = -7; emax = 6;
% 3 bits significand
p = 3;
exps = 2.^[emin:emax];
vals = (2^p) + [0:(2^p-1)]; % significand with leading 1
TotalVal = vals'*exps;
% add denormalized values
8bitFloat = unique([TotalVal ; 2^emin * [0:(2^m-1)]']);
8bitFloat = unique(flipud(-TotalVal) ;TotalVal]); % with neg vals
Modélisation en temps continue:
transformé de Laplace en p (s)
Implémentation en temps discret:
“pas” de calcul fixe
Single-rate:
Multi-Rate
Single-Tasking: Dans le slot de temps, l’exécution de tous les blocks doit se terminer avant la fin du slot.
Multi-Tasking: Préemption possible -> Monotonic Rate Scheduler
Single-Tasking @ 20 MIPS -> Overload
Multi-Tasking @ 20 MIPS -> Ok
Right Arrow
or Space
Left Arrow
Home
End
Esc
S
F
Alt + Click