Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Yellow paper - AVM circuit Chiplets section #4642

Merged
merged 4 commits into from
Feb 22, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion yellow-paper/docs/public-vm/avm-circuit.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,24 @@ Any lookup into calldata from a request's initial contract call must retrieve a
**TODO**

## Chiplets
**TODO**

A chiplet is a component dedicating to perform specialized sub-operations sharing some commonalities. Each chiplet consists of a specific table being part of the AVM circuit, i.e., specific columns with relations solely acting on them form the chiplet. The main rationale is to offload specialized computations outside of the **operations trace** (instruction controller) which might require more than a single row and/or additional dedicated columns. In addition, this approach offers modularity as chiplets are very independent components.

jeanmon marked this conversation as resolved.
Show resolved Hide resolved
The interaction between a chiplet and the instruction controller follows the following pattern:

1. The **inputs** of a chiplet sub-operation are loaded to the respective intermediate registers (usually $I_a$, $I_b$).
2. The dedicated chiplet fetches/copies the content of the intermediate registers from the **operations trace** in its own table and executes the operation.
3. The output of the operation is copied back to the **operations trace** in a specific register (usually $I_c$). This register is usually involved in a write memory sub-operation.

In addition to the mentioned inputs and output, some other relevant information such as the instruction tag might be copied as well to the chiplet.

In the circuit, the transmission of the input/output between the **chiplet trace** and the **operations trace** are performed through lookup or permutation constraints, i.e., they ensure that all relevant intermediate registers have the same values between both traces. The unique key of this mapping is `CLK` which is basically used as a "DB foreign key" from the **chiplet trace** pointing to corresponding entry in the **operations trace**.

The planned chiplets for the AVM are:

- **ALU**: Arithmetic and bitwise operations such as addition, multiplication, XOR, etc...
- **Type Converter**: Dedicated to casting words between different types and/or type constraints.
- **Complex Operations:** Cryptographic relevant operations or other computationally intensive gadgets. Potentially comprised of several chiplets (TBD).
jeanmon marked this conversation as resolved.
Show resolved Hide resolved

## Circuit I/O
### How do "Public Inputs" work in the AVM circuit?
Expand Down
Loading