LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how do i read from block memory in case structure to another case in that structure on the next iteration of a SCTL

I am using at PXIe-7961/NI-6585.  I am uisng a case structure to implement a state machine.  I am trying to read data from block memory in one case and us that read data in another case on the next clock tick.  I have the output of the block memory wired to a feed back loop outside the case structure (see attached). When I try to complie I get an error Internally pipelijned objects not connected to a feedback node.  

The reason i am not doing the read and manimpulate in a single pipelined case is that i am reading the data out of block memory and into a fifo.  I don't want the first read of nothing to be in the fifo.  any thoughts would be great. 

0 Kudos
Message 1 of 5
(3,362 Views)

@bcat wrote:

The reason i am not doing the read and manimpulate in a single pipelined case is that i am reading the data out of block memory and into a fifo.  I don't want the first read of nothing to be in the fifo.  any thoughts would be great. 


I would just use another shift register/feedback node to conditionally write to the FIFO.  The FBN should be initialized to FALSE and always have TRUE being written to it.  This way, the value coming out will be FALSE on the first iteration, but TRUE for all others.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 5
(3,334 Views)

BRAM requires the data output to be directly connected to feedback nodes to function properly. This is an inherent requirement of the phsyical component that is instantiated when a memory item that uses BRAM is created. Having the feedback nodes outside of the case structure create a construct that prevents the physical component from accessing the feedback nodes in a way that preserves data integrity, thus the compiler throws an error stating it has not been connected to the requiste feedback nodes.

 

Capture.PNG  

0 Kudos
Message 3 of 5
(3,327 Views)

That works well for the beginning where I don't want to load the defalt value into the fifo.  What would you do about the end case where there is on remaining element to load into the fifo but I don't want try and read past the end of my memory?

0 Kudos
Message 4 of 5
(3,281 Views)

Hey,

 

When you get to the last address you want to read, just read it 2 more times and have logic to throw away the next two values that come out of the feedback node

Britton C.
Senior Software Engineer
National Instruments
0 Kudos
Message 5 of 5
(3,261 Views)