reading data from register and writing to ram

Mar 05, 2005 2 Replies

I should read data from a 32bit register (where another process write datas into) and every time it changes, copy data into ram.



In what way may I understand when register changes?



If I create a process which is clock sensitive, it writes in ram lots of times?



Marco


The only way to find out whether data has changed, is to compare the old data with the new data. Write data into a 2-deep, 32-bit parallel shift register, and perform identity comparison betweenthe two data vlues. When different, write the new content into your RAM. You might also write everything into the RAM all the time, but increment the RAM address only when you detected new data with the above mentioned comparator.

In Virtex BlockRAM, the write port has a read output that-as a configuration option- shows the content before the writing. That eliminates the need for one 32-bit register, but you always need the comparator.

You must also watch out for the usual problems when you cross clock domains.

Peter Alfke, Xilinx Applications

Many Thanks. I'll configure the block ram with data out before writing.

What problems about clock are you mentioning?

Delay propagation? Or others?

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required