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 ---------------------- ----------------------...
Please convert This java Code to C# (.cs) Please make sure the code can run and...
Please convert This java Code to C# (.cs) Please make sure the code can run and show the output Thank you! Let me know if you need more information. Intructions For this assignment you will be creating two classes, an interface, and a driver program: Class Calculator will implement the interface CalcOps o As such it will implement hexToDec() - a method to convert from Hexadecimal to Decimal. Class HexCalc will inherit from Calculator. Interface CalcOps will have abstract methods...
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 PROVIDE THE CODE IN RACKET PROGRAMMING LANGUAGE ONLY AND MAKE SURE CODE RUNS ON THE...
*****************PLEASE PROVIDE THE CODE IN RACKET PROGRAMMING LANGUAGE ONLY AND MAKE SURE CODE RUNS ON THE WESCHEME IDE************* Write a tail-recursive Racket function "kept-short-rec" that takes an integer and a list of strings as parameters and evaluates to an integer. The resulting integer should be the number of strings on the original list whose string length is less than the integer parameter. For example, (kept-short-rec 3 '("abc" "ab" "a")) should evaluate to 2 because there are only 2 strings shorter...
*****************PLEASE GIVE THE CODE IN RACKET PROGRAMMING ONLY AND MAKE SURE THE CODE RUNS ON WESCHEME...
*****************PLEASE GIVE THE CODE IN RACKET PROGRAMMING ONLY AND MAKE SURE THE CODE RUNS ON WESCHEME IDE*************** Write a recursive Racket function "keep-short-rec" that takes an integer and a list of strings as parameters and evaluates to a list of strings. The resulting list should be all of the strings from the original list, maintaining their relative order, whose string length is less than the integer parameter. For example, (keep-short-rec 3 '("abc" "ab" "a")) should evaluate to '("ab" "a") because...
*****************PLEASE GIVE THE CODE IN RACKET PROGRAMMING ONLY AND MAKE SURE THE CODE RUNS ON WESCHEME...
*****************PLEASE GIVE THE CODE IN RACKET PROGRAMMING ONLY AND MAKE SURE THE CODE RUNS ON WESCHEME IDE*************** Write a recursive Racket function "sum-diff" that takes two lists of integers that are the same length and evaluates to an integer. The resulting integer should be the sum of the absolute value of the differences between each pair of integers with the same index in the two lists. For example (sum-diff '(-1 -2 -3) '(1 2 3)) should evaluate to 12 because...
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
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!!
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
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT