TTL74245_TypeA.nsl

/* ************************************************************ */

declare TTL_74245_TypeA {

    inout       Port_A[8] ;

    inout       Port_B[8] ;
    
    input       DIR ;       // Direction. 0 = Port B -> A, 1 = PortA -> PortB
    
    input       nOE ;
}

/* ************************************************************ */

module  TTL_74245_TypeA {

    func_self   output_enable() ;

/* Equation for biridection control */

    any {
        ~nOE : output_enable() ;
    }
    
    function    output_enable   any{
        ~DIR    : Port_B = Port_A ;
        else    : Port_A = Port_B ;
    }   
}