Barretenberg
The ZK-SNARK library at the core of Aztec
Loading...
Searching...
No Matches
addressing.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <cstdint>
4
5
#include "
barretenberg/vm2/common/field.hpp
"
6
#include "
barretenberg/vm2/simulation/events/addressing_event.hpp
"
7
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
8
#include "
barretenberg/vm2/simulation/interfaces/addressing.hpp
"
9
#include "
barretenberg/vm2/simulation/interfaces/gt.hpp
"
10
#include "
barretenberg/vm2/simulation/interfaces/memory.hpp
"
11
#include "
barretenberg/vm2/simulation/lib/instruction_info.hpp
"
12
#include "
barretenberg/vm2/simulation/lib/serialization.hpp
"
13
14
namespace
bb::avm2::simulation
{
15
16
class
Addressing
final :
public
AddressingInterface
{
17
public
:
18
Addressing
(
const
InstructionInfoDBInterface
&
instruction_info_db
,
19
GreaterThanInterface
&
gt
,
20
EventEmitterInterface<AddressingEvent>
&
event_emitter
)
21
:
instruction_info_db
(
instruction_info_db
)
22
,
gt
(
gt
)
23
,
events
(
event_emitter
)
24
{}
25
26
std::vector<Operand>
resolve
(
const
Instruction
&
instruction
,
MemoryInterface
&
memory
)
override
;
27
28
private
:
29
const
InstructionInfoDBInterface
&
instruction_info_db
;
30
GreaterThanInterface
&
gt
;
31
EventEmitterInterface<AddressingEvent>
&
events
;
32
33
bool
is_address_out_of_range
(uint64_t
address
);
34
};
35
36
}
// namespace bb::avm2::simulation
addressing_event.hpp
bb::avm2::gt
Definition
gt.hpp:33
bb::avm2::memory
Definition
memory.hpp:36
bb::avm2::simulation::Addressing
Definition
addressing.hpp:16
bb::avm2::simulation::Addressing::Addressing
Addressing(const InstructionInfoDBInterface &instruction_info_db, GreaterThanInterface >, EventEmitterInterface< AddressingEvent > &event_emitter)
Definition
addressing.hpp:18
bb::avm2::simulation::Addressing::events
EventEmitterInterface< AddressingEvent > & events
Definition
addressing.hpp:31
bb::avm2::simulation::Addressing::is_address_out_of_range
bool is_address_out_of_range(uint64_t address)
Checks if an address as uint64_t is out of range. Emits a gt event comparing the address to AVM_HIGHE...
Definition
addressing.cpp:182
bb::avm2::simulation::Addressing::resolve
std::vector< Operand > resolve(const Instruction &instruction, MemoryInterface &memory) override
Resolve the operands of an instruction. If the operands are non-addresses, they are returned as is....
Definition
addressing.cpp:32
bb::avm2::simulation::Addressing::instruction_info_db
const InstructionInfoDBInterface & instruction_info_db
Definition
addressing.hpp:29
bb::avm2::simulation::Addressing::gt
GreaterThanInterface & gt
Definition
addressing.hpp:30
bb::avm2::simulation::AddressingInterface
Definition
addressing.hpp:12
bb::avm2::simulation::EventEmitterInterface
Definition
event_emitter.hpp:11
bb::avm2::simulation::GreaterThanInterface
Definition
gt.hpp:9
bb::avm2::simulation::InstructionInfoDBInterface
Definition
instruction_info.hpp:11
bb::avm2::simulation::MemoryInterface
Definition
memory.hpp:10
AddressRefMutationOptions::address
@ address
event_emitter
EventEmitter< DataCopyEvent > event_emitter
Definition
data_copy.test.cpp:57
event_emitter.hpp
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:33
instruction_info.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
serialization.hpp
addressing.hpp
gt.hpp
memory.hpp
bb::avm2::simulation::Instruction
Definition
serialization.hpp:32
field.hpp
src
barretenberg
vm2
simulation
gadgets
addressing.hpp
Generated by
1.9.8