Jump to content
  • 0

VHDL code for XADC & Picoblaze in VHDL


Helmsley

Question

Hello.

I am a newbie in FPGA. I am trying to understand the Arty A7 board. I was able to run the basic programs. While trying to employ picoblaze and xadc, I was able to find only the verilog code for xadc in Arty 7.

Are there codes/.vhd files for picoblaze-xadc communication with Arty A7?

Kindly help.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

17 hours ago, Helmsley said:

Are there codes/.vhd files for picoblaze-xadc communication with Arty A7?

That was pretty quick. You've discovered lesson one, which is while it's usually possible to recreate designs and maybe even 'customize' them using the drag and drop IP design flow, getting the tools to help you do what you want to do is another matter. Perhaps you can get lucky and find someone else who's solved the problem but even then what does it get you?

I'd like to encourage you to forget about logic implementations of processors like MicroBlaze or PicoBlaze and just do a lot of VHDL or Verilog design projects starting with the very simple and adding more complexity as your skill grows. You'll learn a lot faster without the crutches. (If you just gotta do software development with your FPGA projects there are some nice cores for 8-bit ATMEL processors that work with toolchains for that product family.. just saying that you don't have to use FPGA vendor processor cores to do C programming on an FPGA board ).

A nice way to interact with your logic is a UART and you don't need a processor to do that. In fact, I don't ever use soft-core processors in my FPGA designs but most of them start out with a UART UI so that I can interact with the logic, especially as the design gets built up with more complexity.

Having someone hand you 'code' to do what you want is an event with low probability and dubious value. Finding code that might help you do it yourself has much better odds. If you don;t know how to instantiate a Verilog module in your VHDL code, then I'd suggest that this should become one of your early projects. Who knows? It might help you become bi-lingual.

Altera's NIOS was the first vendor provided programmable logic soft-processor core. Xilinx saw that and concluded that this was something that they couldn't pass up on so out came the MicroBlaze not long after NIOS was officially adopted. Picoblaze was introduced as the poor cousin version for those not able to purchase the IP that really made them useful. A lot has changed since then except that their use is pretty hard to justify for real world applications.

P.S. I used NIOS before it was officially supported and it just so happens being able to make changes to the FPGA application using C was really ideal for the project that I was working on. That was the only project, even in hindsight, that I think that a processor in logic was warranted.

Link to comment
Share on other sites

7 hours ago, zygot said:

I'd like to encourage you to forget about logic implementations of processors like MicroBlaze or PicoBlaze and just do a lot of VHDL or Verilog design projects starting with the very simple and adding more complexity as your skill grows.

By the time I posted this question, I tried out various examples and was able to successfully simulate them. I am familiar with the basics. I am trying out Arty A7. I was able to do couple of programs and run them. As I am trying to see PicoBlaze-XADC working and obtain the working, I am stuck at the coding side. I tried to simulate KC705 code and was able to simulate it briefly. However, the code I need is that of A7 (for running on the board).

7 hours ago, zygot said:

If you don;t know how to instantiate a Verilog module in your VHDL code, then I'd suggest that this should become one of your early projects. Who knows? It might help you become bi-lingual.

Well, I'll definitely look into this. Thank you for the advice.

 

Link to comment
Share on other sites

There's nothing wrong with trying to port a design example from one hardware platform to another as a way to learn. If you have all of the sources in an HDL, and the design uses the same external interfaces it might just be as simple as changing the pin location constraints to agree with  your target platform. Usually, there's a bit more work to do.

Still, I contend that simpler projects with a few VHDL or Verilog sources, and having no or at least a very limited number of Xilinx or 3rd party IP, are easier to digest and port. All Series 7 devices have XADC facilities so it's a good choice as a target for inquiry. A UART is an easy to understand way to interact with your FPGA design and available on most FPGA development boards. Even if it isn't, you can buy a cheap TTL compatible USB UART cable or breakout board to use 2 spare IO pins of any FPGA board to add as many UARTs as you want. 

You should do what makes you happy, generates interest, and results in progress toward your goals. As a broad generality, those with a lot of experience usually have insight that might facilitate that progress.

One source of HDL example code that is often overlooked are the tools themselves. Usually, when you create a component or module based on the vendor supplied IP you get both VHDL and Verilog templates for instantiating it.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...