dpibt1023.vmd 1.52 KB
/**************************************************************/
/*    Verilog module of datapath cell dpibt1023               */
/*    Designed by    Lin Yang    VLSI Technology  Oct. 20, 90 */
/*    Designed by    Linda J. Xu      July, 1992              */
/*                                                            */
/*    The following is the port description                   */
/*    Data ports                                              */
/*        I    : the input port                               */
/*        ZN   : the output port                              */
/*    Control ports                                           */
/*        INST  : the output enable signal                    */
/*    Parameters                                              */
/*        WORDSIZE  : the word size of the datapath cell      */
/*        DELAY     : the delay time from input to output     */
/*        BF        : the  with/without buffer flag           */
/*                    0 for without buffer; 1 for with buffer */
/**************************************************************/
module dpibt1023(I, ZN, INST);

  parameter WORDSIZE = 8, DELAY = 4, BF = 1;
  input  [WORDSIZE-1:0] I;
  output [WORDSIZE-1:0] ZN;
  input INST;

  function [WORDSIZE:0] ibt;
    input [WORDSIZE-1:0] in;
    input oe;

    begin
        case (oe)
          'b1 :   ibt = ~in;
          'b0 :   ibt = {WORDSIZE{1'b z}};
          default ibt = {WORDSIZE{1'b x}};
        endcase
    end
  endfunction

  assign #DELAY ZN = ibt(I, INST);

endmodule