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 <array>
4
#include <cassert>
5
#include <cstdint>
6
#include <span>
7
8
#include "
barretenberg/vm2/common/memory_types.hpp
"
9
#include "
barretenberg/vm2/simulation/events/addressing_event.hpp
"
10
#include "
barretenberg/vm2/simulation/events/event_emitter.hpp
"
11
#include "
barretenberg/vm2/simulation/gadgets/gt.hpp
"
12
#include "
barretenberg/vm2/simulation/gadgets/memory.hpp
"
13
#include "
barretenberg/vm2/simulation/interfaces/addressing.hpp
"
14
#include "
barretenberg/vm2/simulation/lib/instruction_info.hpp
"
15
#include "
barretenberg/vm2/simulation/lib/serialization.hpp
"
16
17
namespace
bb::avm2::simulation
{
18
19
class
Addressing
final :
public
AddressingInterface
{
20
public
:
21
Addressing
(
const
InstructionInfoDBInterface
&
instruction_info_db
,
22
GreaterThanInterface
&
gt
,
23
EventEmitterInterface<AddressingEvent>
&
event_emitter
)
24
:
instruction_info_db
(
instruction_info_db
)
25
,
gt
(
gt
)
26
,
events
(
event_emitter
)
27
{}
28
29
std::vector<Operand>
resolve
(
const
Instruction
&
instruction
,
MemoryInterface
&
memory
)
override
;
30
31
private
:
32
const
InstructionInfoDBInterface
&
instruction_info_db
;
33
GreaterThanInterface
&
gt
;
34
EventEmitterInterface<AddressingEvent>
&
events
;
35
36
bool
is_address_out_of_range
(
const
FF
& address);
37
};
38
39
}
// 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:19
bb::avm2::simulation::Addressing::Addressing
Addressing(const InstructionInfoDBInterface &instruction_info_db, GreaterThanInterface >, EventEmitterInterface< AddressingEvent > &event_emitter)
Definition
addressing.hpp:21
bb::avm2::simulation::Addressing::events
EventEmitterInterface< AddressingEvent > & events
Definition
addressing.hpp:34
bb::avm2::simulation::Addressing::is_address_out_of_range
bool is_address_out_of_range(const FF &address)
Definition
addressing.cpp:138
bb::avm2::simulation::Addressing::resolve
std::vector< Operand > resolve(const Instruction &instruction, MemoryInterface &memory) override
Definition
addressing.cpp:20
bb::avm2::simulation::Addressing::instruction_info_db
const InstructionInfoDBInterface & instruction_info_db
Definition
addressing.hpp:32
bb::avm2::simulation::Addressing::gt
GreaterThanInterface & gt
Definition
addressing.hpp:33
bb::avm2::simulation::AddressingInterface
Definition
addressing.hpp:13
bb::avm2::simulation::EventEmitterInterface
Definition
event_emitter.hpp:10
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
event_emitter
EventEmitter< DataCopyEvent > event_emitter
Definition
data_copy.test.cpp:56
event_emitter.hpp
instruction
Instruction instruction
Definition
gas_tracker.test.cpp:33
instruction_info.hpp
memory_types.hpp
bb::avm2::simulation
Definition
address_derivation_event.hpp:6
bb::avm2::FF
AvmFlavorSettings::FF FF
Definition
field.hpp:10
std::get
constexpr decltype(auto) get(::tuplet::tuple< T... > &&t) noexcept
Definition
tuple.hpp:13
serialization.hpp
gt.hpp
memory.hpp
addressing.hpp
bb::avm2::simulation::Instruction
Definition
serialization.hpp:30
src
barretenberg
vm2
simulation
gadgets
addressing.hpp
Generated by
1.9.8