38#include <ARM/TLM/arm_chi.h>
42#include "pybind11/functional.h"
46namespace py = pybind11;
48using namespace ARM::CHI;
55tlm_chi_generator_pybind(pybind11::module_ &m_tlm_chi)
57 auto tlm_chi_gen = m_tlm_chi.def_submodule(
"tlm_chi_gen");
62 using Callback = Action::Callback;
63 py::class_<tlm::chi::TlmGenerator::Transaction>(tlm_chi_gen,
"Transaction")
64 .def(py::init<Payload*, Phase&>())
70 self.addCallback(std::make_unique<Expectation>(
name, cb));
76 self.addCallback(std::make_unique<Expectation>(
77 cb.attr(
"__name__").cast<std::string>(),
78 cb.cast<Callback>()));
85 self.addCallback(std::make_unique<Assertion>(
name, cb));
91 self.addCallback(std::make_unique<Action>(cb,
false));
97 self.addCallback(std::make_unique<Action>(cb,
true));
100 .def_property(
"phase",
106EmbeddedPyBind embed_(
"tlm_chi_gen", &tlm_chi_generator_pybind,
"tlm_chi");
Action: Does something without condition checking.
Assertion: Will check for a specific condition and will fail if the condition is not met.
Expectation: Will check for a specific condition and will warn if the condition is not met.
Transaction object It stores ARM::CHI::Payload and ARM::CHI::Phase objects, and a list of action call...
ARM::CHI::Phase & phase()
Copyright (c) 2024 Arm Limited All rights reserved.
const std::string & name()