second Review
Build on RHEL8 docker image / build (push) Failing after 34s
Run Simulator Tests on local RHEL8 / build (push) Failing after 1m51s
Build on RHEL9 docker image / build (push) Successful in 4m14s
Run Simulator Tests on local RHEL9 / build (push) Successful in 18m40s

This commit is contained in:
2026-07-03 15:59:56 +02:00
parent b725be49b2
commit 43fedb9b1b
14 changed files with 164 additions and 110 deletions
@@ -1,5 +1,7 @@
#pragma once
#include <cstdint>
#include <exception>
#include <fmt/format.h>
#include <string_view>
namespace sls {
@@ -32,6 +34,12 @@ struct RegisterField {
template <typename T>
void setRegisterField(uint32_t &registervalue, const RegisterField &reg_field,
T field_value) {
if (field_value > reg_field.bitmask) {
throw std::invalid_argument(
fmt::format("Value {} cannot fit in field with bitmask {}",
field_value, reg_field.bitmask));
}
// Clear the bits corresponding to the field
registervalue &= ~(reg_field.bitmask << reg_field.bit_position);
// Set the new value for the field