Untitled

mail@pastecode.io avatar
unknown
plain_text
6 months ago
1.6 kB
0
Indexable
Never

18/5/2023
# YOUR CODE HERE
SNR_p8 = 20
M_p8 = 8
Ex_p8 = 4
g_rx_p8 = nrz((M_p8-1)-np.arange(M_p8), M_p8)
bs_p8 = BitStream([1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 0, 1], bool)
x_p8 = encode_QPSK_waveform(bs_p8, M_p8, Ex_p8)
y_p8 = add_noise(x_p8, SNR_p8)
rs_p8 = lfilter(g_rx_p8, 1, y_p8)


D = 4
# SNR = 10
# Ex = 16
# bs = BitStream(np.random.default_rng(0).integers(0, 2, 500, dtype=bool))
x = encode_QPSK_waveform(bs, M_p8, Ex_p8)
y = add_noise(x, SNR_p8)
# X = np.insert(X, 0, 6., axis=0)
rs_p8_4 = np.insert(rs_p8, 0, np.zeros(D))
# r_s_p8_4 = np.append(r_s_p8_4, np.zeros(D)) 
r_p8_4 = rs_p8_4[M_p8-1::M_p8]
splt.plot_discrete(None, r_p8_4, "Señal $r[k]$ del problema LT4.4");
splt.plot_QPSK_constellation(r, Ex_p8, "Constelación de la señal $r[k]$");
18:12
HOY
.data
len:	.dword	16
vec1:	.dword	6,1,15,8, 6,10,2,19, 6,6,1,11, 9,19,12,8
vec2:	.dword 	4,18,8,9, 6,6,3,13, 12,9,3,0, 13,0,8,16
vec3:	.dword 	8,13,15,9, 6,11,12,10, 8,13,2,15, 11,5,19,0

rslt1:	.dword	0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0
rslt2:	.dword	0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0
rslt3:	.dword	0,0,0,0, 0,0,0,0, 0,0,0,0, 0,0,0,0

.text
		addi x10, x3, 8
		ld   x30, 0(x3)
        # STALL

loop:	ld   x11, 0(x10)     
		ld   x12, 128(x10)
		ld   x13, 256(x10)

        ld   x21, -8(x10)

		add  x14, x11, x12

        ld   x22, 128(x10)
		ld   x23, 248(x10)

		add  x14, x14, x13
   
		sub  x16, x13, x12
		mul  x13, x13, x13
  
        addi x10, x10, 16 ###### MOVIDO FUNCIONA
        
        add  x24, x21, x22
        
		sub  x15, x13, x11

		# addi x10, x10,… Leer más
13:05