Jump to content
  • 0

Best Pmod for Debugging / Output


Riesenrad

Question

Hello together,
I'm a student and I am going to buy the Basys3 board. At that nice student price I thought I'd get a Pmod for Debugging like a little screen.
I will be programming only hardware circuits and my own processors.

As it seems to me, all tutorials for the OLEDrgb Pmod are made for use with the Microblaze which is not something that I plan to do. For that kind of stuff I already have microcontrollers lying around.

I want to be able to access the screen / output (maybe only leds are possible for this purpose? and 7 segments?) directly via my hardware like turning on and off LEDs for debugging and maybe also for displaying actual useful information.

What would be the best Pmod for this sake? OLED? LCD? Are these even accessible via SystemVerilog? 7 Segment and LEDs should work afaik but the board already has a lot of them...

Some examples: 

Showing which state of an automata I'm in, Showing if my clock is working, Displaying results of a calculation, ...

Thank you in advance!

Riesenrad

Link to comment
Share on other sites

13 answers to this question

Recommended Posts

@Riesenrad,

I just bought a PMod to help me debug my RTL.  I bought a PMod8LD.  It has 8-LEDs on it that can be used for debugging.  I purchased it to primarily help me debug whether or not I had my constraints file done properly for a icoboard board.  Since the Basys3 already has 16 LED's, I'm not sure this hardware would help you.

As for the OLEDrgb, it is not necessary to program it via MicroBlaze.  You can find an example project here that programs the OLEDrgb via a ZipCPU.  Specifically, you can find a digital controller for it here, and the software that activates that controller here.  Because of the difficulty of setting it up, I might argue that a CPU is the best way to set up and use this particular PMod, although I'm sure with your imagination you might find other ways to do so.

If your goal, though, is a debug display, why not use the VGA?  I think you'll find the VGA easier to use than the OLEDrgb, although you will need to be creative regarding any video memory.  (I ran the Basys-3 VGA from compressed flash memory ...)

Personally, I would recommend that the best debugging capability is already on the board: you have those LEDs, and you have a UART port that can connect to a terminal.  These are fairly easy to use, and can be set up to send ... just about whatever you would like.  My personal approach has been to get the UART working and commanding a wishbone bus, after which point I then debug the board using a wishbone-based scope.

I might also recommend you look into Verilator as a nice open source means of debugging things in your FPGA.

Dan

 

 

Link to comment
Share on other sites

Hi Dan!
Thank you very much for your fast and detailed response, that's amazing!

Yes, right I have VGA :D Almost forgot about that ;) Then I will certainly use that in combination with your other tips like UART → Terminal. For general output in projects, would the CLS / CLP module be easier to control via Verilog? (not by implementing a CPU and then running C or so)

Regarding the memory: There would be Memory Pmods which I saw, would those be of any help? Pmod SF3: 32 MB Serial NOR Flash this one for example. 

I will definitely check out your links, thanks for that again.
Dave

Link to comment
Share on other sites

@Riesenrad,

I have the PModCLS.  I found it very easy/simple to use, and I like it a lot.  Indeed, my first project to use it was on my Basys-3 board--although I was bit-banging a GPIO register to send things using it.  However, if you go to digikey to build your own project, you will find that the CLS interface is not the normal interface for the display device.  So ... it depends upon your purpose.  Are you trying to learn how to drive a display that you might then integrate into your own circuit board?  Both should be *much* easier to control from Verilog than the OLEDrgb would be.

Incidentally, the Basys-3 project I created with the PModCLS was this (cause this is just fun): I taught the Basys3 to read from the mouse and then adjust the PModCLS.  I created eyebrows on the top line, and eyeballs on the bottom line.  If you moved the mouse to the left, the eyeballs would track to the left, vice versa for moving to the right.  Further, if you moved the mouse down, the eyebrows would get progressively drawn together until they were outright angry.  Move the mouse up for the eyebrows to go up.  Lots of fun.

As for the SPI based NOR flash, I would recommend that you really don't need a new piece of hardware to learn how to use it, since you already have a QSPI flash on the Basys-3 board.  You can even find the controller I used for my Basys3 flash, both to read and program it, here.

Dan

Link to comment
Share on other sites

Okay, maybe I will get that then :)

How do you mean "if you go to digikey"? Isn't it also a shop for these parts? Yes, I would like to learn how to displays for future projects, though I'd debug over VGA and UART as you explained earlier. 

This sounds fun :D 

Okay, so it has enough RAM onboard for driving a VGA screen?

Dave

Link to comment
Share on other sites

@Riesenrad,

No, the Basys3 doesn't have enough RAM on board for driving a VGA screen.  If you want to drive a VGA screen from RAM, you may need to get a different board, such as a Nexys-4 DDR or Nexys-Video.

The VGA project I did on the Basys-3 involved decompressing static video images from flash and then displaying them to the screen.  The compression was necessary because the flash isn't fast enough to drive the VGA.  The images needed to be static because flash is just too hard to change.  So ... I can use a Basys-3 board to display a slide show.  Other VGA tests I did included creating a blank screen with proper sync's, creating a test screen, and drawing a pointer controlled by the mouse onto the screen.

As for my reference to digikey, that had to do with if you wished to build your own circuit board and so you were buying raw components.

Dan

P.S. I'm told that a certain un-named Digilent employee (@Bianca) managed to teach a Basys-3 board how to display (and almost play) PacMan using the VGA, but no one has released the source code for how to do this.  :D  I bring this up as a simple challenge to you to be creative, and to try to think outside the box.

Link to comment
Share on other sites

Okay :) Well I think that's overkill for me :D 

So there's no way of adding real RAM right? I also don't want to build a device from parts yet especially since this will be my first time executing my code on a physical FPGA.

Ahh I see! This way it's just a harder challenge to solve ;) Like the un-named Digilent employee did ;) No but for debugging it's not like I want to display a video on it, just a few numbers and characters... I will probably try to follow your approach once I have the board.

Dave

Link to comment
Share on other sites

@Riesenrad,

I really despise answering questions of the form "is there no way to do X".  At one time I would've said there was no way to use the Basys-3 VGA successfully, but some very creative individuals have since proved me wrong. :o To really answer that question requires proving that it is completely impossible, and that no matter how creative someone gets it cannot be done.  I'm not ready/able to go that far.
Perhaps I should answer your question this way: Adding high speed RAM to a basys-3 board is beyond my own ability.  :P

Dan

Link to comment
Share on other sites

Hi Riesenrad,

Unfortunately there is no external memory with the Basys 3 so block ram is what you'll have available. You could also use the PmodOLED. You can also use this HDL project here. To make it work for the basys 3 you need to change the part that it is using in settings from Nexys Video to the Basys 3, you will have to replace the Nexys Video xdc with the Basys 3 xdc and uncomment 2 lines in the top file of the project to have it work for the PmodOLED. Hope this helps!

cheers,

Jon 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...