Skip to content

Commit

Permalink
added toggling rate config
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomoerz committed Sep 3, 2024
1 parent fdcd6db commit 95512eb
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions include/DRAMUtils/config/toggling_rate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#ifndef DRAMUTILS_CONFIG_TOGGLING_RATE_H
#define DRAMUTILS_CONFIG_TOGGLING_RATE_H

#include <DRAMUtils/util/json_utils.h>

namespace DRAMUtils::Config {

enum class TogglingRateIdlePattern
{
L = 0,
H = 1,
Z = 2,
Invalid = -1
};
NLOHMANN_JSON_SERIALIZE_ENUM(TogglingRateIdlePattern,
{{TogglingRateIdlePattern::Invalid, nullptr},
{TogglingRateIdlePattern::L, "L"},
{TogglingRateIdlePattern::H, "H"},
{TogglingRateIdlePattern::Z, "Z"}})

struct ToggleRateDefinition
{
double togglingRateRead;
double togglingRateWrite;
double dutyCycleRead;
double dutyCycleWrite;
TogglingRateIdlePattern idlePatternRead;
TogglingRateIdlePattern idlePatternWrite;
};
NLOHMANN_JSONIFY_ALL_THINGS(ToggleRateDefinition, togglingRateRead, togglingRateWrite, dutyCycleRead, dutyCycleWrite, idlePatternRead, idlePatternWrite)

} // namespace DRAMUtils::Config

#endif /* DRAMUTILS_CONFIG_TOGGLING_RATE_H */

0 comments on commit 95512eb

Please sign in to comment.