From 6b639c50c93e4a682b15dcdf20f3d46a47d68a64 Mon Sep 17 00:00:00 2001 From: Pavel Pisa Date: Fri, 8 Feb 2019 10:47:27 +0100 Subject: Add write and read notification to the simple peripheral component. Signed-off-by: Pavel Pisa --- qtmips_machine/peripheral.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'qtmips_machine/peripheral.cpp') 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; } -- cgit v1.2.3