/******************************************
* (C)Copyright by N.T.T 1993(unpublished) *
* All rights are reserved.                *
******************************************/
%i "../int_h/alu_16.h"
module alu_32 {
    input       enb_cry ;
    input       inv_in2 ;
    input       and ;
    input       or ;
    input       eor ;
    input       cin ;
    input       in1<32> ;
    input       in2<32> ;
    output      out<32> ;
    output      gout ;
    output      pout ;
    output      ovf ;
    output      eq ;
    sel_v       cry<2> ;
    alu_16      alu16h ;
    alu_16      alu16l ;
    instrin     do ;
    instruct do par {
        cry = ((cin&alu16l.pout)
              |     alu16l.gout)
           || cin ;
        out = alu16h.do(enb_cry,inv_in2,and,or,eor,cry<1>,in1<31:16>,in2<31:16>).out
           || alu16l.do(enb_cry,inv_in2,and,or,eor,cry<0>,in1<15: 0>,in2<15: 0>).out ;
        gout =  (alu16l.gout&alu16h.pout)
              |              alu16h.gout ;
        pout = alu16l.pout&alu16h.pout ;
        ovf = alu16h.ovf ;
        eq = alu16h.eq&alu16l.eq ;
    }
}
