C++ Device API Reference Manual
Reference documentation for the Simics C++ Device API.
 
Loading...
Searching...
No Matches
any_rise.h
Go to the documentation of this file.
1/*
2 © 2023 Intel Corporation
3
4 This software and the related documents are Intel copyrighted materials, and
5 your use of them is governed by the express license under which they were
6 provided to you ("License"). Unless the License provides otherwise, you may
7 not use, modify, copy, publish, distribute, disclose or transmit this software
8 or the related documents without Intel's prior written permission.
9
10 This software and the related documents are provided as is, with no express or
11 implied warranties, other than those that are expressly stated in the License.
12*/
13
14// -*- C++ -*-
15
16#ifndef CPP_API_EXTENSIONS_SRC_SME_PATTERN_RULES_ANY_RISE_H
17#define CPP_API_EXTENSIONS_SRC_SME_PATTERN_RULES_ANY_RISE_H
18
20#include <iostream>
21#include <ios>
22
23namespace sme {
24
25 namespace rules {
26
31 class any_rise : public I_pattern_rule
32 {
33 public:
38 uint8_t m_bit;
39
45
50 virtual ~any_rise() {;}
51
52// TODO: Add mode where
59 virtual void process_rule( uint64_t _old_value, uint64_t & _new_value) {
60 if( is_active() && is_bound() && (!_old_value && _new_value) ) {
61 m_lambda();
62 }
63 }
64 };
65
66 }
67
68}
69
70#endif /*CPP_API_EXTENSIONS_SRC_SME_PATTERN_RULES_ANY_RISE_H*/
Interface and base class for all notification rule types.
Definition: I_pattern_rule.h:32
_always_inline bool is_active()
reports if rule is active for processing.
Definition: I_pattern_rule.h:78
std::function< void()> m_lambda
placeholder for lambda
Definition: I_pattern_rule.h:38
_always_inline bool is_bound()
has the lambda callback been bound.
Definition: I_pattern_rule.h:85
rule specifically to monitor the edge when any bit in the register is first to rise.
Definition: any_rise.h:32
virtual ~any_rise()
Destroy the "any rise" object.
Definition: any_rise.h:50
uint8_t m_bit
The bit which is to change state.
Definition: any_rise.h:38
virtual void process_rule(uint64_t _old_value, uint64_t &_new_value)
process rule evaluation between old and new values.
Definition: any_rise.h:59
any_rise()
Construct a new "any rise" object.
Definition: any_rise.h:44
Definition: expression_vector.h:25