How Do We Verify Processing-in-Memory Simulators?
This study develops a protocol to check output correctness and interpret the logs of uPIMulator and Downmem, using a common vector-addition setup for the UPMEM architecture.

Two simulators can produce the same numerical result while the figures in their reports refer to different operations. A meaningful comparison therefore begins with two questions: Is the computation correct? What does each recorded value represent? This study develops a protocol that addresses both questions by checking outputs against an independent reference calculation and examining the recorded events and the limits of comparison.
Why Bring Computation Closer to Memory?
In conventional computers, data is stored in memory while the processor performs computations on it. In data-intensive applications, moving data between the processor and memory can affect execution time and energy consumption. Processing-in-memory approaches therefore aim to perform some computation closer to where the data resides, reducing the need for repeated data movement. [1]
One example is the UPMEM architecture, which integrates small processing units with memory on the same chip. Computational tasks can then be distributed to those units and performed on locally stored data. The PrIM benchmark suite provides a set of applications for studying this architecture. [1]
Software simulators help researchers study the behavior of these systems, test their programs, and explore design choices. This study focuses on uPIMulator and Downmem, and on the conditions needed to interpret comparisons between their outputs and logs accurately. [2] [3]
When Is a Comparison Between Simulators Meaningful?
Running an application with the same name on two simulators is not enough, by itself, to explain differences in the figures they report. The simulators may initialize data differently, extract outputs through different paths, or record different sets of operations. Interpreting a difference therefore requires knowing what each path computed and what it recorded.
The study therefore separates two aspects of verification: output correctness and event interpretation. First, does the output extracted from each simulator match the result of an independent reference calculation? Second, do the reported figures describe operations that can be compared directly, or do they cover different regions and serve different purposes? This distinction provides a basis for interpreting the figures before using them to compare performance.
A Simple Experiment: Element-Wise Vector Addition
The study starts with vector addition from the PrIM benchmark suite. Here, a vector is an ordered list of numbers. Each element in the first vector is added to the element at the same position in the second vector to produce the output vector. The following four-element example illustrates the operation. [1]
| Position | Vector A | Vector B | Output C |
|---|---|---|---|
| First | 2 | 3 | 5 |
| Second | 5 | 4 | 9 |
| Third | 1 | 6 | 7 |
| Fourth | 7 | 8 | 15 |
Illustrative example. Each vector in the study configuration contains 1024 elements.
In the study configuration, each vector contains 1024 signed 32-bit integers (int32), with the allowed value range restricted to prevent signed overflow during addition. Each element occupies four bytes, giving a vector size of 4096 bytes. The operation runs on one in-memory processing unit, called a DPU, using 16 execution threads, known as tasklets. These settings, the tool versions, and the data representation are fixed to define the scope of the comparison.
How Do We Check Output Correctness?
The protocol uses an independent reference calculation to obtain the expected result outside the simulators. The output from each simulator is then checked against that result separately. This matters because agreement between two programs does not, by itself, establish correctness: both could share the same error.
An independent deterministic input generator makes it possible to reproduce the same inputs when an experiment is repeated. The selection rules require each transformation to change the inputs, whether the vectors are swapped or their element order is reversed. This avoids repeating an unchanged case because of symmetric data.
In the protocol shown here, the reference result is calculated from the original vectors A and B. In the reversal case, the element order in both inputs is reversed before execution. After extraction, the output is restored to the original element order and compared with the same reference result. All comparisons therefore use a common order. The protocol defines three test cases for each simulator:
| Test case | Applied change | What is checked |
|---|---|---|
| Baseline | Use both vectors in their original order. | The extracted output matches the reference result byte for byte. |
| Swap operands | Swap vectors A and B. | The output still matches the reference, as required by the commutative property of addition. |
| Reverse element order | Reverse the element order in both inputs, then restore the extracted output to the original order. | The expected relationship holds after restoring element order, helping to detect some indexing or data-location errors. |
The plan comprises six runs in this configuration: three per simulator. Any experimental conclusion is limited to these cases and settings. The protocol's ability to detect particular types of errors will be assessed through additional controlled tests.
Enlarge diagram
Why Do We Also Examine What the Logs Mean?
The output vector to be checked can be the same even when the operations used to obtain it differ. The vector-addition path selected for this study illustrates this distinction. In the Python/C++ version of uPIMulator, an internal verification read covers a contiguous region containing the first vector and the output vector; the result overwrites the second vector's region after addition. [4] The adapter used in this study for Downmem performs output readback to the host in the simulation, retrieving only the output region.
With one DPU and 1024 elements of four bytes each, the comparison is as follows:
| Comparison point | uPIMulator — Specified Python/C++ path | Downmem — Adapter used in this study |
|---|---|---|
| Purpose of the operation | Internal verification read. | Output readback to the host in the simulation. |
| Data region accessed | Vector A and output vector C. | Output vector C only. |
| Region size in this configuration | 8192 bytes. | 4096 bytes. |
| Output size compared with the independent reference | 4096 bytes. | 4096 bytes. |
Source — uPIMulator: the pinned source code. [4] Downmem: the configuration of the adapter used in this study.
The output to be checked is therefore the same size in both paths: 4096 bytes. What differs is the region covered by the operation that makes the output available. The protocol keeps output correctness separate from event interpretation. The difference in region size alone is not treated as a difference in transfer efficiency; the purpose, scope, and measurement boundaries of each operation must also be examined.
Enlarge diagram
Where Does the Study Stand?
The following table summarizes the study's stages, including completed work and the work currently in progress.
| Stage | Status | Scope of work |
|---|---|---|
| 1. Literature review and research question | Complete | Define the problem's scope and the conditions for interpreting a comparison between the simulators. |
| 2. Feasibility study and case selection | Complete | Select the tools and vector addition as the starting point for the experiment. |
| 3. Experimental protocol documentation | Complete | Fix the settings, test cases, and decision criteria. |
| 4. Reference and verification tool development | Complete | Prepare the input generator and the tools for extracting outputs and recording events. |
| 5. Diagnostic checks and execution environment preparation | In progress | Complete the checks needed to run the comparison with the pinned versions and settings. |
| 6. Running the six comparison cases | Next | Collect the evidence needed to assess the outputs and interpret the logs. |
| 7. Evaluating detection of controlled errors | Planned | Test the protocol's response to specified changes in transfer lengths or memory offsets. |
| 8. Preparing the paper and verification package | Planned | Document the methodology, results, and limitations, and prepare the work for peer review. |
The evidence needed for the comparison is still being assembled, and the final experimental assessment of agreement between the simulators is not yet complete.
What Does the Study Aim to Contribute?
The study aims to provide a verification protocol that can be traced and reapplied. It specifies the experimental conditions, checks outputs against an independent reference, and explains the events included in the comparison. The intended benefit is to help researchers interpret reported figures on a documented basis, identify the conclusions supported by the evidence, and understand the limits of generalization.
Origins of the study: The study grew out of a critical review of an earlier collaborative university experiment involving gem5, which is why the page retains the archival name gem5-pim in its URL. Yahya Ali Alali now leads the current research independently, focusing on the UPMEM architecture and the uPIMulator and Downmem simulators.
Study background: Review of the earlier gem5 course study
References and documentation
[1] UPMEM architecture and the PrIM benchmark suite
J. Gómez-Luna, I. El Hajj, I. Fernandez, C. Giannoula, G. F. Oliveira, and O. Mutlu, “Benchmarking a New Paradigm: Experimental Analysis and Characterization of a Real Processing-in-Memory System,” IEEE Access, vol. 10, pp. 52565–52608, 2022.
[2] uPIMulator research paper
B. Hyun, T. Kim, D. Lee, and M. Rhu, “Pathfinding Future PIM Architectures by Demystifying a Commercial PIM Technology,” IEEE International Symposium on High-Performance Computer Architecture (HPCA), 2024.
[3] Public Downmem source repository
benbii/downmem, source repository, snapshot e96e167216d17d289c39da6bb5025561d1329c09. Accessed 12 November 2026.
This source documents the public tool; it does not document the adapter used in this study.
[4] Vector addition and output verification in uPIMulator
VIA-Research/uPIMulator, Python/C++ vector-addition data preparation, kernel, and output checking, commit 870d916334e9ff0b190f555f951a9ec3c4257781.

