Menu

Debug interface

I have been working with the debug interface the latest days. It resulted in some work with both memory interface and the testbenches for debug, which I haven't used for a while, so they were ... incorrect. I know that you should always run all testbenches, but I have to admit that setting up a good test environment is not really a thing I do if I'm not forced to. So instead I do the basement firm approach - run the testbenches when a bug appears or when testing new functionality. This is not the best approach, I actually found a bug I missed just the other day. There was a pixel bug in the VIC-II module, the first column of pixels in each character got the next characters color. Which now is corrected, but I guess you see my point.

I have now updated the read/write commands so it is now possible to read and write in the memory of my computer. These commands shall work with data packages up to 255 bytes, and it's working in my tests with 1 or 5 bytes. I tried writing 255 bytes in a package just after I pushed the code and I can see a small glitch. This will be added in the testbench and corrected, next step will be to add some code in the Arduino to write HEX files and create a testprogram in assembler, write it and run it. Will be fun.

A short description of the current functionality of the debug interface and UART parser, currently I have 6 commands:

  • Write RAM (1-255 bytes)
  • Read RAM (1-255 bytes)
  • Write IO area (1-255 bytes)
  • Read IO area (1-255 bytes)
  • Read ROM (1-255 bytes)
  • Write keyboard binary array

Each command generates an ACK or NAK and a visual description of the packages is available in uartparser2.vhd. Reason for the number 2 is that the first uart parser was more or less a copy of Moti Litochevski's UART to Bus project on Open Core . It is a well documented project and I liked it a lot, but it contained stuff that I didn't need and lacked some stuff I needed, so I completely rewrote everything. Still I was kind of inspired by this code so I think you could see some similarities if you compare.

Posted by Fredrik Beckman 2018-10-03

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.