LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Read multiple memory items simultaneously in LabView FPGA

Hi everyone,

 

I have created four memory items and I want to simultaneously read these four items using Read Memory Method in LabView FPGA. I am wondering whether this can be achieved, or there will be jitter/latency? I know reading the same memory item simultaneously can have jitter, so I created four memory items, hoping it will solve this issue.

 

I have attached a picture to illustrate what I am trying to do.

Capture.PNG

Thank you!

0 Kudos
Message 1 of 20
(2,710 Views)

I wouldn't expect jitter.

 

You can turn off the synchronization, as they are separate memory items anyway.

Message 2 of 20
(2,667 Views)

Hi wiebe@CARYA,

 

Thank you very much for your reply, this clears up my understanding.

 

However, what do you mean by turning off the synchronization?

0 Kudos
Message 3 of 20
(2,652 Views)

@JustinZZJ wrote:

However, what do you mean by turning off the synchronization?


I don't have an FPGA or FGPA toolkit installed atm, but IIRC the memory nodes have synchronization options. These can be used to read and write in parallel loops, without causing race conditions. If these options are on, they will cause jitter. The node in one loop will have to wait for the other loop.

 

If you turn the synchronization off, there won't be jitter, but the nodes might not function properly. However, if you make separate memories, this will solve the synchronization in a different way.

0 Kudos
Message 4 of 20
(2,628 Views)

Is the code running in a single-cycle timed loop?

 

If not, everything (as I understand it) is executed fundamentally differently. I don't know if a standard while loop runs multiple process really parallel, or if it serialises them.

 

Edit: Should be OK, I refer to the following document

https://zone.ni.com/reference/en-XX/help/371599P-01/lvfpgaconcepts/using_sctl_optimize_fpga/

0 Kudos
Message 5 of 20
(2,622 Views)

wiebe@CARYA wrote:


I don't have an FPGA or FGPA toolkit installed atm, but IIRC the memory nodes have synchronization options. These can be used to read and write in parallel loops, without causing race conditions. If these options are on, they will cause jitter. The node in one loop will have to wait for the other loop.

 

If you turn the synchronization off, there won't be jitter, but the nodes might not function properly. However, if you make separate memories, this will solve the synchronization in a different way.


I think you mean arbitration. It will only be used if required typically.

0 Kudos
Message 6 of 20
(2,621 Views)

@Intaris wrote:

wiebe@CARYA wrote:


I don't have an FPGA or FGPA toolkit installed atm, but IIRC the memory nodes have synchronization options. These can be used to read and write in parallel loops, without causing race conditions. If these options are on, they will cause jitter. The node in one loop will have to wait for the other loop.

 

If you turn the synchronization off, there won't be jitter, but the nodes might not function properly. However, if you make separate memories, this will solve the synchronization in a different way.


I think you mean arbitration. It will only be used if required typically.


Ah, yes, arbitration.

 

So I thought OP was afraid that turning this on could cause jitter. Although it shouldn't (unless used), if all memory is split up, (s)he might turn it off.

 

0 Kudos
Message 7 of 20
(2,609 Views)

wiebe@CARYA wrote:

@Intaris wrote:

wiebe@CARYA wrote:


I don't have an FPGA or FGPA toolkit installed atm, but IIRC the memory nodes have synchronization options. These can be used to read and write in parallel loops, without causing race conditions. If these options are on, they will cause jitter. The node in one loop will have to wait for the other loop.

 

If you turn the synchronization off, there won't be jitter, but the nodes might not function properly. However, if you make separate memories, this will solve the synchronization in a different way.


I think you mean arbitration. It will only be used if required typically.


Ah, yes, arbitration.

 

So I thought OP was afraid that turning this on could cause jitter. Although it shouldn't (unless used), if all memory is split up, (s)he might turn it off.

 


A memory that is only read is usually not very useful. 😀 So there will almost certainly be some write operation somewhere else and then arbitration logic will be added no matter what. And then it depends where this is placed. Inside a single cycle loop, arbitration will be such that reading the items will always happen within a single clock cycle but there will be a configurable read latency of at least 1. This means the actual value from the memory location will only be available in the next (or later iteration if the read latency is configured higher than 1) and you have to account for that delay. In a normal loop the Read Node will internally arbitrate until the value can be returned and that will certainly cause jitter.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 20
(2,597 Views)

@rolfk wrote:

wiebe@CARYA wrote:

@Intaris wrote:

wiebe@CARYA wrote:


I don't have an FPGA or FGPA toolkit installed atm, but IIRC the memory nodes have synchronization options. These can be used to read and write in parallel loops, without causing race conditions. If these options are on, they will cause jitter. The node in one loop will have to wait for the other loop.

 

If you turn the synchronization off, there won't be jitter, but the nodes might not function properly. However, if you make separate memories, this will solve the synchronization in a different way.


I think you mean arbitration. It will only be used if required typically.


Ah, yes, arbitration.

 

So I thought OP was afraid that turning this on could cause jitter. Although it shouldn't (unless used), if all memory is split up, (s)he might turn it off.

 


A memory that is only read is usually not very useful. 😀 So there will almost certainly be some write operation somewhere else and then arbitration logic will be added no matter what. And then it depends where this is placed. Inside a single cycle loop, arbitration will be such that reading the items will always happen within a single clock cycle but there will be a configurable read latency of at least 1. This means the actual value from the memory location will only be available in the next (or later iteration if the read latency is configured higher than 1) and you have to account for that delay. In a normal loop the Read Node will internally arbitrate until the value can be returned and that will certainly cause jitter.


But you can have the write loop execute before the read loop.

 

That would also prevent conflicts, and the need for arbitration.

 

It seems we need to know more details...

0 Kudos
Message 9 of 20
(2,593 Views)

wiebe@CARYA wrote:

 

But you can have the write loop execute before the read loop.

 

That would also prevent conflicts, and the need for arbitration.


You can but that would be mostly like a constant defined at program start. Not impossible and may be useful for some designs, but most FPGA programs I have created so far are typically a number of parallel (single-cycle) loops that do various things and transfer data between them through memory, registers, FIFOs and/or handshakes. And then the FP items which work as registers between the RT application and the FPGA. Everything but the host FIFOs and sometimes LUT tables is usually read and written to from different loops.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 10 of 20
(2,589 Views)