Write the VERILOG code for an arithmetic/logic unit (ALU) following , and can be tested in...

60.1K

Verified Solution

Question

Electrical Engineering

Write the VERILOG code for an arithmetic/logic unit (ALU)following , and can be tested in on nexys 4 board

This is to be implement on : ISE Design Suite - Xilinx

/* ALU Arithmetic and Logic Operations----------------------------------------------------------------------|ALU_Sel|  ALU Operation----------------------------------------------------------------------| 0000 |  ALU_Out = A + B;----------------------------------------------------------------------| 0001 |  ALU_Out = A - B;----------------------------------------------------------------------| 0010 |  ALU_Out = A * B;----------------------------------------------------------------------| 0011 |  ALU_Out = A / B;----------------------------------------------------------------------| 0100 |  ALU_Out = A << 1;----------------------------------------------------------------------| 0101 |  ALU_Out = A >> 1;----------------------------------------------------------------------| 0110 |  ALU_Out = A rotated left by 1;----------------------------------------------------------------------| 0111 |  ALU_Out = A rotated right by 1;----------------------------------------------------------------------| 1000 |  ALU_Out = A and B;----------------------------------------------------------------------| 1001 |  ALU_Out = A or B;----------------------------------------------------------------------| 1010 |  ALU_Out = A xor B;----------------------------------------------------------------------| 1011 |  ALU_Out = A nor B;----------------------------------------------------------------------| 1100 |  ALU_Out = A nand B;----------------------------------------------------------------------| 1101 |  ALU_Out = A xnor B;----------------------------------------------------------------------| 1110 |  ALU_Out = 1 if A>B else 0;----------------------------------------------------------------------| 1111 |  ALU_Out = 1 if A=B else 0;

Answer & Explanation Solved by verified expert
4.2 Ratings (542 Votes)
Thus we have listed the    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students