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 while updating an Eidos state. Inputs: [BLOCK_LO, BLOCK_HI, CV, write_ptr, end_ptr]Outputs: [BLOCK_LO', BLOCK_HI', CV', write_ptr]Where BLOCK_LO and BLOCK_HI are the two block words and CV is the Eidos chaining word (BLOCK_LO on top).Notice that the end_ptr - write_ptr value must be positive and a multiple of 8. |
pipe_words_to_memory | Copies an arbitrary number of words from the advice stack to memory while updating an Eidos state. Inputs: [num_words, write_ptr]Outputs: [BLOCK_LO, BLOCK_HI, CV, write_ptr']Where BLOCK_LO and BLOCK_HI are the final block words and CV is the final Eidos chaining word (BLOCK_LO on top). |
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'] |
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'] |