YARP Data Memory Model
Understanding the YARP Data Memory Model
In the driver module, the data memory interface was always driving a fixed data back to the YARP CPU for the read requests and was discarding the write data value since there was no memory implemented. In this module, we would add the data memory model to fix this issue. The model would be implemented as a separate class that would handle the data memory accesses correctly and would be used by the driver class to drive the correct data back to the YARP CPU.
YARP Data Memory Model
The YARP data memory model would be implemented as a separate class that would handle the data memory accesses correctly. The model would mimc the real data memory where it would be able to store the write data into it and on a read give the last stored value as the output. Given, the modle would be driven by the driver class, we need to make sure that the driver can access the class methods easily. The easiest way to do this would be to implement the data memory model as a static class that can be directly used by any other testbench component to read or write into the memory. For our testbench the memory would only be accessed by the driver component but having it static also makes sense since the CPU would also only have a single main memory.
Loading the interactive workspace...