answersLogoWhite

0


Best Answer

Below code can implement OR gate in VHDL.

The code is written in behavioral model.

Library ieee;

use ieee.std_logic_1164.all;

Entity gates is

port (a,b : in std_logic; c : out std_logic);

end gates ;

architecture and1 of gates is

begin

process(a,b)

Begin

If (a=1 or b=1) then

C<='1';

Else

C<= '0';

End if;

End process;

End and1;

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

%Below code can implement XOR gate in VHDL.

%The code is written in behavioral model.

Library ieee;
use ieee.std_logic_1164.all;

Entity gates is
port (a,b : in std_logic; c : out std_logic);
end gates ;

architecture behavioural of gates is
begin
process(a,b)
begin
If (a='1' and b='0') then
c<='1';
elsif (a='0' and b='1') then
c<='1';
else
c<= '0';
end if;
end process;
end behavioural;

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

Below code can implement XNOR gate in VHDL.

The code is written in behavioral model.

Library ieee;

use ieee.std_logic_1164.all;

Entity gates is

port (a,b : in std_logic; c : out std_logic);

end gates ;

architecture and1 of gates is

begin

process(a,b)

Begin

If (a=1 and b=0) then

C<='0';

elsif (a=0 and b=1) then

C<='0';

Else

C<= '1';

End if;

End process;

End and1;

Read more: What_is_the_VHDL_code_to_implement_XOR_gate_in_behavioral_model

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the VHDL code to implement XOR gate in behavioral model?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the VHDL code to implement NAND gate in behavioral model?

Below code can implement NAND gate in VHDL. The code is written in behavioral model. Library ieee; use ieee.std_logic_1164.all; Entity gates is port (a,b : in std_logic; c : out std_logic); end gates ; architecture and1 of gates is begin process(a,b) Begin If (a=1 and b=1) then C&lt;='0'; Else C&lt;= '1'; End if; End process; End and1;


What is the VHDL code to implement NOR gate in behavioral model?

Below code can implement NAND gate in VHDL. The code is written in data flow model. Library ieee; use ieee.std_logic_1164.all; Entity gates is port (a,b : in std_logic; c : out std_logic); end gates ; architecture and1 of gates is begin c&lt;=a nand b; end and1;


Code for square wave generation in VHDL?

implement vhdl code for counter.output of counter pulse is a square wave


What is the VHDL code to implement NOR gate?

Below code can implement NOT gate in VHDL. The code is written in data flow model. Library ieee; use ieee.std_logic_1164.all; Entity gates is port (a : in std_logic; c : out std_logic); end gates ; architecture and1 of gates is begin c&lt;=not a; end and1;


What is VHDL code to implement AND gate?

Below code can implement AND gate in VHDL. The code is written in data flow model. Library ieee; use ieee.std_logic_1164.all; Entity gates is port (a,b : in std_logic; c : out std_logic); end gates ; architecture and1 of gates is begin c&lt;=a and b; end and1;


What is the vhdl code for binary to hex convertion?

vhdl code for binary to Hexadecimal ?


Vhdl code for assending order of numbers?

vhdl code for ascending order of numbers


How to do a password using vhdl?

A VHDL program can be written to provide a password in the following ways.Using FPGA:Your program can be dumped into a FPGA. This works as per the program written. As the code is burned into it, the user can not see the code. Now, within your program you can have a conditional statement which serves as your password. For example,if (c=ramarav) then...................................................................Using CPLD:It also works in the similar manner.Using a GUI:We can implement a graphical user interface, but the easier way is to take the help of MATLAB tool. We can implement our VHDL code in MATLAB tool and it serves the purpose.


What is the vhdl code for 8253 microprocessor?

VHDL code for 8253 need to be written in structural modeling of VHDL. It will be a bunch of programs related to each and every component or functionality we use in 8253 and need to be combined. It is not a single program. It is a combination of several programs.


VHDL code of home security?

VHDL code for home security need to be written in structural modeling of VHDL. It will be a bunch of programs related to each and every home appliance we use and need to be combined. It is not a single program. It is a combination of several programs.


How vhdl is used?

VHDL is a hardware description language. The purpose of any HDL is to represent hardware as a program. We can write a program (code) for any digital circuit using VHDL. With the help of this code, the output of the circuit can be observed before actually designing it physically.


What is vhdl code for 2 bit sliced processor?

library ieee;