diff --git a/tools/oneclick/prestudy/YAML/bf/bf.peripheral.yaml b/tools/oneclick/prestudy/YAML/bf/bf.peripheral.yaml index aef117fe8e2f0e82af692acb55ea75e7e4c577dd..ab4e072a6acce48c45c35acea0fd61cec46c469a 100644 --- a/tools/oneclick/prestudy/YAML/bf/bf.peripheral.yaml +++ b/tools/oneclick/prestudy/YAML/bf/bf.peripheral.yaml @@ -35,6 +35,7 @@ peripherals: The real and the imaginary parts are concatenated: W_real in Lower part. W_imag in Higher part." slave_discription: | " " + - # ram_ss_ss_wide slave_prefix : BF @@ -44,13 +45,14 @@ peripherals: slave_type: RAM fields: - - field_name: ss_ss_wide - width: ceil_log2(g_bf.nof_subbands * c_nof_signal_paths_per_stream) - number_of_fields: g_bf.nof_input_streams * c_nof_signal_paths_per_stream # 16*4=64, nof_input_streams*nof_signal_paths_per_stream + field_name : ss_ss_wide + width : 32 + number_of_fields: g_bf.nof_subbands * g_bf.nof_input_streams * c_nof_signal_paths_per_stream # 16*4=64, nof_input_streams*nof_signal_paths_per_stream field_description: | "Contains the addresses to select from the stored subbands." slave_discription: | " " + - # ram_st_sst_bf slave_prefix : BF @@ -60,14 +62,15 @@ peripherals: slave_type: RAM fields: - - field_name: st_sst_bf - width: 56 + field_name : st_sst_bf + width : 56 number_of_fields: 512 access_mode : RO field_description: | "Contains the weights. The real and the imaginary parts are concatenated: W_real in Lower part. W_imag in Higher part." slave_discription: | + - # reg_st_sst_bf slave_prefix : BF @@ -77,8 +80,8 @@ peripherals: slave_type: REG fields: - - field_name: Treshold - address_offset : 0x0 + field_name : Treshold + address_offset: 0x0 field_description : | "When the treshold register is set to 0 the statistics will be auto-correlations. In case the treshold register is set to a non-zero value, it allows to create a sample & hold function @@ -86,5 +89,6 @@ peripherals: The a-input of the multiplier is updated every treshold clockcycle. Thereby cross statistics can be created." slave_discription: | " " + peripheral_description: | "This is the beamformer unit" diff --git a/tools/oneclick/prestudy/YAML/diag/diag.peripheral.yaml b/tools/oneclick/prestudy/YAML/diag/diag.peripheral.yaml index aa186adb5794a16f8575d1764a750fe4d5e4ccf8..93ef5f296897f97d0d7fe1e2fd314dc33cb5a05c 100644 --- a/tools/oneclick/prestudy/YAML/diag/diag.peripheral.yaml +++ b/tools/oneclick/prestudy/YAML/diag/diag.peripheral.yaml @@ -147,7 +147,7 @@ peripherals: - field_name : ram width : g_data_w - number_of_fields: 2**ceil_log2(g_buf_nof_data) + number_of_fields: g_buf_nof_data field_description: | "Contains the data that is being captured." slave_description: "" diff --git a/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/ram.py b/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/ram.py index 67f4f45e5c1a476ccf0951ad07c7139f60bd05f0..a8f10b42f06436a47243f3f5cd07e7ddb1f3c504 100644 --- a/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/ram.py +++ b/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/ram.py @@ -70,7 +70,8 @@ class RAM(BaseObject): n_words = 0 for field in self.fields.values(): n_words += int(ceil(float(field.width()) / c_word_w)) * field.number_of_fields() - + logger.debug("n_words=%d", n_words) + n_words = 2**ceil_log2(n_words) self.set_kv('address_length', n_words) def address_length(self, val=None): diff --git a/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/register.py b/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/register.py index e197bfbfb834fbf14987e98d8887944951972478..dfb59b80f42ac277f8711d7e2de2aefb911c328b 100644 --- a/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/register.py +++ b/tools/oneclick/prestudy/YAML/py_mm_lib/peripheral_lib/register.py @@ -77,8 +77,8 @@ class Register(BaseObject): n_words = 0 for field in self.fields.values(): n_words += int(ceil(float(field.width()) / c_word_w)) * field.number_of_fields() - - self.set_kv('address_length', n_words) # ceil_pow2(n_words)) + n_words = ceil_pow2(n_words) # round up to power of 2 + self.set_kv('address_length', n_words) def address_length(self, val=None): """ set/get address_length of register diff --git a/tools/oneclick/prestudy/YAML/py_mm_lib/rom_system.py b/tools/oneclick/prestudy/YAML/py_mm_lib/rom_system.py index bad79ce2773ccffd62e1783f92fcaeded761dae5..af8ac70c0792746d8056e16f85bc7f71cd8fc964 100644 --- a/tools/oneclick/prestudy/YAML/py_mm_lib/rom_system.py +++ b/tools/oneclick/prestudy/YAML/py_mm_lib/rom_system.py @@ -176,12 +176,8 @@ class RomSystem(object): for peripheral in peripherals.values(): nof_peri_inst = peripheral.number_of_peripherals() for rkey, rval in peripheral.rams.items(): - #n_addresses = rval.get_kv('address_length') - n_addresses = 0 - for fkey, fval in rval.fields.items(): - # n_words = width in bits rounded up to wordt_size bits - n_words = int(ceil(float(fval.width()) / self.word_size)) - n_addresses += n_words * fval.number_of_fields() + n_addresses = rval.get_kv('address_length') + nof_inst = rval.number_of_slaves() * peripheral.number_of_peripherals() if rval.user_defined_name() is not None: _name = rval.user_defined_name() @@ -191,13 +187,15 @@ class RomSystem(object): size_info.append([n_addresses, nof_inst, _name]) for rkey, rval in peripheral.registers.items(): - n_addresses = 0 - n_words = 0 - for fkey, fval in rval.fields.items(): - n_words = max(n_words, int(ceil(float(fval.width()) / float(self.word_size)))) - n_addresses = max(n_addresses, fval.address_offset()) - - n_addresses += 1 + n_addresses = rval.get_kv('address_length') + + #n_addresses = 0 + #n_words = 0 + #for fkey, fval in rval.fields.items(): + # n_words = max(n_words, int(ceil(float(fval.width()) / float(self.word_size)))) + # n_addresses = max(n_addresses, fval.address_offset()) +# + #n_addresses += 1 nof_inst = rval.number_of_slaves() * peripheral.number_of_peripherals() if rval.user_defined_name() is not None: _name = rval.user_defined_name() @@ -206,7 +204,8 @@ class RomSystem(object): if _name.upper() in ('.REG_SYSTEM_INFO.', '.ROM_SYSTEM_INFO.', 'REG_SYSTEM_INFO', 'ROM_SYSTEM_INFO'): continue #print("%s %s" % (str(rkey), str(n_addresses * n_words))) - size_info.append([(n_addresses * n_words), nof_inst, _name]) + #size_info.append([(n_addresses * n_words), nof_inst, _name]) + size_info.append([n_addresses, nof_inst, _name]) size_info.sort(reverse=True) for size, nof_inst, name in size_info: