Question

3. Write a complete VHDL program that finds maximum of three unsigned numbers using concurrent statements...

3. Write a complete VHDL program that finds maximum of three unsigned numbers using concurrent statements only. Assume these numbers are 8 bit wide. How does your program change if these numbers are signed

Homework Answers

Answer #1
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use IEEE.math_real.ALL;

entity findmax is
  port (
    clk : in std_logic;
    clr : in std_logic;
    din : in real;
    max : out real;
  );
end findmax ;

architecture Behavioral of findmax is
signal m : real := 0.0;
begin
  process begin
    wait until rising_edge(clk);
      if clr='1' then
        m <= 0.0;
      elsif din>m then
        m <= din;
      end if;    
    end if;
  end process;
  
  max <= m;
end Behavioral;
Let me know if you have any doubts or if you need anything to change. 

If you are satisfied with the solution, please leave a +ve feedback : ) Let me know for any help with any other questions.

Thank You!
===========================================================================
Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a complete VHDL program that finds maximum of three unsigned numbers using concurrent statements only....
Write a complete VHDL program that finds maximum of three unsigned numbers using concurrent statements only. Assume these numbers are 8 bit wide. How does your program change if these numbers are signed?
Q5) Design a magnitude comparator that takes two three bit unsigned numbers, A = (a2a1a0) and...
Q5) Design a magnitude comparator that takes two three bit unsigned numbers, A = (a2a1a0) and B = (b2b1b0), and outputs LE = 1 if A<=B, otherwise LE = 0. Give the Boolean expression for the circuit output g. Draw the circuit using only 3 4x1 MUXs.(16pt)
Write a program that finds and prints all of the prime numbers between 3 and X...
Write a program that finds and prints all of the prime numbers between 3 and X (X is input from the user). A prime number is a number such that 1 and itself are the only numbers that evenly divide it (for example, 3, 5, 7, 11, 13, 17, …). One way to solve this problem is to use a doubly nested loop (a loop inside another loop). The outer loop can iterate from 3 to N while the inner...
1.Write a c++ program to find Maximum out of two numbers using friend function. Here one...
1.Write a c++ program to find Maximum out of two numbers using friend function. Here one member is of one class and second belongs to another class. 2.Write a c++ program to swap the values of private data members of classes names classOne and classTwo using friend keyword.
Write a Java program named BinaryConversion that will convert base 2 numbers to base 10 numbers....
Write a Java program named BinaryConversion that will convert base 2 numbers to base 10 numbers. The data for this program will be entered from the keyboard using JOptionPane one 16-bit binary number at a time. Note that each base 2 number is actually read in as a String. The program should continue until a 16-bit base 2 number consisting of all 0’s is entered. Once the 16-bit number has been entered your program should make sure that the input...
Write a NASM program that does the following: 1) Asks the user to enter three numbers...
Write a NASM program that does the following: 1) Asks the user to enter three numbers (each is a byte) A,B, and C 2) Adds up the numbers and stores the sum in variable D 3) Outputs the sum
Using a while loop, write a program that reads 10 integer numbers. The program shall count...
Using a while loop, write a program that reads 10 integer numbers. The program shall count how many of them are multiples of 2, how many are multiples of 3, and how many are NOT multiples of either 2 or 3. The output should be similar to the one shown below. c++ language
PYTHON 3 Write a program that prints the count of all prime numbers between A and...
PYTHON 3 Write a program that prints the count of all prime numbers between A and B (inclusive), where A and B are defined as follows: A = 21212 B = A + 5000 Just a recap on prime numbers: A prime number is any number, greater or equal to 2, that is divisible ONLY by 1 and itself. Here are the first 10 prime numbers: 2, 5, 7, 11, 13, 17, 19, 23, and 29. Rules: You should first...
Write a program using Matlab that asks the user for their last three grades and final...
Write a program using Matlab that asks the user for their last three grades and final grade and gives them their overall final grade. The three Midterms are worth 70% and Final is worth 30%. The program will display their Final grade with a grade letter corresponding to it. Run your program and verify that it operates correctly (hint: you might need to use “If, else statements”)
Write a python program that does the following: Prompts the user for three numbers in one...
Write a python program that does the following: Prompts the user for three numbers in one request. Be sure to specify the “delimiter” by which a user enters those three numbers. Divides the first number by the second number and add that result to the third number. Prints output that shows in one line the formula applied and the result of the calculation. Validate input by: •    Checking the user entered 3 values •    Appropriately checking for the following errors:...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT