LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fpga registers and arbitration

Solved!
Go to solution

Hi

 

I wonder if someone could clarify something with regards to Registers using a Custom Control data type, and Arbitration.

 

I am trying to create a real-time clock that is continuously updated in one FPGA continuous loop, that is then read in another FPGA continuous loop. There is more details to this but are irrelevant to this question.

 

To represent the clock I decided to use a Register, which would store days, hours, minutes, seconds, milliseconds, microseconds fields as a custom control data type (a cluster). The problem is I do not trust the time values I am getting out.

 

One thing I am not clear about is the role of Register Arbitration.

 

Does arbitration of a custom control register prevent writing and reading occurring at the same time for all fields of the multi-field data type, or not? That is, if writing of a new time value occurs at the same time as reading, is the read or write blocked until update of ALL fields of the custom control register has completed? Or is the write/read piece-meal on a field-by-field basis? Is it possible for me to get a mix of an old and new time field values when relying on Register Arbitration to prevent the race condition?

 

Thanks for any help you can give. I have tried reading the help-file but there is a "Note" in it about custom-control typed Registers which utterly confuses me.

 

I am using LabVIEW 2012.

 

 

0 Kudos
Message 1 of 3
(2,809 Views)
Solution
Accepted by topic author skol45uk

If you are storing the value in the control as a cluster, then the entire block of data is read or written atomically. The arbitration only applies if you have multiple readers or multiple writers to the same register. 

0 Kudos
Message 2 of 3
(2,796 Views)

Thanks for that answer. Just what I needed!

0 Kudos
Message 3 of 3
(2,783 Views)