Skip to content
Snippets Groups Projects
Commit 095b65af authored by Dominik Loidolt's avatar Dominik Loidolt
Browse files

-last_info option: skip model transfer if last updated model buffer and the...

-last_info option: skip model transfer if last updated model buffer and the current model buffer overlap exactly·
parent bbe42b58
Branches
Tags
No related merge requests found
...@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ...@@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file.
## [Unreleased] ## [Unreleased]
### Added ### Added
- add -vv flag for extra verbose output - add -vv flag for extra verbose output
###Changed
- -last_info option: skip model transfer if last updated model buffer and the current model buffer overlap exactly
## [0.11] - 26-04-2023 ## [0.11] - 26-04-2023
### Added ### Added
......
...@@ -509,6 +509,10 @@ int rdcu_compress_data_parallel(const struct cmp_cfg *cfg, ...@@ -509,6 +509,10 @@ int rdcu_compress_data_parallel(const struct cmp_cfg *cfg,
/* read model and write model in parallel */ /* read model and write model in parallel */
if (cfg->model_buf && model_mode_is_used(cfg->cmp_mode) && model_mode_is_used(last_info->cmp_mode_used)) { if (cfg->model_buf && model_mode_is_used(cfg->cmp_mode) && model_mode_is_used(last_info->cmp_mode_used)) {
if (cfg->rdcu_model_adr == last_info->rdcu_new_model_adr_used &&
cfg->samples == last_info->samples_used) {
printf("The last updated model buffer and the current model buffer overlap exactly in the SRAM of the RDCU. Skip model transfer.\n");
} else {
uint32_t new_model_size_4byte; uint32_t new_model_size_4byte;
/* set the model in the local mirror... */ /* set the model in the local mirror... */
...@@ -530,6 +534,7 @@ int rdcu_compress_data_parallel(const struct cmp_cfg *cfg, ...@@ -530,6 +534,7 @@ int rdcu_compress_data_parallel(const struct cmp_cfg *cfg,
new_model_size_4byte) < 0) new_model_size_4byte) < 0)
return -1; return -1;
} }
}
/* write model */ /* write model */
} else if (cfg->model_buf && model_mode_is_used(cfg->cmp_mode)) { } else if (cfg->model_buf && model_mode_is_used(cfg->cmp_mode)) {
/* set the model in the local mirror... */ /* set the model in the local mirror... */
......
...@@ -2439,8 +2439,11 @@ int rdcu_sync_sram_mirror_parallel(uint32_t rx_addr, uint32_t rx_size, ...@@ -2439,8 +2439,11 @@ int rdcu_sync_sram_mirror_parallel(uint32_t rx_addr, uint32_t rx_size,
return -1; return -1;
/* check buffer overlap */ /* check buffer overlap */
if (rx_addr < tx_addr+tx_size && rx_addr+rx_size > tx_addr) if (rx_addr < tx_addr+tx_size && rx_addr+rx_size > tx_addr) {
printf("Error: The two parallel transferring buffers overlap. Read buffer: 0x%x size: %u. Write buffer: 0x%x size: %u.\n",
rx_addr, rx_size, tx_addr, tx_size);
return -1; return -1;
}
rx_bytes = rx_size; rx_bytes = rx_size;
......
project('cmp_tool', 'c', project('cmp_tool', 'c',
version : '0.11', version : '0.11-b1',
meson_version : '>= 0.56', meson_version : '>= 0.56',
license : 'GPL-2.0', license : 'GPL-2.0',
default_options : ['warning_level=3', 'c_std=gnu99'] default_options : ['warning_level=3', 'c_std=gnu99']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment