URL
https://opencores.org/ocsvn/idea/idea/trunk
Subversion Repositories idea
[/] [idea/] [trunk/] [behavioral/] [key_regulator/] [comparator.vbe] - Rev 9
Compare with Previous | Blame | View Log
-- File Name : comparator.vbe
-- Description : Compare input with '0000000000000000'
-- Author : Mas Adit
-- Date : 29 Agustus 2001
ENTITY comparator IS
PORT(
a : IN BIT_VECTOR (15 DOWNTO 0);
o : OUT BIT_VECTOR (16 DOWNTO 0);
vdd : IN BIT;
vss : IN BIT
);
END comparator;
ARCHITECTURE VBE OF comparator IS
SIGNAL q : BIT_VECTOR (16 DOWNTO 0);
BEGIN
ASSERT ((vdd and not (vss)) = '1')
REPORT "power supply is missing on comparator"
SEVERITY WARNING;
q <= ('1' & a) WHEN (a = "0000000000000000") ELSE ('0' & a);
o <= q;
END VBE;