OpenCores
URL https://opencores.org/ocsvn/y80e/y80e/trunk

Subversion Repositories y80e

[/] [y80e/] [trunk/] [rtl/] [aluout.v] - Diff between revs 2 and 6

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 2 Rev 6
Line 1... Line 1...
/*******************************************************************************************/
/*******************************************************************************************/
/**                                                                                       **/
/**                                                                                       **/
/** COPYRIGHT (C) 2011, SYSTEMYDE INTERNATIONAL CORPORATION, ALL RIGHTS RESERVED          **/
/** ORIGINAL COPYRIGHT (C) 2011, SYSTEMYDE INTERNATIONAL CORPORATION, ALL RIGHTS RESERVED **/
 
/** COPYRIGHT (C) 2012, SERGEY BELYASHOV                                                  **/
/**                                                                                       **/
/**                                                                                       **/
/** alu function unit combiner module                                 Rev 0.0  07/24/2011 **/
/** alu function unit combiner module                                 Rev 0.0  06/13/2012 **/
/**                                                                                       **/
/**                                                                                       **/
/*******************************************************************************************/
/*******************************************************************************************/
module aluout (cry_nxt, data_bus, hcar_nxt, one_nxt, par_nxt, sign_nxt, zero_nxt, adder_c,
module aluout (cry_nxt, data_bus, hcar_nxt, one_nxt, par_nxt, sign_nxt, zero_nxt, adder_c,
               adder_hc, adder_out, hi_byte, logic_c, logic_hc, logic_out, shft_c, shft_out,
               adder_hc, adder_out, hi_byte, logic_c, logic_hc, logic_out, shft_c, shft_out,
 
               mult_out,
               unit_sel, word_op);
               unit_sel, word_op);
 
 
  input         adder_c;       /* math carry result                                        */
  input         adder_c;       /* math carry result                                        */
  input         adder_hc;      /* math half-carry result                                   */
  input         adder_hc;      /* math half-carry result                                   */
  input         hi_byte;       /* shift left byte control                                  */
  input         hi_byte;       /* shift left byte control                                  */
Line 18... Line 20...
  input         word_op;       /* word operation                                           */
  input         word_op;       /* word operation                                           */
  input   [1:0] unit_sel;      /* alu function unit select                                 */
  input   [1:0] unit_sel;      /* alu function unit select                                 */
  input   [7:0] shft_out;      /* shift unit result                                        */
  input   [7:0] shft_out;      /* shift unit result                                        */
  input  [15:0] adder_out;     /* math unit result                                         */
  input  [15:0] adder_out;     /* math unit result                                         */
  input  [15:0] logic_out;     /* logic unit result                                        */
  input  [15:0] logic_out;     /* logic unit result                                        */
 
  input  [15:0] mult_out;      /* multiplier unit result                                   */
  output        cry_nxt;       /* carry flag next                                          */
  output        cry_nxt;       /* carry flag next                                          */
  output        hcar_nxt;      /* half-carry flag next                                     */
  output        hcar_nxt;      /* half-carry flag next                                     */
  output        one_nxt;       /* one flag next                                            */
  output        one_nxt;       /* one flag next                                            */
  output        par_nxt;       /* parity flag next                                         */
  output        par_nxt;       /* parity flag next                                         */
  output        sign_nxt;      /* sign flag next                                           */
  output        sign_nxt;      /* sign flag next                                           */
Line 42... Line 45...
  /*****************************************************************************************/
  /*****************************************************************************************/
  /*                                                                                       */
  /*                                                                                       */
  /* alu function unit combination                                                         */
  /* alu function unit combination                                                         */
  /*                                                                                       */
  /*                                                                                       */
  /*****************************************************************************************/
  /*****************************************************************************************/
  always @ (unit_sel or adder_out or logic_out or shft_out) begin
  always @ (unit_sel or adder_out or logic_out or shft_out or mult_out) begin
    casex (unit_sel)
    casex (unit_sel)
      2'b01:   alu_result = adder_out;
      2'b01:   alu_result = adder_out;
      2'b1x:   alu_result = {8'h00, shft_out};
      2'b10:   alu_result = {8'h00, shft_out};
 
      2'b11:   alu_result = mult_out;
      default: alu_result = logic_out;
      default: alu_result = logic_out;
      endcase
      endcase
    end
    end
 
 
  /*****************************************************************************************/
  /*****************************************************************************************/

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.