Kris-Sekula / EPROM-EMU-NG

EPROM Emulator Project with Arduino
https://mygeekyhobby.com/2020/07/05/eprom-emulator/
Apache License 2.0
137 stars 34 forks source link

Read current address target device #2

Closed dimiras closed 4 years ago

dimiras commented 4 years ago

Hello, Is it possible to read which address the target device is accessing?

Thanks

Kris-Sekula commented 4 years ago

Hi,

hmm, that would be pretty tricky as the address being accessed will constantly change while the target system is running.

What is the use case on your mind?

Kris

dimiras commented 4 years ago

The use case I have in mind is to use it inside a car ecu, and have map tracing to know which map and cell is being accessed. Something like this https://www.youtube.com/watch?v=iVGGv_PYTxI

Kris-Sekula commented 4 years ago

oh, I see. Nope, sorry the current hardware of the emulator can't do that. I think someone else who is using my emulator for ECU, was asking me a similar question but I didn't realize what he meant... after viewing the video I now get the question, thanks :)

dimiras commented 4 years ago

Ok thanks a lot :) Do you think that the hardware would need many changes to get a feature like this? I am a Software Engineer, so I would not have no problem with code side of things, but in terms of eletronic hardware I dont have a clue.

Kris-Sekula commented 4 years ago

Yep, you the hardware would have to be completely changed. If the address being accessed doesn't change too fast, you can do it with a larger microcontroller ... otherwise, you would need an FPGA or something similar to keep track in real-time.

dimiras commented 4 years ago

The target device uses a Intel 8051 running at 12mhz

Kris-Sekula commented 4 years ago

according to that video, you can see the CPU jumping between addresses once or twice a second, which is considered "slow" and a simple microcontroller to monitor the address lines would be enough... but if the target CPU is "jumping" between locations at full speed (8051 can do a million instruction per second), you would have to take a different approach. If you have access to the commercial hardware you can have a look at how they do it :)

dimiras commented 4 years ago

I think they only monitor the addresses where the map values are and ignore the other memory accesses that the 8051 reads while going through the code. From what I could figure out they are using a fpga.