M
mkr
Guest
I am new to vhdl and trying to understand the following code for
parity generator. This is compiling in modelsim without any issues but
I don't seem to understand where the logic for xor2 is? I see xor2
declared as component with only interface but I don't find the
implementation. Can anyone help me understand this?
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity parity is
port(
datain : in unsigned(3 downto 0);
pout : out std_logic);
end entity;
architecture synth of parity is
signal a,b,x : std_logic ;
component xor2 port (x, y: IN std_logic; z: OUT std_logic);
end component;
begin
x1: xor2 port map ( datain(0), datain(1), a ) ;
x2: xor2 port map ( datain(2), datain(3), b ) ;
x3: xor2 port map ( a,b,x);
end synth;
Thanks
parity generator. This is compiling in modelsim without any issues but
I don't seem to understand where the logic for xor2 is? I see xor2
declared as component with only interface but I don't find the
implementation. Can anyone help me understand this?
library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;
entity parity is
port(
datain : in unsigned(3 downto 0);
pout : out std_logic);
end entity;
architecture synth of parity is
signal a,b,x : std_logic ;
component xor2 port (x, y: IN std_logic; z: OUT std_logic);
end component;
begin
x1: xor2 port map ( datain(0), datain(1), a ) ;
x2: xor2 port map ( datain(2), datain(3), b ) ;
x3: xor2 port map ( a,b,x);
end synth;
Thanks