Quartus-II Exercise-1

Quartus-II Exercise-1

<p>Quartus-II Lab-4 1. Choose File New Project Wizard. 2. Give the name of the project myadder16. 3. choose Tools  Megawizard plugin Manager, Choose the first option “Create a new custom megafunction variation”. 4. Select arithmetic category and choose LPM_ADD_SUB. You may ignore the device family. However, select VHDL file generation and name the output file as addonly.vhd. 5. On the next several screens, make it an “addition only” module, set the data width to 16 bits, choose both inputs to be variable, include carry input and output connections and do not pipeline the function. 6. Open the file addonly.vhd as generated by the Megawizard tool. Observe that the name of the entity is correct and all the inputs and outputs are of correct width. 7. Type the code given below into a VHDL file called myadde16.vhd. This will be the top entity as already stated by you while creating the project. Make sure this file is part of the project. library ieee; use ieee.std_logic_1164.all;</p><p> entity myadder16 is port (carryin:in std_logic; x,y:in std_logic_vector(15 downto 0); s:out std_logic_vector(15 downto 0); carryout:out std_logic); end myadder16;</p><p> architecture struct of myadder16 is component addonly PORT ( dataa : IN STD_LOGIC_VECTOR (15 DOWNTO 0); datab : IN STD_LOGIC_VECTOR (15 DOWNTO 0); cin : IN STD_LOGIC ; result : OUT STD_LOGIC_VECTOR (15 DOWNTO 0); cout : OUT STD_LOGIC ); END component;</p><p> begin adder_circuit: addonly port map (cin=>carryin, dataa=>x, datab=>y, result=>s, cout=>carryout); end struct;</p><p>8. Compile the project and simulate it by editing the waveforms. Make sure that you select bundles of inputs and outputs instead of individual lines. Open the simulator tool and choose functional simulation. Write the inputs as follows: FF00 + 00FF, 100A+ 0001, F0FF + 00FF and verify that the outputs are FFFF, 100B, F1FE.</p>

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    1 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us