aboutsummaryrefslogtreecommitdiff
path: root/qtmips_machine/peripheral.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qtmips_machine/peripheral.cpp')
-rw-r--r--qtmips_machine/peripheral.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/qtmips_machine/peripheral.cpp b/qtmips_machine/peripheral.cpp
index 161f760..ac74c2a 100644
--- a/qtmips_machine/peripheral.cpp
+++ b/qtmips_machine/peripheral.cpp
@@ -50,13 +50,19 @@ bool SimplePeripheral::wword(std::uint32_t address, std::uint32_t value) {
printf("SimplePeripheral::wword address 0x%08lx data 0x%08lx\n",
(unsigned long)address, (unsigned long)value);
#endif
+ emit write_notification(address, value);
+
return true;
}
std::uint32_t SimplePeripheral::rword(std::uint32_t address) const {
+ std::uint32_t value = 0x12345678;
#if 0
printf("SimplePeripheral::rword address 0x%08lx\n",
(unsigned long)address);
#endif
- return 0x12345678;
+
+ emit read_notification(address, &value);
+
+ return value;
}