Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
memory.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <memory>
4
12
13namespace bb::avm2::simulation {
14
46
67
68} // namespace bb::avm2::simulation
ExecutionIdGetterInterface & execution_id_manager
Definition memory.hpp:40
const MemoryValue & unconstrained_get(MemoryAddress index) const
Reads a value from memory without emitting an event.
Definition memory.cpp:64
void validate_tag(const MemoryValue &value) const
Validates that a value fits within its tag's bit-width via a range check.
Definition memory.cpp:79
EventEmitterInterface< MemoryEvent > & events
Definition memory.hpp:42
Memory(uint16_t space_id, RangeCheckInterface &range_check, ExecutionIdGetterInterface &execution_id_manager, EventEmitterInterface< MemoryEvent > &event_emitter)
Definition memory.hpp:17
const MemoryValue & get(MemoryAddress index) const override
Reads a tagged value from memory at the given address.
Definition memory.cpp:44
uint16_t get_space_id() const override
Definition memory.hpp:30
RangeCheckInterface & range_check
Definition memory.hpp:39
unordered_flat_map< MemoryAddress, MemoryValue > memory
Definition memory.hpp:37
void set(MemoryAddress index, MemoryValue value) override
Writes a tagged value to memory at the given address.
Definition memory.cpp:24
MemoryProvider(RangeCheckInterface &range_check, ExecutionIdGetterInterface &execution_id_manager, EventEmitterInterface< MemoryEvent > &event_emitter)
Definition memory.hpp:49
ExecutionIdGetterInterface & execution_id_manager
Definition memory.hpp:64
std::unique_ptr< MemoryInterface > make_memory(uint16_t space_id) override
Definition memory.hpp:57
EventEmitterInterface< MemoryEvent > & events
Definition memory.hpp:65
RangeCheckInterface & range_check
Definition memory.hpp:63
EventEmitter< DataCopyEvent > event_emitter
AVM range check gadget for witness generation.
uint32_t MemoryAddress
::ankerl::unordered_dense::map< Key, T > unordered_flat_map
Definition map.hpp:15
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition tuple.hpp:13