正在加载图片...
MegaWizard PlugnALTSYNCRAM [of Cancal <Bax Ned Frith Figure 5.Specifying a memory initialization file(MIF). 2.Write a VHDL file that instantiates your dual-port memory.To see the RAM contents,add to your design a the 50 MHz clock CLOCK 50 on the DE2 board and use KEYo as a reset input For the write address and m黑8品cs 3.Test your circuit an ents of the memory match your nindependerlyreby using the toggl wih PartVI The dual-port memory created in Part Vallows simultaneous read and write operations tocur,because it has twoaddress ports.In this part of the exercise you should reatea similar capability,but usinga single-port RAM Il need to use multiplexing to select either a read or write address at any spec Part On Page 7.shown in Figure 6.specify as you did in Part y but also make the setting Allow In-System Memory Content Editor to capture and update content independently of the option allows you to use a feature of the Q rtus I yster the In-Sys for the Figure 7 we gave the RAM module the name 32x8.Complete the final steps in the Wizard. >Figure 5. Specifying a memory initialization file (MIF). 2. Write a VHDL file that instantiates your dual-port memory. To see the RAM contents, add to your design a capability to display the content of each byte (in hexadecimal format) on the 7-segment displays HEX1 and HEX0. Scroll through the memory locations by displaying each byte for about one second. As each byte is being displayed, show its address (in hex format) on the 7-segment displays HEX3 and HEX2. Use the 50 MHz clock, CLOCK 50, on the DE2 board, and use KEY 0 as a reset input. For the write address and corresponding data use the same switches, LEDs, and 7-segment displays as in the previous parts of this exercise. Make sure that you properly synchronize the toggle switch inputs to the 50 MHz clock signal. 3. Test your circuit and verify that the initial contents of the memory match your ramlpm.mif file. Make sure that you can independently write data to any address by using the toggle switches. Part VI The dual-port memory created in Part V allows simultaneous read and write operations to occur, because it has two address ports. In this part of the exercise you should create a similar capability, but using a single-port RAM. Since there will be only one address port you will need to use multiplexing to select either a read or write address at any specific time. Perform the following steps. 1. Create a new Quartus II project for your circuit, and use the MegaWizard Plug-in Manager to again create a single-port version of the altsyncram LPM. For Pages 1 to 6 of the Wizard use the same settings as in Part I. On Page 7, shown in Figure 6, specify the ramlpm.mif file as you did in Part V, but also make the setting Allow In-System Memory Content Editor to capture and update content independently of the system clock. This option allows you to use a feature of the Quartus II CAD system called the In-System Memory Content Editor to view and manipulate the contents of the created RAM module. When using this tool you can optionally specify a four-character ‘Instance ID’ that serves as a name for the memory; in Figure 7 we gave the RAM module the name 32x8. Complete the final steps in the Wizard. 7
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有