05-09-2018 01:18 AM
Hi vicky,
how we decide that which one is receiving request first out of five devices.
You read your 6 digital inputs as fast as the FPGA or the module allows, I often also read the full port (group of 8, 16 or 32 bits). Whenever one of those bits is toggled (hint: XOR function!) you know there is a "request" and you can handle this request by setting some other digital outputs…
Can we have to use case statements for all this in FPGA VI
Yes, sure.
or some other way ??
You can use many other functions and structures in a FPGA VI, even FIFOs (aka queues)…
05-09-2018 03:51 AM
yes by using XOR gate we will find there is request but how we determine which request we receive first.
05-09-2018 04:15 AM
Hi vicky,
by default the FPGA executes loops at 40MHz - or 25ns between iterations. Do you really expect more than one request in this short interval?
I assume there will be only one request per 25ns interval so you know which request occured in which iteration of your receiver loop…
05-09-2018 04:17 AM
@vicky2889 wrote:
yes by using XOR gate we will find there is request but how we determine which request we receive first.
Set a flag, enqueuer an element, execute a case, output a value, store the timestamp, trigger an SRQ... Thousand ways to do it.
Recommending one of them is not easy, as what makes the right choice it's highly circumstantial. E.g. it depends... On an FPGA everything usually needs to fit like a glove. Each choice made needs to fit other parts.
I am pretty sure arbitration is not required to solve the problem.
05-09-2018 04:21 AM
yes you are right. but then also how we determine which device request we receive first.
Can you please give me a small example by taking two or three inputs and then how we determine which one we receive first?
05-09-2018 04:23 AM
Can you please give some example by taking two or three input and then how we determine which one we receive first ?
like by taking case statement
05-09-2018 04:26 AM - edited 05-09-2018 04:29 AM
Hi vicky,
using standard LabVIEW it looks like this:
In the FPGA you may do the ArraySearch "manually" using your own routine…
how we determine which device request we receive first.
That "first" request is the one, where the boolean value changed in an earlier iteration then the "second" one…
You need to take into account the loop iterations between the comparison of your digital inputs!
05-09-2018 04:44 AM
05-09-2018 10:00 PM
can you please tell where i can find the highlighted part in the picture attached
05-10-2018 01:42 PM
Hi vicky,
both our suggestions are actually snippets! You can download those images and drag&drop them into the block diagram of a VI to get their contents…
You are looking for a feedback node. You really should take the beginner courses!