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

Subversion Repositories robust_axi_fabric

[/] [robust_axi_fabric/] [trunk/] [src/] [base/] [ic_dec.v] - Diff between revs 8 and 9

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 8 Rev 9
<##//////////////////////////////////////////////////////////////////
<##//////////////////////////////////////////////////////////////////
////                                                             ////
////                                                             ////
////  Author: Eyal Hochberg                                      ////
////  Author: Eyal Hochberg                                      ////
////          eyal@provartec.com                                 ////
////          eyal@provartec.com                                 ////
////                                                             ////
////                                                             ////
////  Downloaded from: http://www.opencores.org                  ////
////  Downloaded from: http://www.opencores.org                  ////
/////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////
////                                                             ////
////                                                             ////
//// Copyright (C) 2010 Provartec LTD                            ////
//// Copyright (C) 2010 Provartec LTD                            ////
//// www.provartec.com                                           ////
//// www.provartec.com                                           ////
//// info@provartec.com                                          ////
//// info@provartec.com                                          ////
////                                                             ////
////                                                             ////
//// This source file may be used and distributed without        ////
//// This source file may be used and distributed without        ////
//// restriction provided that this copyright statement is not   ////
//// restriction provided that this copyright statement is not   ////
//// removed from the file and that any derivative work contains ////
//// removed from the file and that any derivative work contains ////
//// the original copyright notice and the associated disclaimer.////
//// the original copyright notice and the associated disclaimer.////
////                                                             ////
////                                                             ////
//// This source file is free software; you can redistribute it  ////
//// This source file is free software; you can redistribute it  ////
//// and/or modify it under the terms of the GNU Lesser General  ////
//// and/or modify it under the terms of the GNU Lesser General  ////
//// Public License as published by the Free Software Foundation.////
//// Public License as published by the Free Software Foundation.////
////                                                             ////
////                                                             ////
//// This source is distributed in the hope that it will be      ////
//// This source is distributed in the hope that it will be      ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
//// useful, but WITHOUT ANY WARRANTY; without even the implied  ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR     ////
//// PURPOSE.  See the GNU Lesser General Public License for more////
//// PURPOSE.  See the GNU Lesser General Public License for more////
//// details. http://www.gnu.org/licenses/lgpl.html              ////
//// details. http://www.gnu.org/licenses/lgpl.html              ////
////                                                             ////
////                                                             ////
//////////////////////////////////////////////////////////////////##>
//////////////////////////////////////////////////////////////////##>
 
 
OUTFILE PREFIX_ic_dec.v
OUTFILE PREFIX_ic_dec.v
 
 
ITER MX
ITER MX
ITER SX
ITER SX
 
 
LOOP MX
LOOP MX
ITER MMX_IDX
ITER MMX_IDX
ENDLOOP MX
ENDLOOP MX
 
 
module PREFIX_ic_dec (PORTS);
module PREFIX_ic_dec (PORTS);
 
 
   input [ADDR_BITS-1:0]                       MMX_AADDR;
   input [ADDR_BITS-1:0]                       MMX_AADDR;
   input [ID_BITS-1:0]                         MMX_AID;
   input [ID_BITS-1:0]                         MMX_AID;
   output [SLV_BITS-1:0]                       MMX_ASLV;
   output [SLV_BITS-1:0]                       MMX_ASLV;
   output                                     MMX_AIDOK;
   output                                     MMX_AIDOK;
 
 
   parameter                                  DEC_MSB =  ADDR_BITS - 1;
   parameter                                  DEC_MSB =  ADDR_BITS - 1;
   parameter                                  DEC_LSB =  ADDR_BITS - MSTR_BITS;
   parameter                                  DEC_LSB =  ADDR_BITS - SLV_BITS;
 
 
   reg [SLV_BITS-1:0]                          MMX_ASLV;
   reg [SLV_BITS-1:0]                          MMX_ASLV;
   reg                                        MMX_AIDOK;
   reg                                        MMX_AIDOK;
 
 
   LOOP MX
   LOOP MX
     always @(MMX_AADDR or MMX_AIDOK)
     always @(MMX_AADDR or MMX_AIDOK)
       begin
       begin
          case ({MMX_AIDOK, MMX_AADDR[DEC_MSB:DEC_LSB]})
          case ({MMX_AIDOK, MMX_AADDR[DEC_MSB:DEC_LSB]})
            {1'b1, BIN(SX MSTR_BITS)} : MMX_ASLV = 'dSX;
            {1'b1, BIN(SX SLV_BITS)} : MMX_ASLV = 'dSX;
            default : MMX_ASLV = 'dSERR;
            default : MMX_ASLV = 'dSERR;
          endcase
          endcase
       end
       end
 
 
   always @(MMX_AID)
   always @(MMX_AID)
     begin
     begin
        case (MMX_AID)
        case (MMX_AID)
          ID_MMX_IDMMX_IDX : MMX_AIDOK = 1'b1;
          ID_MMX_IDMMX_IDX : MMX_AIDOK = 1'b1;
          default : MMX_AIDOK = 1'b0;
          default : MMX_AIDOK = 1'b0;
        endcase
        endcase
     end
     end
 
 
   ENDLOOP MX
   ENDLOOP MX
 
 
     endmodule
     endmodule
 
 
 
 
 
 
 
 

powered by: WebSVN 2.1.0

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