Intel® FPGA University Program
University Program Material, Education Boards, and Laboratory Exercises

Mixed SW/HW project

Altera_Forum
Honored Contributor II
989 Views

Hi, 

 

I'm pretty much new to this Altera DE2 board and have some questions regarding this. 

We are trying to do a mixed SW/HW project with Altera DE2 board and are stuck at the point where we combine these SW and HW components. 

I did search on this forum for my questions and it seems that I need to use 

NIOS/SOPC builder to do a mixed SW/HW project. 

But I'm still quite lost here so I'm asking you guys once again. 

 

To briefly explain what my project does, we are implementing a digital alarm clock on the FPGA board and trying to display the clock on the C GUI program on the computer. So we basically need a general I/O b/w our C program and the verilog. 

 

The software versions that we use are 

NIOS II 9.0 sp1 

Quartus II 9.0 sp1 

 

First, I'd like to confirm whether this is possible to do with DE2 board. 

It would be really appriciated if you can explain how this can be done if possible. 

 

Second, we are using custom c libraries for our program and we would like to know whether we can use thses libraries in NIOS/SOPC. 

 

Thank you in advance. 

 

Andrew
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
276 Views

Hi Andrew, 

 

 

--- Quote Start ---  

 

I did search on this forum for my questions and it seems that I need to use 

NIOS/SOPC builder to do a mixed SW/HW project. 

 

To briefly explain what my project does, we are implementing a digital alarm clock on the FPGA board and trying to display the clock on the C GUI program on the computer. So we basically need a general I/O b/w our C program and the verilog. 

 

 

--- Quote End ---  

 

 

No, its not necessary to use the NIOS processor. You have two options, namely 

 

- Use the NIOS: If you use NIOS, you would need to program an application in C which runs on NIOS. This would communicate with the PC and implement the clock. 

 

- Do NOT use NIOS: In this case you would need to implement the clock and the interface in hardware using Verilog/VHDL. 

 

To communicate between PC and the FPGA, you can either use the RS-232 port on the DE2 board (the simplest option), or the USB, etc. You can then decide on a protocol to send the clock data. This protocol would be known by the C GUI running on the PC and the custom clock hardware/NIOS running on the FPGA. 

 

 

--- Quote Start ---  

 

Second, we are using custom c libraries for our program and we would like to know whether we can use thses libraries in NIOS/SOPC. 

 

--- Quote End ---  

 

 

As the entities running on the PC and the FPGA would be completely independent of each other. They would only be sharing the knowledge of the common protocol. Hence, this is of no concern. 

 

Hope it helps!
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

Thank you very much for the explanation. 

I guess I was misunderstanding what the NIOS does. 

 

And now I've got another question to ask regarding the DE2 board's digital input. 

Is there any quick and cheap way to convert multiple analog signal inputs to 

digital and inject them to the DE2 board? 

A/D chips that we found are all one analog input signal to multi digital output. 

But what we need is several 1bit to 1bit A/D and also should be able to inject to the DE2 board as input. 

 

Thank you, 

Andrew
0 Kudos
Altera_Forum
Honored Contributor II
276 Views

ADS1204 has 4 1bit A/D inputs.

0 Kudos
Reply