Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
bb::avm2::simulation::Memory Class Reference

#include <memory.hpp>

Inheritance diagram for bb::avm2::simulation::Memory:
bb::avm2::simulation::MemoryInterface

Public Member Functions

 Memory (uint16_t space_id, RangeCheckInterface &range_check, ExecutionIdGetterInterface &execution_id_manager, EventEmitterInterface< MemoryEvent > &event_emitter)
 
const MemoryValueget (MemoryAddress index) const override
 
void set (MemoryAddress index, MemoryValue value) override
 
uint16_t get_space_id () const override
 
const MemoryValueunconstrained_get (MemoryAddress index) const
 
- Public Member Functions inherited from bb::avm2::simulation::MemoryInterface
virtual ~MemoryInterface ()=default
 
virtual bool is_valid_address (const MemoryValue &address)
 

Private Member Functions

void validate_tag (const MemoryValue &value) const
 

Private Attributes

uint16_t space_id
 
unordered_flat_map< MemoryAddress, MemoryValuememory
 
RangeCheckInterfacerange_check
 
ExecutionIdGetterInterfaceexecution_id_manager
 
EventEmitterInterface< MemoryEvent > & events
 

Detailed Description

Definition at line 15 of file memory.hpp.

Constructor & Destructor Documentation

◆ Memory()

bb::avm2::simulation::Memory::Memory ( uint16_t  space_id,
RangeCheckInterface range_check,
ExecutionIdGetterInterface execution_id_manager,
EventEmitterInterface< MemoryEvent > &  event_emitter 
)
inline

Definition at line 17 of file memory.hpp.

Member Function Documentation

◆ get()

const MemoryValue & bb::avm2::simulation::Memory::get ( MemoryAddress  index) const
overridevirtual

Implements bb::avm2::simulation::MemoryInterface.

Definition at line 26 of file memory.cpp.

◆ get_space_id()

uint16_t bb::avm2::simulation::Memory::get_space_id ( ) const
inlineoverridevirtual

Implements bb::avm2::simulation::MemoryInterface.

Definition at line 30 of file memory.hpp.

◆ set()

void bb::avm2::simulation::Memory::set ( MemoryAddress  index,
MemoryValue  value 
)
overridevirtual

Implements bb::avm2::simulation::MemoryInterface.

Definition at line 12 of file memory.cpp.

◆ unconstrained_get()

const MemoryValue & bb::avm2::simulation::Memory::unconstrained_get ( MemoryAddress  index) const

Definition at line 42 of file memory.cpp.

◆ validate_tag()

void bb::avm2::simulation::Memory::validate_tag ( const MemoryValue value) const
private

Definition at line 51 of file memory.cpp.

Member Data Documentation

◆ events

EventEmitterInterface<MemoryEvent>& bb::avm2::simulation::Memory::events
private

Definition at line 42 of file memory.hpp.

◆ execution_id_manager

ExecutionIdGetterInterface& bb::avm2::simulation::Memory::execution_id_manager
private

Definition at line 40 of file memory.hpp.

◆ memory

unordered_flat_map<MemoryAddress, MemoryValue> bb::avm2::simulation::Memory::memory
private

Definition at line 37 of file memory.hpp.

◆ range_check

RangeCheckInterface& bb::avm2::simulation::Memory::range_check
private

Definition at line 39 of file memory.hpp.

◆ space_id

uint16_t bb::avm2::simulation::Memory::space_id
private

Definition at line 36 of file memory.hpp.


The documentation for this class was generated from the following files: