Skip to content
Snippets Groups Projects
Commit 294767f2 authored by Pepping's avatar Pepping
Browse files

Fixed the RAMsize to 256 Added c_dat_db_w

parent a16415d1
No related branches found
No related tags found
No related merge requests found
......@@ -66,18 +66,19 @@ g_blocks_per_sync = 16 #32 # 781250
# Define settings for the block generator
c_bg_nof_streams = g_nof_input_streams
c_bg_ram_size = 128
c_bg_ram_size = 256
c_db_nof_streams = g_nof_input_streams
c_db_ram_size = 8
c_samples_per_packet = 128
c_samples_per_packet = 176
c_gapsize = 64
c_mem_low_addr = 0
c_mem_high_addr = c_samples_per_packet-1
c_mem_high_addr = c_bg_ram_size-1
c_bsn_init = 42
c_in_dat_w = 8
c_nof_read_back_samples = 1
c_nof_read_back_samples = 8
c_dat_db_w = 8
c_write_bg_data = False
c_write_bg_data = True
c_write_bg_data_to_file = False
tc.append_log(3, '>>>')
......@@ -100,7 +101,7 @@ db_mesh = pi_diag_data_buffer.PiDiagDataBuffer(tc, io, instanceName = 'MESH', no
bsn = pi_bsn_monitor.PiBsnMonitor(tc, io, nofStreams=2)
# Create dsp_test instance for helpful methods
dsp_test_bg = dsp_test.DspTest(inDatW=c_in_dat_w)
#dsp_test_bg = dsp_test.DspTest(inDatW=c_in_dat_w)
pps = pi_ppsh.PiPpsh(tc, io, nodeNr=tc.nodeFnNrs)
......@@ -129,9 +130,9 @@ if __name__ == "__main__":
nodeData = []
for i in xrange(0, g_nof_input_streams):
data = []
for j in xrange(0, c_samples_per_packet):
real = h & (2**c_in_dat_w-1) # Node number in real part
imag = i & (2**c_in_dat_w-1) # Streamnumber in imag part
for j in xrange(0, c_bg_ram_size):
real = h & (2**c_in_dat_w-1) # Node number in real part = Source
imag = i & (2**c_in_dat_w-1) # Streamnumber in imag part = Destination
data.append((imag << c_in_dat_w) + real)
nodeData.append(data)
dataList.append(nodeData)
......@@ -172,7 +173,7 @@ if __name__ == "__main__":
###############################################################################
db_out = []
for i in range(c_bg_nof_streams):
db_out.append(flatten(db_mesh.read_data_buffer(streamNr=i, n=c_nof_read_back_samples, radix='uns', width=c_nof_complex*c_in_dat_w, nofColumns=8)))
db_out.append(flatten(db_mesh.read_data_buffer(streamNr=i, n=c_nof_read_back_samples, radix='uns', width=c_nof_complex*c_dat_db_w, nofColumns=8)))
###############################################################################
#
......@@ -195,7 +196,7 @@ if __name__ == "__main__":
for i in db_out:
db_im = []
for j in i:
imag = (j & 0xFF00) >> c_in_dat_w
imag = (j & 0xFF00) >> c_dat_db_w
db_im.append(imag)
tc.append_log(0, 'Imag part(=dest) of RX channel %d for every node: %s' % (cnt, str(db_im)))
cnt += 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment