Skip to content

Commit 2c9c78d

Browse files
committed
Release v4.5.1
1 parent 1044164 commit 2c9c78d

10 files changed

Lines changed: 61 additions & 48 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ endif(NOT CMAKE_BUILD_TYPE)
1717

1818
cmake_minimum_required(VERSION 3.5)
1919

20-
project(metavision VERSION 4.5.0)
20+
project(metavision VERSION 4.5.1)
2121
set(PROJECT_VERSION_SUFFIX "")
2222

2323
if(PROJECT_VERSION_SUFFIX STREQUAL "")

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ python3 -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning
133133

134134
### Compilation
135135

136-
1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.0`.
136+
1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.1`.
137137
(If you choose to download an archive of OpenEB from GitHub rather than cloning the repository,
138138
you need to ensure that you select a ``Full.Source.Code.*`` archive instead of using
139139
the automatically generated ``Source.Code.*`` archives. This is because the latter do not include
@@ -174,7 +174,7 @@ or you can deploy the OpenEB files in the system path (`/usr/local/lib`, `/usr/l
174174
sudo cmake --build . --target install
175175
```
176176

177-
Note that you ou can also deploy the OpenEB files (applications, samples, libraries etc.) in a directory of your choice by using
177+
Note that you can also deploy the OpenEB files (applications, samples, libraries etc.) in a directory of your choice by using
178178
the `CMAKE_INSTALL_PREFIX` variable (`-DCMAKE_INSTALL_PREFIX=<OPENEB_INSTALL_DIR>`) when generating the makefiles
179179
in step 3. Similarly, you can configure the directory where the Python packages will be deployed using the
180180
`PYTHON3_SITE_PACKAGES` variable (`-DPYTHON3_SITE_PACKAGES=<PYTHON3_PACKAGES_INSTALL_DIR>`).
@@ -325,7 +325,7 @@ python -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning=
325325
First, retrieve the codebase:
326326
327327
```bash
328-
git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.0
328+
git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.1
329329
```
330330
331331
Note that if you choose to download an archive of OpenEB from GitHub rather than cloning the repository,

cmake/custom_functions/add_library_version_header.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
# See the License for the specific language governing permissions and limitations under the License.
99

1010
set(GIT_BRANCH "main")
11-
set(GIT_COMMIT_ID "992ed5dc39df6e5e454f842838ba4e43dc1e17a9")
12-
set(GIT_COMMIT_DATE "2023-12-13 15:44:07 +0100")
11+
set(GIT_COMMIT_ID "9ec4e835e1cfd4f3bc94b8b390ad5894a4ac0d42")
12+
set(GIT_COMMIT_DATE "2023-12-21 09:14:06 +0100")
1313

1414
find_program(GIT_SCM git DOC "Git version control" HINTS "C:\\Program Files\\Git\\bin\\")
1515

cmake/custom_targets/README_metavision_open.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ python3 -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning
133133

134134
### Compilation
135135

136-
1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.4.0`.
136+
1. Retrieve the code: `git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.1`.
137137
(If you choose to download an archive of OpenEB from GitHub rather than cloning the repository,
138138
you need to ensure that you select a ``Full.Source.Code.*`` archive instead of using
139139
the automatically generated ``Source.Code.*`` archives. This is because the latter do not include
@@ -174,7 +174,7 @@ or you can deploy the OpenEB files in the system path (`/usr/local/lib`, `/usr/l
174174
sudo cmake --build . --target install
175175
```
176176

177-
Note that you ou can also deploy the OpenEB files (applications, samples, libraries etc.) in a directory of your choice by using
177+
Note that you can also deploy the OpenEB files (applications, samples, libraries etc.) in a directory of your choice by using
178178
the `CMAKE_INSTALL_PREFIX` variable (`-DCMAKE_INSTALL_PREFIX=<OPENEB_INSTALL_DIR>`) when generating the makefiles
179179
in step 3. Similarly, you can configure the directory where the Python packages will be deployed using the
180180
`PYTHON3_SITE_PACKAGES` variable (`-DPYTHON3_SITE_PACKAGES=<PYTHON3_PACKAGES_INSTALL_DIR>`).
@@ -325,7 +325,7 @@ python -m pip install "numba==0.56.3" "profilehooks==1.12.0" "pytorch_lightning=
325325
First, retrieve the codebase:
326326
327327
```bash
328-
git clone https://github.com/prophesee-ai/openeb.git --branch 4.4.0
328+
git clone https://github.com/prophesee-ai/openeb.git --branch 4.5.1
329329
```
330330
331331
Note that if you choose to download an archive of OpenEB from GitHub rather than cloning the repository,

hal_psee_plugins/include/devices/genx320/genx320_cx3_tz_device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class TzIssdGenX320Device : public TzIssdDevice {
2323
TzIssdGenX320Device(const Issd &issd, const std::pair<std::string, uint32_t> &env_var);
2424
virtual ~TzIssdGenX320Device();
2525
bool download_firmware() const;
26-
void start_firmware() const;
26+
void start_firmware(bool is_mp) const;
2727
static std::pair<std::string, uint32_t> parse_env(const char *input);
2828

2929
protected:

hal_psee_plugins/include/devices/genx320/genx320mp_cx3_issd.h

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,13 @@ const std::vector<RegisterOperation> issd_genx320mp_cx3_init = {
4545
RegisterOperation::Write(0x0000F010, 0x00002710),
4646
RegisterOperation::Write(0x0000F008, 0x10000002),
4747
RegisterOperation::Write(0x0000F008, 0xC31057D4),
48+
RegisterOperation::Write(0x0000B000, 0x10008803),
49+
RegisterOperation::Write(0x0000B024, 0x80003E80),
4850
RegisterOperation::Write(0x00001208, 0x00000030),
4951
RegisterOperation::Delay(200),
5052
RegisterOperation::Write(0x00001104, 0x01010019),
5153
RegisterOperation::Write(0x00001128, 0x01010019),
52-
RegisterOperation::Write(0x0000110C, 0x01010014),
54+
RegisterOperation::Write(0x0000110C, 0x01010015),
5355
RegisterOperation::Write(0x00001130, 0x01010014),
5456
RegisterOperation::Write(0x00001000, 0x0301003D),
5557
RegisterOperation::Write(0x00001004, 0x0301001D),
@@ -69,15 +71,15 @@ const std::vector<RegisterOperation> issd_genx320mp_cx3_init = {
6971
const std::vector<RegisterOperation> issd_genx320mp_cx3_start = {
7072
// DIGITAL START sequence -- begin
7173
// DIGITAL: MIPI enable
72-
RegisterOperation::Write(0x0000B000, 0x1000C001),
74+
RegisterOperation::Write(0x0000B000, 0x10008803),
7375
// DIGITAL: RO exit LowPower + timebase enable
7476
RegisterOperation::Write(0x00009028, 0x00000000),
7577
RegisterOperation::WriteField(0x00009008, 0x00000195, 0x00000001),
7678
// DIGITAL START sequence -- end
7779
// ANALOG START sequence -- begin
7880
RegisterOperation::Delay(1),
7981
RegisterOperation::Write(0x0000002C, 0x0022C724),
80-
RegisterOperation::Write(0x00000000, 0x00000402),
82+
RegisterOperation::Write(0x00000000, 0x00000C02),
8183
RegisterOperation::Delay(1),
8284
// ANALOG START sequence -- end
8385
};
@@ -94,7 +96,7 @@ const std::vector<RegisterOperation> issd_genx320mp_cx3_stop = {
9496
// DIGITAL: Timebase disable
9597
RegisterOperation::WriteField(0x00009008, 0x00000194, 0x00000001),
9698
// DIGITAL: MIPI DPHY disable
97-
RegisterOperation::Write(0x0000B000, 0x1000C000),
99+
RegisterOperation::Write(0x0000B000, 0x10008804),
98100
// DIGITAL STOP sequence -- end
99101
};
100102

@@ -103,25 +105,25 @@ const std::vector<RegisterOperation> issd_genx320mp_cx3_destroy = {
103105
RegisterOperation::Delay(1),
104106
// Disabling the PMU...
105107
RegisterOperation::Write(0x00000070, 0x0000051C),
106-
RegisterOperation::Write(0x0000A004, 0x00000054),
107-
RegisterOperation::Write(0x0000A008, 0x00000084),
108+
RegisterOperation::Write(0x0000A004, 0x00600054),
109+
RegisterOperation::Write(0x0000A008, 0x00600084),
108110
RegisterOperation::Write(0x0000005C, 0x00000080),
109111
RegisterOperation::Write(0x0000005C, 0x00000080),
110-
RegisterOperation::Write(0x0000A01C, 0x0007601C),
111-
RegisterOperation::Write(0x0000A000, 0x00000400),
112+
RegisterOperation::Write(0x0000A01C, 0x0013601C),
113+
RegisterOperation::Write(0x0000A000, 0x00040400),
112114
// Disabling the PMU...done!
113115
RegisterOperation::Delay(1),
114116
// ANALOG DESTROY sequence -- end
115117
// DIGITAL DESTROY sequence -- begin
116118
// DIGITAL: MIPI DPHY and PLL Power Down
117-
RegisterOperation::Write(0x0000B030, 0x00000000),
118-
RegisterOperation::Write(0x0000B00C, 0x00000006),
119+
RegisterOperation::Write(0x0000B030, 0x00000013),
120+
RegisterOperation::Write(0x0000B00C, 0x00000102),
119121
RegisterOperation::Write(0x0000B030, 0x00000010),
120122
RegisterOperation::Write(0x0000B00C, 0x00000002),
121-
RegisterOperation::Write(0x0000A01C, 0x0007601C),
123+
RegisterOperation::Write(0x0000A01C, 0x0003601C),
122124
RegisterOperation::Write(0x0000004C, 0x00204E20),
123125
RegisterOperation::Write(0x0000B030, 0x00000000),
124-
RegisterOperation::Write(0x0000A01C, 0x0007601C),
126+
RegisterOperation::Write(0x0000A01C, 0x0003601C),
125127
RegisterOperation::Write(0x0000A000, 0x00000400),
126128
RegisterOperation::Write(0x00000204, 0x00000E75),
127129
RegisterOperation::Write(0x00000204, 0x00000E74),

hal_psee_plugins/samples/metavision_riscv_logger/metavision_riscv_logger.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,11 @@ uint32_t mbx_read_uint32(Metavision::I_HW_Register *regs) {
3636
int main(int argc, char *argv[]) {
3737
std::string serial;
3838

39-
const std::string program_desc("The source code of this application demonstrates how to receive log messages "
40-
"from an application embedded in the sensor.\n");
39+
const std::string program_desc(
40+
"This sample shows how to receive log messages from an application embedded in the sensor.\n"
41+
"To use it, define the environment variable MV_FLAGS_RISCV_FW_PATH containing the PATH of a .hex file."
42+
"We provide an example (hello_world.hex) that is delivered along with the C++ sample source code.\n");
43+
4144
po::options_description options_desc("Options");
4245
// clang-format off
4346
options_desc.add_options()

hal_psee_plugins/src/devices/genx320/genx320_cx3_tz_device.cpp

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,37 @@ bool TzIssdGenX320Device::download_firmware() const {
141141
}
142142
return false;
143143
}
144-
void TzIssdGenX320Device::start_firmware() const {
145-
if (((DMEM_ADDR <= start_address_) && (start_address_ < DMEM_ADDR + DMEM_SIZE)) ||
146-
((IMEM_ADDR <= start_address_) && (start_address_ < IMEM_ADDR + IMEM_SIZE))) {
147-
MV_HAL_LOG_TRACE() << "Start Risc-V execution at 0x" << std::hex << start_address_;
148-
// Currently the CPU will always start at 0x200200 (default address) suposing that ROMMODE IO is in low state
149-
(*register_map)["mbx/cpu_start_en"]["cpu_start_en"].write_value(1);
144+
void TzIssdGenX320Device::start_firmware(bool is_mp) const {
145+
if (is_mp) {
146+
unsigned int retries = 0;
147+
148+
(*register_map)["mbx/cmd_ptr"]["cmd_ptr"].write_value(0x70200200);
149+
150+
while (retries < 10) {
151+
if (((*register_map)["mbx/cmd_ptr"]["cmd_ptr"].read_value() & 0xff000000) == 0) {
152+
MV_HAL_LOG_TRACE() << "Jump to IMEM successfull";
153+
break;
154+
} else {
155+
std::this_thread::sleep_for(std::chrono::microseconds(100));
156+
}
157+
retries++;
158+
}
159+
160+
if (retries == 10) {
161+
MV_HAL_LOG_ERROR() << "Failed to jump to IMEM";
162+
}
150163

151164
} else {
152-
MV_HAL_LOG_ERROR() << "Start address 0x" << std::hex << start_address_ << std::dec << " is not valid.";
165+
if (((DMEM_ADDR <= start_address_) && (start_address_ < DMEM_ADDR + DMEM_SIZE)) ||
166+
((IMEM_ADDR <= start_address_) && (start_address_ < IMEM_ADDR + IMEM_SIZE))) {
167+
MV_HAL_LOG_TRACE() << "Start Risc-V execution at 0x" << std::hex << start_address_;
168+
// Currently the CPU will always start at 0x200200 (default address) assuming that ROMMODE IO is in low
169+
// state
170+
(*register_map)["mbx/cpu_start_en"]["cpu_start_en"].write_value(1);
171+
172+
} else {
173+
MV_HAL_LOG_ERROR() << "Start address 0x" << std::hex << start_address_ << std::dec << " is not valid.";
174+
}
153175
}
154176
}
155177

@@ -158,7 +180,7 @@ void TzIssdGenX320Device::initialize() {
158180
TzIssdDevice::initialize();
159181

160182
if (download_firmware() == true)
161-
start_firmware();
183+
start_firmware(false);
162184
}
163185
std::pair<std::string, uint32_t> TzIssdGenX320Device::parse_env(const char *input) {
164186
uint32_t outputValue = 0x200200;
@@ -192,7 +214,7 @@ TzCx3GenX320::TzCx3GenX320(std::shared_ptr<TzLibUSBBoardCommand> cmd, uint32_t d
192214
// Beware the firmware has not been loaded during the initialize operation performed
193215
// in the parent class TzIssdDevice
194216
if (download_firmware() == true)
195-
start_firmware();
217+
start_firmware(is_mp);
196218
sync_mode_ = I_CameraSynchronization::SyncMode::STANDALONE;
197219
iph_mirror_control(true);
198220
temperature_init();

sdk/modules/driver/cpp/src/camera_serialization.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ class FacilitySerializer {
153153
auto *nfl_state = state_.mutable_event_rate_noise_filter_state();
154154
nfl_state->set_enabled(module->is_enabled());
155155

156-
// Please change the name and logic of `EventRateNoiseFilterState::set_event_rate_threshold`.
157-
// To ensure it properly supports all of the values of a `threshold` struct.
158-
uint32_t threshold = module->get_thresholds().lower_bound_start;
156+
auto threshold = module->get_thresholds().lower_bound_start;
159157
nfl_state->set_event_rate_threshold(threshold);
160158
}
161159

@@ -384,12 +382,7 @@ class FacilityDeserializer {
384382

385383
if (nfl_state.optional_event_rate_threshold_case() ==
386384
DeviceSerialization::EventRateNoiseFilterState::kEventRateThreshold) {
387-
// Please change the logic and name of `EventRateNoiseFilterState::event_rate_threshold()` to use new naming
388-
// convention
389385
const auto th_lower_start = nfl_state.event_rate_threshold();
390-
391-
// 0u is used because logic of `EventRateNoiseFilterState::event_rate_threshold()` does not yet allow for
392-
// multiple threshold values.
393386
module->set_thresholds({th_lower_start, 0u, 0u, 0u});
394387
}
395388
}

sdk/modules/driver/cpp/tests/camera_gtest.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1478,9 +1478,6 @@ TEST_F(Camera_Gtest, should_load_serialized_state) {
14781478
camera.get_device().get_facility<I_LL_Biases>()->set("c", 4);
14791479

14801480
// NFL
1481-
// Only the first value can be tested due to a limitation of the
1482-
// `EventRateNoiseFilterState::set_event_rate_threshold()` logic which only stores a single value for the
1483-
// threshold. This has to be changed in the future, so the full range of values can be tested.
14841481
camera.get_device().get_facility<I_EventRateActivityFilterModule>()->set_thresholds({144'398, 0u, 0u, 0u});
14851482
camera.get_device().get_facility<I_EventRateActivityFilterModule>()->enable(true);
14861483

@@ -1556,10 +1553,6 @@ TEST_F(Camera_Gtest, should_load_serialized_state) {
15561553
EXPECT_EQ(4, camera.get_device().get_facility<I_LL_Biases>()->get("c"));
15571554

15581555
// NFL
1559-
// Only the first value sadly can be compared and has to be the same as the one used in
1560-
// `get_event_rate_threshold()` due to a limitation of the `EventRateNoiseFilterState::event_rate_threshold()`
1561-
// logic which only returns a single value for the threshold. This has to be changed in the future, so the full
1562-
// range of values can be tested.
15631556
EXPECT_EQ(
15641557
144'398,
15651558
camera.get_device().get_facility<I_EventRateActivityFilterModule>()->get_thresholds().lower_bound_start);

0 commit comments

Comments
 (0)