embedded computer architecture
DESCRIPTION
Embedded Computer Architecture. ASIP Application Specific Instruction-set Processor 5KK73 Bart Mesman and Henk Corporaal. Application domain specific processors (ADSP or ASIP). DSP. Programmable CPU. Programmable DSP. Application domain specific. - PowerPoint PPT PresentationTRANSCRIPT
Embedded Computer Architecture
ASIPApplication Specific Instruction-set
Processor
5KK73
Bart Mesman and Henk Corporaal
04/22/23 Embedded Computer Archtiecture H.Corporaal and B. Mesman
2
flexibility
efficiency
DSP
Programmable CPU
Programmable DSP
Application domain specific
Applicationspecific processor
Application domain specific processors (ADSP or ASIP)
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
3
Application domain specific processors (ADSP or ASIP)
takes a well defined application domain as a starting point• exploits characteristics of the domain (computation kernels)• still programmable within the domain
e.g. MPEG2 coding uses 8*8 DCT transform, DECT, GSM etc ...
performance: clock speed + ILP ILP,DLP, tuning to domain flexible dev. (new apps.) cost effective (high volume)
Appl. domain
implementation
ADSP
implementation
Appl. domain
GP
problems - specification manual design, - design time and effort large effort => synthesized cores
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
4
Part DescriptionClock(MHz)
Size(gates)
ROM(Kbyte)
RAM(Kbyte)
Speech Components
ADPCM Full duplex ITU-T G.726 compliant and 40 kbit/s speech-compression encoder/decoder. 4 5,100 1.3 0.128
ADPCM-16 Full duplex 16 Channel ITU-T G.726 compliant 16, 24, 32 and 40 kbit/s speech-compression encoder/decoder. 32 10,200 1.3 2.048
IW-ASRSpeechRecognition
Template-based speaker-dependent, isolated-word automatic speech recognition 1.3 9,000 6approx.1kbyte/word
G.723.1 Low bit-rate ITU-TG.723.1 compliant speech-compression at 6.3 kbit/s; can be combined with G.723.1A. 20 24,000 22 2.3
G.723.1AExtended version of G.723.1 to reduce bit rate by a silence compression scheme. Uses voice activity detection andcomfort-noise generation. Fully compliant with Annex A of speech-compression standard CODEC G.723.1.Yields no additional hardware cost.
20 24,000 22 2.3
SpeechSynthesis
Phrase-concatenated speech synthesisDepends on compressionrequirements
Telecommunications
EchoCancellation
High-performance Echo-cancellation and suppression processor. 4 6,000 2.80 0.15
DTMF Full-duplex DTMF transceiver. 2 4,000 1.00 0.15
Caller-ID On-hook and off-hook caller line identification. Includes DTMF and V.23. 3 6,000 2.10 0.15
Reed-Solomon Full-duplex Reed-Solomon codec 7,000 3.75 0.15
ViterbiDecoder
Configurable rate, code and constraint-length. (depending on throughput) Configurable traceback depth. Supportssoft & hard decision making. Supports code puncturing.
5,000
to9,000
--- ---
V.23 modem ITU-T V23 compliant 1200 baud FSK modem 6,000 0.80 0.15
Other
Pink NoiseGenerator
Low-ripple pink noise filter with filter characteristic of -3 ± 0.08 dB per octave over the bandwidth 20Hz to 20kHz 4,000 0.10 0.10
CCIR 656/601 Digital video converter : CCIR to raw-video data and vice versa. 1,500 none none
www.adelantetech.com
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
5
application(s)processor
-model
OK?
more appl.? yes
no
noyes
Estimationscycles/algoccupation
HWdesign
SW (code generation)
Estimationsnsec/cycle,
area, power/instr
go to phase 2
3 phases 1. exploration 2. hw design (layout) + processing 3. design appl. sw
Fast, accurate and early feedback
Design process
parametersinstance
e.g. VLIW withshared RFs
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
6
*1
+2
*3
*4
*5
+6
+7
*8
*9
+10
IPB
OPB
ALU
MULT
IPB
OPB
+2*3
*1
*1
*3
+2
*1
*3
*4
*3
*4
*4
*3+6
*3
+6
+7*8
*5
*5
*8
*8
+7
*5
*9
*5
*9
*5
*9+10
*9
+10
CandidateLIST
Conflict & Priority Comp.
ScheduledOperation
0 0
1 1
2 2
3 3
4 4
5
ASIP/VLIW architectures: list scheduling
7
#define NTAPS 4
int fir(int in)int i;static int state[NTAPS];static int coeff[NTAPS];int out[NTAPS];
state[NTAPS] = in;out[0] = state[0] * coeff[0];for ( i = 1; i < NTAPS+1; i++)
out[i] = out[i-1] + state[i] * coeff[i];state[i-1] = state[i];
return(out[NTAPS]);
*
Z-1
*
Z-1
*
Z-1
*
+
c3c4 c2 c1
x4 x3 x2 x1
y
Z-1
c0
x0
*
Application examples (1)
Embedded Computer Architecture H. Corporaal, and B. Mesman
8
.L1000006sll $3, $2, 2 R3=R2>>2 R3=i-1addu $14, $15, $3 R14=R15+R3lw $24, 0($14) R24=load(*R14) R24=coeff[i-1]addiu $12, $6, -4 R12=R6-4addu $11, $12, $3 R11=R12+R3lw $13, 0($11) R13=load(*R11) R13=state[i-1]nopmult $24, $13 R24=R24*R13addu $25, $sp, $3 R25=sp+R3lw $9, -4($25) R9=load(R25-4) R9=out[i-1]addiu $2, $2, 1 R2=R2+1 i=i+1mflo $13 R13=move from low mpy regaddu $10, $9, $13 R10=R9+R13 R10=out[i]sw $10, 0($25) mem(*R25)=R10addu $25, $7, $3 R25=R7+R3sw $24, 0($25) mem(*R25)=R24slti $24, $2, 10bne $24, $0, .L100006addiu $15, $7, -4
Application examples (1)
19 instructions per tap!!
9
temp1 = input << 1temp2 = if (bit(input,7) == 1
then 29 else 0
out = temp1 exor temp2
Bit level operations:finite field arithmetic
r1 = LB input Load byter2 = SLL r1 Shift left logicalr3 = ANDI r1, mask AND immediater4 = ADDI r3, -1 ADD immediateBNE ( r4 != r0) Branch on != to nonzeronopR5 = XORI(r1, 29) Exclusive or immediateJ common Jumpnop
nonzero r5 = XOR(r1,r0) Exclusive ORcommon …
in[0] in[1] in[2] in[3] in[4] in[5] in[6] in[7]
out[0] out[1] out[2] out[3] out[4] out[5] out[6] out[7]
exor exor exor
Application examples (2)
10 instructions!!Very simple in hardware
Embedded Computer Architecture H. Corporaal and B. Mesman
10
srl $13, $2, 20andi $25, $13, 1srl $14, $2, 21andi $24, $14, 6or $15, $25, $24srl $13, $2, 22andi $14, $13, 56or $25, $15, $14sll $24, $25, 2
202223252627
source register ($2)
destination register ($24)
2 3 4 5 6 7
Bit level operations : DES example
Application examples (2)
11
srl $24, $5, 18srl $25, $5, 17xor $8, $24, $25srl $9, $5, 16xor $10, $8, $9srl $11, $5, 13xor $12, $10, $11andi $13, $12, 1
181716 13
xor
$5
1$13
… 0 ...
Bit level operations : A5 example (GSM encryption)
Application examples (2)
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
12
architecture viewarchitecture view
life-time analysislife-time analysis
resource loadresource load
bus loadbus load
cycle-countcycle-count
ASIP/VLIW architectures: feedback
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
13
ImplementationIndependent
Design Database
ImplementationIndependent
Design Database
Low power aspects
• Estimation
EXU ACTIVITY AREA POWERalu_1 20% 261 105acs_asu_1 83% 2382 3816or_asu_1 10% 611 122romctrl_1 16% 65 21acu_1 36% 294 205ipb_1 20% 107 43opb_1 11% 163 35ctrl 1864 3597total 5747 7944
area
speed
power
Estimation Database
+Architecture
Mistral2 Mistral2
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
14
GSM viterbi decoder : default solution
13750
EXU ACTIV AREA POWERalu_1 96% 3469 46196romctrl_1 48% 39 259acu_1 26% 327 1209ipb_1 5% 131 105opb_1 23% 1804 5801ctrl 9821 135035total 15591 188605
EXU ACTIV AREA POWERalu_1 96% 3469 46196romctrl_1 48% 39 259acu_1 26% 327 1209ipb_1 5% 131 105opb_1 23% 1804 5801ctrl 9821 135035total 15591 188605
• controller responsible for 70% of power consumption
– maximum resource-sharing
– heavy decision-making : “main” loop with 16 metrics-computations per iteration
• EXU-numbers include Registers for local storage
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
15
GSM viterbi decoder : no loop-folding
• area down by 33%• power down by 35%• next step: reduce # of program-steps with
second ALU
14247
EXU ACTIV AREA POWERalu_1 92% 3411 45073romctrl_1 45% 39 255acu_1 25% 294 1087ipb_1 5% 107 86opb_1 22% 1661 5340ctrl 4919 70087total 10431 121928
EXU ACTIV AREA POWERalu_1 92% 3411 45073romctrl_1 45% 39 255acu_1 25% 294 1087ipb_1 5% 107 86opb_1 22% 1661 5340ctrl 4919 70087total 10431 121928
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
16
GSM viterbi decoder : 2 ALU’s
9739
EXU ACTIV AREA POWERalu_1 69% 1797 12248alu_2 65% 1393 8916romctrl_1 67% 39 255acu_1 37% 294 1087ipb_1 8% 149 119opb_1 33% 2136 6871ctrl 8957 87235total 14766 116731
EXU ACTIV AREA POWERalu_1 69% 1797 12248alu_2 65% 1393 8916romctrl_1 67% 39 255acu_1 37% 294 1087ipb_1 8% 149 119opb_1 33% 2136 6871ctrl 8957 87235total 14766 116731
cycle count down 30%
area up 42% power down by 5% next step: introduce
ASU to reduce ALU-load
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
17
GSM viterbi decoder : 1 x ACS-ASU
EXU ACTIV AREA POWERalu_1 20% 261 105acs_asu_1 83% 2382 3816or_asu_1 10% 611 122romctrl_1 16% 65 21acu_1 36% 294 205ipb_1 20% 107 43opb_1 11% 163 35ctrl 1864 3597total 5747 7944
EXU ACTIV AREA POWERalu_1 20% 261 105acs_asu_1 83% 2382 3816or_asu_1 10% 611 122romctrl_1 16% 65 21acu_1 36% 294 205ipb_1 20% 107 43opb_1 11% 163 35ctrl 1864 3597total 5747 7944
func ACS ( M1, M2, d ) MS, MS8 =begin MS = if ( M1+d > M2-d ) -> ( M1+d) || ( M2-d) fi; MS8 = if ( M1- d > M2+d) -> ( M1- d) || ( M2+d) fi;end;
func ACS ( M1, M2, d ) MS, MS8 =begin MS = if ( M1+d > M2-d ) -> ( M1+d) || ( M2-d) fi; MS8 = if ( M1- d > M2+d) -> ( M1- d) || ( M2+d) fi;end;
=
1930
cycle count down 5X power down 20X !
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
18
GSM viterbi decoder : 4 x ACS-ASU
EXU ACTIV AREA POWERalu_1 94% 243 97acs_asu_1 95% 1041 420acs_asu_2 95% 1041 420acs_asu_3 95% 1041 420acs_asu_4 95% 1041 420split_asu_1 47% 90 18or_asu_1 47% 592 118romctrl_1 28% 48 6acu_1 98% 212 85ipb_1 23% 60 6opb_1 50% 369 80ctrl 1306 555total 7084 2645
EXU ACTIV AREA POWERalu_1 94% 243 97acs_asu_1 95% 1041 420acs_asu_2 95% 1041 420acs_asu_3 95% 1041 420acs_asu_4 95% 1041 420split_asu_1 47% 90 18or_asu_1 47% 592 118romctrl_1 28% 48 6acu_1 98% 212 85ipb_1 23% 60 6opb_1 50% 369 80ctrl 1306 555total 7084 2645
cycle count down another 5X
area up 23% power down another
3X !
425
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
19
GSM viterbi example : summary
ImplementationIndependent
Design Database
ImplementationIndependent
Design Database
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
20000
default loop 2 ALU 1 ACS 4 ACS
power
areacycles
72x !72x !
Mistral2 Mistral2
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
20
Exploration phase
Application softwaredevelopment:
constraint driven compilation
application(s)processor
-model
OK?
more appl.? yes
no
noyes
HWdesign
SW (code generation)
application(s)
OK?no
yes
SW (code generation)
Freezeprocessor
model
no
Discussion: phase 3
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
21
RF1
FU1 FU2 FU3 FU4
IR1 IR2 IR3 IR4
Instruction memory Con-trol
flags
RF2 RF3 RF4
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
22
Discussion: problems with VLIWs
• code compaction = reduce code size after scheduling possible compaction ratio ?e.g. p0 = 0.9 and p1 = 0.1 information content (entropy) = - pi log2 pi = 0.47
maximum compression factor 2 • control parallelism during scheduling = switch between
different processor models (10% of code = 90% runtime) • architecture
reduce number of control bits for operand addressese.g. 128 reg (TM) -> 28 bits/issue slot for addresses only=> use stacks and fifos
code size and instruction bandwidth
23
GPU basics• Synthetic objects are represented with a bunch of
triangles (3d) in a language/library like OpenGL or DirectX plus texture
• Triangles are represented with 3 vertices• A vertex is represented with 4 coordinates with
floating-point precision• Objects are transformed between coordinate
representations • Transformations are matrix-vector multiplications
24
GPU DirectX 10 pipeline
25
NVIDIA GeForce 6800 3D Pipeline
26 GeForce 8800 GPU330 Gflops, 128 processors with 4-way SIMD
27GPU: Why more general-purpose programmable?
• All transformations are shading
• Shading is all matrix-vector multiplications
• Computational load varies heavily between different sorts of shading
• Programmable shaders allow dynamic resource allocation between shaders
Result:
• Modern GPUs are serious competitor for general-purpose processors!
04/22/23 Embedded Computer Architecture 28
n n A n n n n nn B n n n n n nn n n n n C n nn n n n n D n nn n n E n n n nF n n n n n n nn n n n n n G nn n n n n n n H
A B C D E F G H0 0 0 0 0 0 0 0
n B A n n C n nn n n E n D n nF n n n n n n nn n n n n n G H
A B C D E F G H1 1 0 1 0 0 1 0
A B C D E F G H1 1 1 1 1 1 1 0
A B C D E F G H
Fully serial
Mixed serial/parallel
Fully parallel
Velocity encoding
Classical encoding: fetching many nops
04/22/23 Embedded Computer Architecture H.Corporaal and B. Mesman
29
Conclusions
• ASIPs provide efficient solutions for well-defined application domains (2 orders of magnitude higher efficiency).
• The methodology is interesting for IP creation.
• The key problem is retargetable compilation.
• A (distributed) VLIW model is a good compromise between HW and SW.
• Although an automatic process can generate a default solution, the process usually is interactive and iterative for efficiency reasons. The key is fast and accurate feedback.
• GPUs are ASIPs