Prusa MINI Firmware overview
MemData Struct Reference

#include <unwarm.h>

Collaboration diagram for MemData:

Public Attributes

uint32_t v [MEM_HASH_SIZE]
 
uint32_t a [MEM_HASH_SIZE]
 
uint8_t used [(MEM_HASH_SIZE+7)/8]
 
uint8_t tracked [(MEM_HASH_SIZE+7)/8]
 

Detailed Description

Structure used to track reads and writes to memory. This structure is used as a hash to store a small number of writes to memory.

Member Data Documentation

◆ v

uint32_t MemData::v[MEM_HASH_SIZE]

Memory contents.

◆ a

uint32_t MemData::a[MEM_HASH_SIZE]

Address at which v[n] represents.

◆ used

uint8_t MemData::used[(MEM_HASH_SIZE+7)/8]

Indicates whether the data in v[n] and a[n] is occupied. Each bit represents one hash value.

◆ tracked

uint8_t MemData::tracked[(MEM_HASH_SIZE+7)/8]

Indicates whether the data in v[n] is valid. This allows a[n] to be set, but for v[n] to be marked as invalid. Specifically this is needed for when an untracked register value is written to memory.