-- Copyright (c) 1989 Vantage Analysis Systems, Inc -- This source file may be used and distributed -- without restriction provided that the copyright -- is not removed and that the code is not used -- or distributed for profit. -- ---------------------------------------------------------------------------- -- copyright 1988 -- Vantage Analysis Systems,Inc. -- all rights reserved -- -- File name : std_ecl.vhdl -- Title : ecl overloaded operators. -- -- Purpose : -- -- Provide standard logical operators AND, OR, NAND, NOR, XOR, -- and NOT which work on operands of the std_logic type. -- -- Author(s) : KES -- -- --------------------------------------------------------------------------- use std.std_logic.all; package std_ecl is --$ !VANTAGE_METACOMMENTS_ON --$ !VANTAGE_DNA_ON -- Logical operators. function "and" ( L,R : t_logic ) return t_logic; function "or" ( L,R : t_logic ) return t_logic; function "nand"( L,R : t_logic ) return t_logic; function "nor" ( L,R : t_logic ) return t_logic; function "xor" ( L,R : t_logic ) return t_logic; function "not" ( L : t_logic ) return t_logic; end std_ecl; -------------------------------------------------------------------------- -- copyright 1988 -- Vantage Analysis Systems, Inc. -- all rights reserved -------------------------------------------------------------------------- package body std_ecl is --$ !VANTAGE_METACOMMENTS_ON --$ !VANTAGE_DNA_ON -- "and" operator. function "and" ( L,R : t_logic ) return t_logic is begin return( f_ecl( f_and( f_state( L ) ) ( f_state( R ) ) ) ); end; -- "or" operator. function "or" ( L,R : t_logic ) return t_logic is begin return( f_ecl( f_or( f_state( L ) ) ( f_state( R ) ) ) ); end; -- "nand" operator. function "nand" ( L,R : t_logic ) return t_logic is begin return( f_ecl( f_nand( f_state( L ) ) ( f_state( R ) ) ) ); end; -- "nor" operator. function "nor" ( L,R : t_logic ) return t_logic is begin return( f_ecl( f_nor( f_state( L ) ) ( f_state( R ) ) ) ); end; -- "xor" operator. function "xor" ( L,R : t_logic ) return t_logic is begin return( f_ecl( f_xor( f_state( L ) ) ( f_state( R ) ) ) ); end; -- "not" operator. function "not" ( L : t_logic ) return t_logic is begin return( f_ecl( f_not( f_state( L ) ) ) ); end; end std_ecl;