Question

In: Electrical Engineering

create a VHDL program for the Truth Table below. Please make sure to create your code...

create a VHDL program for the Truth Table below. Please make sure

to create your code for the simplified circuit.

A B C Z
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 1
1 0 1 1
1 1 0 1
1 1 1 0

Solutions

Expert Solution

The design code and testbench code for your reference are added below

library IEEE;
use IEEE.std_logic_1164.all;

entity simplog is
port(
  a: in std_logic;
  b: in std_logic;
    c: in std_logic;

  z: out std_logic);
end simplog;

architecture dataflow of simplog is
begin
z<= ((not b)and a)or(b xor c);
end dataflow;


TESTBENCH:

-- Testbench for simplog gate
library IEEE;
use IEEE.std_logic_1164.all;

entity testbench is
-- empty
end testbench;

architecture tb of testbench is

-- DUT component
component simplog is
port(
  a: in std_logic;
  b: in std_logic;
      c: in std_logic;

  z: out std_logic);
end component;

signal a_in, b_in,c_in, z_out: std_logic;

begin

  -- Connect DUT
  DUT: simplog port map(a_in, b_in,c_in,z_out);

  process
  begin
    a_in <= '0';
    b_in <= '0';
        c_in <= '0';

    wait for 1 ns;
    a_in <= '0';
    b_in <= '0';
        c_in <= '1';

    wait for 1 ns;
    
  
    a_in <= '0';
    b_in <= '1';
        c_in <= '0';

    wait for 1 ns;
    a_in <= '0';
    b_in <= '1';
        c_in <= '1';

    wait for 1 ns;

    a_in <= '1';
    b_in <= '0';
        c_in <= '0';

    wait for 1 ns;
    a_in <= '1';
    b_in <= '0';
        c_in <= '1';

    wait for 1 ns;

    a_in <= '1';
    b_in <= '1';
        c_in <= '0';

    wait for 1 ns;
    a_in <= '1';
    b_in <= '1';
        c_in <= '1';

wait for 1 ns;
  end process;
end tb;

Please try again as I have used the same tool as that of yours and its working fine in this tool as well ,so we are getting the required waveform.


Related Solutions

Create a portfolio using the four stocks and information below: ((((please please make sure the answers...
Create a portfolio using the four stocks and information below: ((((please please make sure the answers are correct please)))) Expected Return Standard Deviation Weight in Portfolio Stock A 21.00% 21.00% 15.00% Stock B 5.00% 17.00% 28.00% Stock C 7.00% 12.00% 11.00% Stock D 22.00% 22.00% 46.00% ---------------------- ---------------------- ---------------------- ---------------------- Correlation (A,B) 0.7000 ---------------------- ---------------------- Correlation (A,C) 0.4900 ---------------------- ---------------------- Correlation (A,D) 0.2500 ---------------------- ---------------------- Correlation (B,C) 0.4400 ---------------------- ---------------------- Correlation (B,D) 0.9600 ---------------------- ---------------------- Correlation (C,D) 0.2000 ---------------------- ----------------------...
* Make sure you turn in your code (take a screen shot of your code in...
* Make sure you turn in your code (take a screen shot of your code in R)and answers. Conduct the hypothesis and solve questions by using R. 2) A random sample of 12 graduates of a secretarial school averaged 73.2 words per minute with a standard deviation of 7.9 words per minute on a typing test. What can we conclude, at the .05 level, regarding the claim that secretaries at this school average less than 75 words per minute on...
write a program that will print a truth table for p ^ ~q. Using C++ please.
write a program that will print a truth table for p ^ ~q. Using C++ please.
Please create an Event-Based JavaScript Program of your choice. Please write new code for this project...
Please create an Event-Based JavaScript Program of your choice. Please write new code for this project (starting from scratch). Thank you!!
Solve the below questions using your own words PLEASE!! Make sure to write by your own...
Solve the below questions using your own words PLEASE!! Make sure to write by your own words or paraphrase 1. What is the difference between Windows and Linux server 2. Give some advantages and disadvantages Windows and Linux Operating System
Construct a truth table for the statement [q∨(~r∧p)]→~p. Complete the truth table below by filling in...
Construct a truth table for the statement [q∨(~r∧p)]→~p. Complete the truth table below by filling in the blanks. (T or F) p q r ~r ~r∧p q∨(~r∧p) ~p [q∨(~r∧p)]→~p T T T T T F T F T T F F
Write VHDL code (behavior model) to implement a 4-bit modulo-9 counter and simulate your VHDL code...
Write VHDL code (behavior model) to implement a 4-bit modulo-9 counter and simulate your VHDL code of 4-bit modulo-9 counter in ModelSim, and capture the screenshot of your simulated waveform. Assume clock period Tclk=100ns, initially, the counter is reset to Q3Q2Q1Q0=0000 you need to simulate a complete counting cycle plus one more additional clock period after it is reset to “0000” state.
How do I implement Image Processing using VHDL for FPGA? Please provide VHDL code
How do I implement Image Processing using VHDL for FPGA? Please provide VHDL code
C++ program, I'm a beginner so please make sure keep it simple Write a program to...
C++ program, I'm a beginner so please make sure keep it simple Write a program to read the input file, shown below and write out the output file shown below. Use only string objects and string functions to process the data. Do not use c-string functions or stringstream (or istringstream or ostringstream) class objects for your solution. Input File.txt: Cincinnati 27, Buffalo 24 Detroit 31, Cleveland 17 Kansas City 24, Oakland 7 Carolina 35, Minnesota 10 Pittsburgh 19, NY Jets...
C++ questions, Please make sure to divide your program into functions which perform each major task....
C++ questions, Please make sure to divide your program into functions which perform each major task. The game of rock paper scissors is a two player game in which each each player picks one of the three selections: rock, paper and scissors. The game is decided using the following logic: ROCK defeats SCISSORS (“smashes”) PAPER defeats ROCK (“wraps”) SCISSORS defeats PAPER (“slices”) If both players choose the same selection the game ends in a tie. Write a program that asks...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT