Question

# Implement the function R = ab'h' + bch' + eg'h + fgh using *only* 2-to-1 multiplexers....

Implement the function R = ab'h' + bch' + eg'h + fgh using *only* 2-to-1 multiplexers. Use the 2-to-1 multiplexer VHDL description from Problem 1 as a component to write VHDL code for the circuit design of function R. Perform CAD simulation of your design. (60)

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity mux_2to1 is
Port ( SEL : in STD_LOGIC;
I0 : in STD_LOGIC;
I1 : in STD_LOGIC;
Y : out std_logic);
end mux_2to1;

architecture Behavioral of mux_2to1 is
begin
Y <= I1 when (SEL = '1') else I0;
end Behavioral;

--------------------------------------

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity combinational_r is
Port ( a,b,c,e,f,g,h : in STD_LOGIC;
R : out std_logic);
end combinational_r;

architecture Behavioral of combinational_r is
component mux_2to1
Port ( SEL : in STD_LOGIC;
I0 : in STD_LOGIC;
I1 : in STD_LOGIC;
Y : out std_logic);
end component;
signal nh,nbnh,cnh,ngh,gh,anbnh,bcnh,engh,fgh,s1,s2:std_logic;
begin
mux0: mux_2to1 port map(h,'1','0',nh);--h'
mux1: mux_2to1 port map(b,nh,'0',nbnh);--b'h'
mux2: mux_2to1 port map(h,c,'0',cnh);--ch'
mux3: mux_2to1 port map(g,h,'0',ngh);--g'h
mux4: mux_2to1 port map(g,'0',h,gh);--gh
mux5: mux_2to1 port map(a,'0',nbnh,anbnh);
mux6: mux_2to1 port map(b,'0',cnh,bcnh);
mux7: mux_2to1 port map(e,'0',ngh,engh);
mux8: mux_2to1 port map(f,'0',gh,fgh);
mux9: mux_2to1 port map(anbnh,bcnh,'1',s1);--ab'h'+bch'
mux10: mux_2to1 port map(engh,fgh,'1',s2);--eg'h'+fgh
mux11: mux_2to1 port map(s1,s2,'1',R);--R=ab'h'+bch'+eg'h'+fgh

end Behavioral;

-------------------------

--TESTBENCH:

library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
use ieee.numeric_std.all;

entity combinational_r_test is
end combinational_r_test;

architecture Behavioral of combinational_r_test is
component combinational_r
Port ( a,b,c,e,f,g,h : in STD_LOGIC;
R : out std_logic);
end component;
signal aa:std_logic_vector(6 downto 0);
signal RR:std_logic;

begin
uut: combinational_r port map(a=>aa(6),b=>aa(5),c=>aa(4),e=>aa(3),f=>aa(2),g=>aa(1),h=>aa(0),R=>RR);
process
begin
for i in 0 to 127 loop

aa<=std_logic_vector(to_unsigned(i,7));
wait for 10ns;
end loop;

wait;
end process;
end Behavioral;

-------------------

RTL simulation:

aa6=a,aa5=b,aa4=c,aa3=e,aa2=f,aa1=g,aa0=h,RR=R

#### Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
• ### ECE 275 - DIGITAL DESIGN Question 1: (@) Write VHDL code for a 2-to-1 multiplexer. -...

ECE 275 - DIGITAL DESIGN Question 1: (@) Write VHDL code for a 2-to-1 multiplexer. - (6) Implement - using only the Sunction R= ab h + bch' + eg h + 8 h 2-to-1 multiplexers. Use the 2-to-1 multiplexer VHDL description as a component to write VHDL code for the of Sunction R, from Problem 1 circuit design

• ### Use only 2-to-1 multiplexers to implement the circuit for the following function: F(A, B, C) =...

Use only 2-to-1 multiplexers to implement the circuit for the following function: F(A, B, C) = Pi M (1, 2, 4, 5) Assume the inverse of each input variable is available, (i.e., you can directly use the inverse of each input variable A, B, or C, in your answer.) Repeat P7, but this time using only one 4-to-1 multiplexer.

• ### 2. Implement the function F in textbook problem 4.10 using *only* 2-to-1 multiplexers. 4.10

2. Implement the function F in textbook problem 4.10 using *only* 2-to-1 multiplexers. 4.10

• ### Represent the following logic function using only 2:1 multiplexers. Use as few multiplexers as po...

Represent the following logic function using only 2:1 multiplexers. Use as few multiplexers as possible. All multiplexer data inputs must be coming from another mux or be a logic 1 or a logic zero. f = a'bc + ad + b'c + a'd + e

• ### answer as u can make it up Lab #7-8 Objectives: 1. To understand Multiplexers and De-multiplexers....

answer as u can make it up Lab #7-8 Objectives: 1. To understand Multiplexers and De-multiplexers. 2. To implement a basic multiplexer using AND, OR, and NOT, gates. 3. To verify the operation of Integrated Mulitplexers. Equipment: Digital Multi-meter, Breadboard, Power Supply, Function Generator, Oscilloscope. Components: 7404, 7408, 7432, 74151, 74138, LEDs, Resistors Procedure: 7. Draw the schematic of a 2-1 De-multiplexer using basic gates. 8. Write down the IC numbers and pin numbers of the gates in your schematic....

• ### 1) Implement the function given below using each of the following methods: ?(?, ?, ?, ?)...

1) Implement the function given below using each of the following methods: ?(?, ?, ?, ?) = P (0,1,3,4,7,9,13,15) ∙ ?(5,14) As few 16-1 multiplexers as possible. One 8-1 multiplexer, inverters, and a few 2-1 multiplexers. One 4-1 multiplexer and a few 2-1 multiplexers As few 2-1 multiplexers and inverters as possible. 2) Write a Verilog module and testbench for a 3:1 multiplexer that implements the following function. You can use “case”, “if” or “assign” statements. Grades will be agnostic...

• ### (20 pts)VHDL. Implement the logic circuit specified in the following truth table by using a 4:1 m...

(20 pts)VHDL. Implement the logic circuit specified in the following truth table by using a 4:1 mulitiplexer ome regular logic gates. 11 Draw a schematic of your implementation. 2) Suppose that you are given the following VHDL code of a 4:1 multiplexer. Please write a VHDL code to describe your implementation by using structure modeling technique, by using the following 4:1 multiplexer asia your answer component in your structure modeling. Note that you do not need to re-write the following...

• ### Write a VHDL code to implement the circuit function described below. Student Id : 8123405 Last 4 digits : 3405 6. Write...

Write a VHDL code to implement the circuit function described below. Student Id : 8123405 Last 4 digits : 3405 6. Write a VHDL code to implement the circuit function described below The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal DIR: Direction of the display sequence, T-forward, Ό'-reverse. CLK: clock pulse for the display sequence. RST:...

• ### VIVA QUESTIONS: 1. Implement the following function using VHDL coding. (Try to minimize if you can)....

VIVA QUESTIONS: 1. Implement the following function using VHDL coding. (Try to minimize if you can). F(A,B,C,D)=(A'+B+C). (A+B'+D'). (B+C'+D') . (A+B+C+D) 2. What will be the no. of rows in the truth table of N variables? 3. What are the advantages of VHDL? 4. Design Ex-OR gate using behavioral model? 5. Implement the following function using VHDL code f=AB+CD. 6. What are the differences between half adder and full adder? 7. What are the advantages of minimizing the logical expressions?...

• ### Write a VHDL code to implement the circuit function described below. 6. The circuit is to display the last four digits...

Write a VHDL code to implement the circuit function described below. 6. The circuit is to display the last four digits of your student ID number on a 7-segment display, one digit at a time, triggered by the falling edge of the clock signal. DIR: Direction of the display sequence, '1 CLK: clock pulse for the display sequence RST: reset the display counter. forward, '0' - reverse. Student ID: 8480594 Vdd ABCDE F G DIR CLK RST For example, if...