HOME Corporate Product Verilog VHDL Link Contact Site map


型式74xx85ICのVerilog-HDLモデルです。


//
// Title        : (85) 4-Bit Magnitude Comparator
// File name    : 85.v
// Date         : 2000/12/08  Ver1.0
// Company      : Future Technology Ltd.
// Writer       : K.Bettou 
//

//-----------------------------------------------------
//  Module
//-----------------------------------------------------

module U85(
            A,
            B,
            IAB,
            IEQ,
            IBA,
            OAB,
            OEQ,
            OBA
        );

    input   [3:0]   A;
    input   [3:0]   B;
    input           IAB;
    input           IEQ;
    input           IBA;
    output          OAB;
    output          OEQ;
    output          OBA;

//-----------------------------------------------------
//  Using Wire
//-----------------------------------------------------
    wire            s_ab;
    wire            s_eq;
    wire            s_ba;


    assign  s_ab    =   (A > B);
    assign  s_eq    =   (A == B);
    assign  s_ba    =   (A < B);

    assign  OAB     =   s_ab | 
                         (s_eq & ((IAB & ~IEQ & ~IBA) | 
                           (~IAB & ~IEQ & ~IBA)));
    assign  OEQ     =   s_eq & IEQ;
    assign  OBA     =   s_ba | 
                          (s_eq & ((~IAB & ~IEQ & IBA) | 
                           (~IAB & ~IEQ & ~IBA)));

endmodule



Back

HOME Corporate Product Verilog VHDL Link Contact Site map