LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simulate my Labview FPGA code using only the NI-RIO driver .. is it possible.

Hello,

I need more explanation regarding how can I simulate my Labview FPGA code using only the NI-RIO driver without anyhardware. Is it possible ?

This is what I understood from the article talking about R-series DAQs. The article link is : http://zone.ni.com/devzone/cda/tut/p/id/2883#toc7 and the part where I got my information from is the following part in red.

 


How do I decide which FPGA is right for my application?


Unfortunately, it is difficult to determine whether an application or program will require a larger or smaller FPGA. The LabVIEW FPGA Module and NI-RIO driver give you the ability to compile block diagrams without having any hardware at all, so the best way to see how many resources you need is to try it out.


You can use the following as a general guideline when deciding which FPGA works for your application: For an application that performs basic timing, triggering, and synchronization on the FPGA, you can use a smaller FPGA. If the application includes timing, triggering, and synchronization along with additional signal processing on the FPGA (control, digital filtering, complex analog triggering), you need a larger FPGA that has more resources to implement those operations.


 

 

Thanks,

  Walid F.

0 Kudos
Message 1 of 7
(6,757 Views)

Hi Walid,

 

After reading your post, I am not sure if you want to know how to compile an FPGA application without the hardware or debug FPGA applications by simulating I/O. I will try to answer both questions.

- If you are interested in compiling your FPGA application to determine your resources, then you just need to right-click on the VI in the Project Explorer window and click Compile.

- If you are interested in running your FPGA application on the development computer with simulated I/O for debugging purposes, then right-click an FPGA target in the Project Explorer window and select Properties from the shortcut menu to display the FPGA Target Properties dialog box. Select Debugging from the Category list to display the Debugging Properties Page. Over here you can either use random data for FPGA I/O Read or use a custom VI for FPGA I/O or execute VI on the development computer with Real I/O.

 

If you have any questions, please post back.

Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 7
(6,741 Views)
maybe the first part to the answer is, when you add a target or device to your project, select "new target or device" (does not require hardware to be present) and choose the desired board you want to evaluate.
Stu
Message 3 of 7
(6,734 Views)

Hai,

Adding to the previous responses....there is an "Emulator" option with LabVIEW FPGA using which you can simulate the FPGA code without hardware.  This emulator mode the i/o nodes throw random data that can be used to validate the functionality of the code.

 

Select the FPGA Target>>Properties>>Emulator>> ON/OFF  When the emulator mode is ON FPGA vi can be executed to validate its functionality.

 

Hope this helps.

With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
Message 4 of 7
(6,718 Views)

KUDOS to all of you.

 

ok, here is what I understood

 

1. I can make an FPGA VI, in which I can write my code, complile it and I'll be able to simulate it, and the simulation can be done in relation to one of the NI-RIO devices for example NI-single RIO board with a specific version, so now I'll just need the NI-RIO driver and Labview FPGA toolkit installed to go on.

 

2. Since the simulation will need data from what was so called a testbench in HDL languages, we can either use the debugging option or the emulator option to simulate the inputs on the analog or the digital pins.

 

If there is something wrong with what I understood, please tell me.

My questions were based on thereotical stuff that I read before going through the practical work as I wanted to know if Labview FPGA will be right for me or not. 

 

Now, I have 2 other questions:

a. Can someone send any guide (maybe a step-by-step guide) which can show me how to add the simulated device and write my first FPGA code on it ?

b. Can we simulate also the Spartan-3E that is supported by NI by just installing the driver ?

 

Thanks,

  Walid

0 Kudos
Message 5 of 7
(6,698 Views)

wfarid wrote:

KUDOS to all of you.

 

ok, here is what I understood

 

1. I can make an FPGA VI, in which I can write my code, complile it and I'll be able to simulate it, and the simulation can be done in relation to one of the NI-RIO devices for example NI-single RIO board with a specific version, so now I'll just need the NI-RIO driver and Labview FPGA toolkit installed to go on.

 

2. Since the simulation will need data from what was so called a testbench in HDL languages, we can either use the debugging option or the emulator option to simulate the inputs on the analog or the digital pins.

 

If there is something wrong with what I understood, please tell me.

My questions were based on thereotical stuff that I read before going through the practical work as I wanted to know if Labview FPGA will be right for me or not. 

 

Now, I have 2 other questions:

a. Can someone send any guide (maybe a step-by-step guide) which can show me how to add the simulated device and write my first FPGA code on it ?

b. Can we simulate also the Spartan-3E that is supported by NI by just installing the driver ?

 

Thanks,

  Walid


 

a) the instructions are to create a project, add the desired targets, write the code and compile.  setup emulator (not trivial) and test.  I test with LabVIEW under windows and use the conditional compilation for hardware I/O.  You can compile the examples shipped with LabVIEW FPGA without hardware to get a feel for the project, I/O, DMA, etc for various VIs.

 

b) yes the spartan-3e works the same way.  the spartan will not show up under MAX so don't let that throw you.
Stu
0 Kudos
Message 6 of 7
(6,694 Views)

Thanks Stu.

 

Well, I'll just add some links which anyone with my same problem can go through to start with the Labview FPGA coding, compiling and simulation:

 

Labview FPGA Training Module : http://zone.ni.com/devzone/cda/tut/p/id/3555#toc0

Labview FPGA Training Module for Spartan-3E XUP hardware : http://zone.ni.com/devzone/cda/tut/p/id/6848

 

These links will help to understand the whole picture.

 

Required:

 1- Labview

 2- Labview FPGA

 3- NI-RIO drivers (and/or) Spartan-3E driver from NI

 

-- Walid F.

Message 7 of 7
(6,653 Views)