URL
https://opencores.org/ocsvn/idea/idea/trunk
Subversion Repositories idea
[/] [idea/] [trunk/] [behavioral/] [idea_machine/] [comp2.vbe] - Rev 9
Compare with Previous | Blame | View Log
-- File Name : comp2.vbe --
-- Description : The special comparator resulting --
-- an integer 2^16+1 or an integer 0 on the 16-bit data --
-- Purpose : To be used by ASIMUT and SCMAP --
-- Date : Aug 22, 2001 --
-- Version : 1.1 --
-- Author : Martadinata A. --
-- Address : VLSI RG, Dept. of Electrical Engineering --
-- ITB, Bandung, Indonesia --
-- E-mail : marta@vlsi.itb.ac.id --
entity com2 is
port(
p : in bit_vector(15 downto 0);
q : in bit_vector(15 downto 0);
kout2 : out bit_vector(15 downto 0);
vdd : in bit;
vss : in bit
);
end com2;
architecture vbe of com2 is
signal less, equal : bit;
begin
assert ((vdd and not (vss)) = '1')
report "power supply is missing on com2"
severity warning;
less <= (
((not p(0)) and q(0)) and (not(p(1) xor q(1))) and (not(p(2) xor q(2))) and
(not(p(3) xor q(3))) and (not(p(4) xor q(4))) and (not(p(5) xor q(5))) and
(not(p(6) xor q(6))) and (not(p(7) xor q(7))) and (not(p(8) xor q(8))) and
(not(p(9) xor q(9))) and (not(p(10) xor q(10))) and (not(p(11) xor q(11)))
and (not(p(12) xor q(12))) and (not(p(13) xor q(13))) and (not(p(14) xor
q(14))) and (not(p(15) xor q(15)))
)or(
((not p(1)) and q(1)) and (not(p(2) xor q(2))) and
(not(p(3) xor q(3))) and (not(p(4) xor q(4))) and (not(p(5) xor q(5))) and
(not(p(6) xor q(6))) and (not(p(7) xor q(7))) and (not(p(8) xor q(8))) and
(not(p(9) xor q(9))) and (not(p(10) xor q(10))) and (not(p(11) xor q(11)))
and (not(p(12) xor q(12))) and (not(p(13) xor q(13))) and (not(p(14) xor
q(14))) and (not(p(15) xor q(15)))
)or(
((not p(2)) and q(2)) and (not(p(3) xor q(3))) and (not(p(4) xor q(4))) and
(not(p(5) xor q(5))) and (not(p(6) xor q(6))) and (not(p(7) xor q(7))) and
(not(p(8) xor q(8))) and (not(p(9) xor q(9))) and (not(p(10) xor q(10))) and
(not(p(11) xor q(11))) and (not(p(12) xor q(12))) and (not(p(13) xor q(13)))
and (not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(3)) and q(3)) and (not(p(4) xor q(4))) and
(not(p(5) xor q(5))) and (not(p(6) xor q(6))) and (not(p(7) xor q(7))) and
(not(p(8) xor q(8))) and (not(p(9) xor q(9))) and (not(p(10) xor q(10))) and
(not(p(11) xor q(11))) and (not(p(12) xor q(12))) and (not(p(13) xor q(13)))
and (not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(4)) and q(4)) and (not(p(5) xor q(5))) and (not(p(6) xor q(6))) and
(not(p(7) xor q(7))) and (not(p(8) xor q(8))) and (not(p(9) xor q(9))) and
(not(p(10) xor q(10))) and (not(p(11) xor q(11))) and (not(p(12) xor q(12)))
and (not(p(13) xor q(13))) and (not(p(14) xor q(14))) and (not(p(15) xor
q(15)))
)or(
((not p(5)) and q(5)) and (not(p(6) xor q(6))) and
(not(p(7) xor q(7))) and (not(p(8) xor q(8))) and (not(p(9) xor q(9))) and
(not(p(10) xor q(10))) and (not(p(11) xor q(11))) and (not(p(12) xor q(12)))
and (not(p(13) xor q(13))) and (not(p(14) xor q(14))) and (not(p(15) xor
q(15)))
)or(
((not p(6)) and q(6)) and (not(p(7) xor q(7))) and (not(p(8) xor q(8))) and
(not(p(9) xor q(9))) and (not(p(10) xor q(10))) and (not(p(11) xor q(11))) and
(not(p(12) xor q(12))) and (not(p(13) xor q(13))) and (not(p(14) xor
q(14))) and (not(p(15) xor q(15)))
)or(
((not p(7)) and q(7)) and (not(p(8) xor q(8))) and
(not(p(9) xor q(9))) and (not(p(10) xor q(10))) and (not(p(11) xor q(11))) and
(not(p(12) xor q(12))) and (not(p(13) xor q(13))) and (not(p(14) xor
q(14))) and (not(p(15) xor q(15)))
)or(
((not p(8)) and q(8)) and (not(p(9) xor q(9))) and (not(p(10) xor q(10))) and
(not(p(11) xor q(11))) and (not(p(12) xor q(12))) and (not(p(13) xor q(13))) and
(not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(9)) and q(9)) and (not(p(10) xor q(10))) and
(not(p(11) xor q(11))) and (not(p(12) xor q(12))) and (not(p(13) xor q(13))) and
(not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(10)) and q(10)) and (not(p(11) xor q(11))) and (not(p(12) xor q(12))) and
(not(p(13) xor q(13))) and (not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(11)) and q(11)) and (not(p(12) xor q(12))) and
(not(p(13) xor q(13))) and (not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(12)) and q(12)) and (not(p(13) xor q(13))) and (not(p(14) xor q(14))) and
(not(p(15) xor q(15)))
)or(
((not p(13)) and q(13)) and (not(p(14) xor q(14))) and (not(p(15) xor q(15)))
)or(
((not p(14)) and q(14)) and (not(p(15) xor q(15)))
)or
((not p(15)) and q(15));
equal <=
(not(p(0) xor q(0))) and (not(p(1) xor q(1))) and (not(p(2) xor q(2))) and
(not(p(3) xor q(3))) and (not(p(4) xor q(4))) and (not(p(5) xor q(5))) and
(not(p(6) xor q(6))) and (not(p(7) xor q(7))) and (not(p(8) xor q(8))) and
(not(p(9) xor q(9))) and (not(p(10) xor q(10))) and (not(p(11) xor q(11)))
and (not(p(12) xor q(12))) and (not(p(13) xor q(13))) and (not(p(14) xor
q(14))) and (not(p(15) xor q(15)));
kout2 <= "0000000000000001" when ((less = '1') or (equal ='1'))
else "0000000000000000";
end;