Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Problema I – 3 puntos
acc = 0 :
for (int i = 0 ; i < 1000; i++) acc = acc + x[i] ;
return(acc);
}
Problema II 3 puntos
1
M.I.T Sistemas Electrónicos Avanzados 8/09/2020
tRC tWC
A A
tCE tCW
/CE /CE
tOE tAS tWP tAH
/OE
tOZ /WE
tAA tOH tDS tDH
D DATO D DATO
Fig. 1.2. Cronograma de lectura. Fig. 1.3. Cronograma de escritura.
2
Sistemas Electrónicos Avanzados 1/02/2021
Problema I 4 puntos.
#define N 100
void fir ( ap_int<12> *y, ap_int<10> x)
{
constant ap_int<16> c[N] = #include “coeff.h” ;
#pragma HLS RESOURCE variable=c core=ROM_1P_1S latency=1
static ap_int<10> shift_reg [N] ;
#pragma HLS RESOURCE variable=shift_reg core=RAM_1P_1S latency=1
ap_int<28> acc=0;
ap_int<10> data;
Shift_Accum_Loop: for (int i=N-1;i>=0;i--) {
if (i==0) {
shift_reg[0]=x;
data = x;
} else {
shift_reg[i]=shift_reg[i-1];
data = shift_reg[i];
}
acc+=data*c[i];
}
*y=acc.range(27,16);
1
Sistemas Electrónicos Avanzados 1/02/2021
Problema II 3 puntos
0 0 0 1 1 0 0 0
0 1 1 0 0 0 1 1
0 0 0 1 1 0 0 0 primer grupo de
0 0 0 1 1 0 0 0 terminos a sumar
0 0 0 0 0 0 0 0 segundo grupo
0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 tercer grupo
0 0 0 1 1 0 0 0
0 0 0 1 1 0 0 0 cuarto grupo
0 0 0 0 0 0 0 0
0 0 0 0 1 0 0 1 0 1 0 0 1 0 0 0
RST
CLK
RES(15:0)
A(7:0)
B(7:0) BUSY
START