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

[VHDL]How to read data stocked in 1 ROM (created with Quartus)

Altera_Forum
Honored Contributor II
1,413 Views

Hello, 

 

I work at a little program with VHDL. In my program, i created a ROM with Quartus "MegaWizard Plug-in Manager" and which is already filled with a .mif file. And then in my VHDL program, I'd like to have access to this data and use them for my calculation. 

 

My component : 

 

component rom_qpsk 

PORT 

address : IN STD_LOGIC_VECTOR (4 DOWNTO 0); 

clock : IN STD_LOGIC ; 

q : OUT STD_LOGIC_VECTOR (15 DOWNTO 0) 

); 

end component; 

 

For example, if i want to know the value stocked in address "00000", how can i do ? 

 

Thank you very much for your responses !!!! :)
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
468 Views

you need to provide a clock to your clock port, provide the address "00000" to the address port, and check the q output after a number clock cycles from when you provide the desired address. the number of clock cycles is equal to your latency, or pipelining of the ROM

0 Kudos
Reply