Question: Sample VHDL Code library ieee; use ieee.std_logic_1164.all; -------------------------------------- entity OR is port( a: in std_logic; b: in std_logic; X: out std_logic ); end OR; ---------------------------------------

Sample VHDL Code

library ieee;

use ieee.std_logic_1164.all;

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

entity OR is

port( a: in std_logic;

b: in std_logic;

X: out std_logic

);

end OR;

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

architecture OR_arch of OR is

begin

process(a, b)

begin

-- compare to truth table

if ((a='0') and (b='0')) then

X <= '0';

else

X <= '1';

end if;

end process;

end OR_arch;

architecture OR_beh of OR is

begin

X <= a or b;

end OR_beh;

Questions:

1. What is VHDL ? What are capabilities of VHDL ?

2. What is the use of entity and Architecture block in a VHDL code?

3. What is the difference between Verilog and VHDL?

4. Write a VHDL code for full adder.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!