Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
17253 Discussions

How to increment the Altera RAM data without reading data from the RAM

Altera_Forum
Honored Contributor II
1,760 Views

Hi All, 

I am using 2PORT RAM megafunction in my module. I want to write some data into a particular RAM address and then I want to increment that data by 1. One way, I know, is that I could read data from that location, add 1 to the read data and write it again into that RAM address. But that would be little bit tedious. All I want to know is whether it is possible to increment the data at that RAM address without reading it.Thanks. 

 

 

Ashish Devre
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
770 Views

Obviously this is not possible.

0 Kudos
Altera_Forum
Honored Contributor II
770 Views

Needed to know that. Thanks a lot.

0 Kudos
Altera_Forum
Honored Contributor II
770 Views

A read-modify-write operation on a RAM cell can be implemented by external logic, but will always need two clock cycles.

0 Kudos
Altera_Forum
Honored Contributor II
770 Views

Did the same. Read the data, incremented it and wrote it again. 

You are right. Additional clock with double of original clock frequency would be needed. But in my application there wasn't any need of that, as I was writing on the alternate rising edges of my clock. 

Though it would be easier, if that increment-without-read facility had been there. 

 

Is there any other RAM available with this kind of feature? Just curious
0 Kudos
Reply