Memory procedures
Module miden::core::mem contains a set of utility procedures for working with random access memory.
| Procedure | Description |
|---|---|
memcopy_words | Copies n words from read_ptr to write_ptr.read_ptr and write_ptr pointers must be word-aligned.Inputs: [n, read_ptr, write_ptr]Outputs: []Total cycles: |
memcopy_elements | Copies n elements from read_ptr to write_ptr.Inputs: [n, read_ptr, write_ptr]Outputs: []Total cycles: |
pipe_double_words_to_memory | Copies an even number of words from the advice_stack to memory. Inputs: [C, B, A, write_ptr, end_ptr]Outputs: [C, B, A, write_ptr]Notice that the end_ptr - write_ptr value must be positive and a multiple of 8.Total cycles: |
pipe_words_to_memory | Copies an arbitrary number of words from the advice stack to memory. Inputs: [num_words, write_ptr]Outputs: [C, B, A, write_ptr']Total cycles:
|
pipe_preimage_to_memory | Moves an arbitrary number of words from the advice stack to memory and asserts it matches the commitment. Inputs: [num_words, write_ptr, COMMITMENT]Outputs: [write_ptr']Total cycles:
|
pipe_double_words_preimage_to_memory | Moves an even number of words from the advice stack to memory and asserts it matches the commitment. Inputs: [num_words, write_ptr, COMMITMENT]Outputs: [write_ptr']Total cycles: |