// store data
// load stored data
These two methods can be called by all modules objects. Thus,
All of the three previous commands call the same store() function, also,
All of the three previous commands call the same load() function.
This is because all of the modules inherit from the same object where the functions store() & load() were defined. However, we can override these functions if we define them inside the module object itself. For example, let’s define the following inside UART object:
// store data into UART buffer
Now, if we call the following:
When the 2nd and 3rd commands are called, the first defined store() method which is in the parent object will run to store data, however, when the 1st command is called, the second store() method which is defined in UART object will run to store data into UART buffer. Thus, store() method of the child object has overridden the store() method of the parent.
Now, my next task is to make UART Demo to ensure the simulator I have been working on during my internship is working as expected. This can be done by defining STORE & LOAD related functions that simulate a real UART inside the UART child object. I have not done this task completely yet. Thus, I will talk to you about it next week. Stay tuned!