11-29-2017 02:06 AM
The fpga can't use the Quotient & Remainder that's right? , how can i do the same operation without Quotient & Remainder.
And another question, the fpga doesn't support the tome stamp type of data???
11-29-2017 02:46 AM - edited 11-29-2017 02:48 AM
Hi Cristina,
how can i do the same operation without Quotient & Remainder.
Depends on the numbers you want to have quotient&remainder with!
With powers of 2 you can use simple boolean operations (AND/OR) and shift operations.
With "random" numbers you can do, what you have learned back in primary school…
fpga doesn't support the tome stamp type
What do you need timestamps for on FPGA?
Hint: the FPGAS can count clock cycles very easily…
11-29-2017 02:54 AM
I want to do that u have learned back in primary schhol as you say, but, with the divisoin block i obtain a decimal number, for example if i divide 5 betwwen 3 the result is 1,5 and i want that the result will be 1 for then calculate the remaind.
How can i count the cycle in fpga?
Sorry, i'm new in labview
11-29-2017 02:59 AM
I want implamentate this, i want know the time that the program has been running, because i need this time (in second) to multiply it by deg/s and obtain the deg
11-29-2017 03:08 AM - edited 11-29-2017 03:12 AM
Hi Cristina,
if i divide 5 betwwen 3 the result is 1,5
How do you get 1.5 as result of 5/3???
You seem to use different math than me…
i want that the result will be 1 for then calculate the remaind.
Using the algorithm I linked to before will give you this answer!
while N ≥ D do N := N − D end return N
All you need to do is to count the number of subtract operations to get the quotient…
How can i count the cycle in fpga? Sorry, i'm new in labview
Then you should take the beginner courses and all those AppNotes related to LabVIEW RealTime and LabVIEW FPGA module!
Counting cycles is easy: use a loop (SCTL) and count it's iterations…
11-29-2017 03:13 AM
Sorry, 1,66666 ....
11-29-2017 06:04 AM
As we stated in your other thread, the Quotient & Remainder is supported on the FPGA. However, it uses multiple cycles to complete and it therefore cannot be put into a Single Cycle Timed Loop (SCTL).
Now as far as counting time, you can simply use a shift register to keep a counter. If on a SCTL, then you know what the loop rate is. You can do simple math from there.