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 ---------------------- ----------------------...
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.
* 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...
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
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.
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
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...
Please add to this Python, Guess My Number Program. Add code to the program to make...
Please add to this Python, Guess My Number Program. Add code to the program to make it ask the user for his/her name and then greet that user by their name. Please add code comments throughout the rest of the program If possible or where you add in the code to make it ask the name and greet them before the program begins. import random def menu(): print("\n\n1. You guess the number\n2. You type a number and see if the...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT