I just finished Toni’s VGA tutorial and I had a blast; I’m getting good at converting VHDL to Verilog. Next I think I’ll find a RAM tutorial and one for sound. This one didn’t give me too much trouble, but there are a few differences between his tutorial and what I ended up coding.
First, my VGA display has a different resolution than the one used, so I had to find the specifications and adjust them for my monitor. Second, the DE2 board has more output pins dedicated for VGA use; these differences are slight but you won’t get a picture without them. The code comments have the specifics.
One more thing: I don’t use VHDL so I had a little hang-up trying to implement the procedure he uses for drawing the squares. Then I found the ‘task’ keyword for Verilog, which accomplishes the same thing just with slight syntax changes. All the code works great. The PLL generated in QSYS will have to be adjusted for your monitor and you may have to use a different clock input (my case was 50Mhz).
Code here: https://github.com/christopherhays/my-modules/tree/master/tutorial-4
Finished the third tutorial from from the Toni T800 YouTube channel. This one gave me some trouble for a bit because PuTTY was acting a little strange, so I switched to Windows and used the RealTerm serial program that he demonstrates in his video. In RealTerm you can send a single character by just typing it, while in PuTTY you have to hit Enter; I think hitting Enter sends more info to the board, which was messing up my receiving display. I probably could have messed with PuTTY more, but just went with the software that Toni used.
Anyway, for this one use RealTerm to make it easy: 9600 baud rate, no parity, 1 stop bit. I also used a USB to RS232 cable to connect to my pc because the DE2 UART output is via RS232 only.
Code here: https://github.com/christopherhays/my-modules
Completed the 2nd tutorial from the same YouTube channel in Verilog. There is a link to the video below. I am starting to like translating from VHDL to Verilog; it’s a nice little puzzle sometimes. I think that I’m just going to post all of my code because I know how frustrating it can be when people describe the things they’ve done but don’t show you how to do it.
There are three modules here: the first decodes an integer value to display on a seven-segment display, the second splits a large number into its individual digits, and the third is the main module that creates the counter and uses instances of the other modules. Add all of these files to the project and use the main module as the top-level entity.
I’ve worked with the DE2 before, but it has been a while. I just realized that I don’t know what voice I should be using to write these posts; are other people going to read this? I don’t know.
I want to build a hardware project on the DE2, but not one that just drops a prebuilt NIOS II system on the board and I connect the parts in QSYS. That was fun and I did enjoy programming in both C and Verilog, combining the two and interfacing with my custom hardware. This time I want to go deeper; I’ll learn the basics again and then probably choose a cpu to describe in Verilog and see if I can get a basic computer up and running.
How to get Quartus II to see the DE2 board in VirtualBox.
- Connect the DE2 USB Blaster.
- Close VirtualBox.
- Settings -> USB, Enable USB Controller
- Choose USB 2.0
- Click the plus icon to add the USB Blaster.
- Save changes.
- Start VirtualBox.
Setting up Quartus II on my Linux virtual machine just to see if I can get it working. Going to document all steps needed / problems that occur in case I need to do this again one day.
- Using DE2 board.
- Downloaded the 64 bit linux version of Quartus II 13.1
- Installed with all optional boxes checked.
Use the new project wizard; these settings are specific to my DE2 board.
I’ll post more when I have something to say or come up with a real idea for the blog.