-- Copyright © 1993 by McGraw-Hill, Inc. and Zainalabedin Navabi
-- FIGURE 5.17
-- ENTITY DECLARATION OF NIBBLE-COMPARATOR TEST BENCH :
ENTITY nibble_comparator_test_bench IS
END nibble_comparator_test_bench ;
--
-- PROCEDURAL ARCHITECTURE OF NIBBLE-COMPARATOR TEST BENCH
USING PROCEDURES OF THE BASIC UTILITIES PACKAGE :
USE WORK.basic_utilities.ALL;
ARCHITECTURE procedural OF nibble_comparator_test_bench IS
COMPONENT comp4 PORT (
a, b : IN bit_vector (3 DOWNTO 0); gt, eq, lt : IN BIT;
a_gt_b, a_eq_b, a_lt_b : OUT BIT);
END COMPONENT;
FOR a1 : comp4 USE ENTITY WORK.nibble_comparator(structural);
SIGNAL a, b : BIT_VECTOR (3 DOWNTO 0);
SIGNAL eql, lss, gtr : BIT;
SIGNAL vdd : BIT := '1';
SIGNAL gnd : BIT := '0';
BEGIN
a1: comp4 PORT MAP (a, b, gnd, vdd, gnd, gtr, eql, lss);
apply_data (a, 00&15&15&14&14&14&14&10&00&15&00&00&15, 500 NS);
apply_data (b, 00&14&14&15&15&12&12&12&15&15&15&00&00, 500 NS);
END procedural;
--