TTL74245_TypeB.nsl


/* ************************************************************ */
declare TTL_74245_TypeB {

    inout       Port_A[8] ;

    inout       Port_B[8] ;

    input       DIR ;       // Direction. 0 = Port B -> A, 1 = PortA -> PortB

    input       nOE ;
}

/* ************************************************************ */
module  TTL_74245_TypeB {

    func_self   output_AtoB() ;         // Data output PORT A to PORT B
    func_self   output_BtoA() ;         // Data output PORT B to PORT A

/* Equation for biridection control */

    {
        if ( ~nOE ) {
            any {
                ~DIR    : output_BtoA () ;
                else    : output_AtoB () ;
            }
        }
    }

/* Equation for instruction */
    function    output_AtoB {
        Port_A = Port_B ;
    }

    function    output_BtoA {
        Port_B = Port_A ;
    }
}
PAGE TOP