Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
20705 Discussions

How to read onchip dual port memory .?

Altera_Forum
Honored Contributor II
1,048 Views

Hi,  

 

I am doing this for a class project. 

 

I have implemented a processor on de4, where I have used onchip memory for data and instruction. I can initialise the memory using .mif files, but after the execution, I need to verify if the output which will be stored in again in the internal data memory is correct. But my memory is dual port memory so I am not able to use the Quartus in system memory content editor. Basically I am running some benchmarks, like quick sort, where I need to see if the numbers are in ascending order after execution,  

 

One idea I thought of is that, I can flag a signal which checks if the memory is in ascending order. but I am not sure about the implementation .?? Could any one suggest any solutions .?? 

 

Thanks, 

Sandesh
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
346 Views

do you know SIGNALTAPII? 

 

if you haven't tried it. 

this might help you. 

http://www.akiron.com/fpga/baseprojectinverilogvhdl.zip 

 

I hope so. 

bye.
0 Kudos
Altera_Forum
Honored Contributor II
346 Views

It is probably easiest to copy the data to a second memory area when it has all finished. 

Qsys will replicate memory blocks in order to support 1 writer and multiple readers - but It probably isn't trivial to do that for TCM. 

Alternatively use separate memory blocks for the code and data, then the 2nd port of the data memory is free. 

In that case you don't really want any data accesses to the 'code' memory (link it up anyway without a data cache) so you'll need to ensure the linker script puts all the readonly data with the read-write data. The Altera build of gcc4 also embeds the jump tables for switch statements directly in the code segment - use gcc3.
0 Kudos
Reply