⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 m3s079ct.v

📁 这是16位定点dsp源代码。已仿真和综合过了
💻 V
字号:
//*******************************************************************       ////IMPORTANT NOTICE                                                          ////================                                                          ////Copyright Mentor Graphics Corporation 1996 - 1998.  All rights reserved.  ////This file and associated deliverables are the trade secrets,              ////confidential information and copyrighted works of Mentor Graphics         ////Corporation and its licensors and are subject to your license agreement   ////with Mentor Graphics Corporation.                                         ////                                                                          ////These deliverables may be used for the purpose of making silicon for one  ////IC design only.  No further use of these deliverables for the purpose of  ////making silicon from an IC design is permitted without the payment of an   ////additional license fee.  See your license agreement with Mentor Graphics  ////for further details.  If you have further questions please contact        ////Mentor Graphics Customer Support.                                         ////                                                                          ////This Mentor Graphics core (m320c50eng v1999.010) was extracted on         ////workstation hostid 800059c1 Inventra                                      //// Accumulator Barrel Shifter (right only)// Copyright Mentor Graphics Corporation and Licensors 1998. // V1.002// m3s079ct.v// M320C50 Accumulator Barrel Shifter// Right barrel shifter used by BSAR, SATH & SATL instructions.//// ShiftCntrl://    0 : BSAR instruction//    1 : SATH instruction//    2 : SATL instructionmodule m3s079ct (RightShiftOp, ACC, ScalerShift, ShiftCntrl, SXM);//*******************************************************************       ////IMPORTANT NOTICE                                                          ////================                                                          ////Copyright Mentor Graphics Corporation 1996 - 1998.  All rights reserved.  ////This file and associated deliverables are the trade secrets,              ////confidential information and copyrighted works of Mentor Graphics         ////Corporation and its licensors and are subject to your license agreement   ////with Mentor Graphics Corporation.                                         ////                                                                          ////These deliverables may be used for the purpose of making silicon for one  ////IC design only.  No further use of these deliverables for the purpose of  ////making silicon from an IC design is permitted without the payment of an   ////additional license fee.  See your license agreement with Mentor Graphics  ////for further details.  If you have further questions please contact        ////Mentor Graphics Customer Support.                                         ////                                                                          ////This Mentor Graphics core (m320c50eng v1999.010) was extracted on         ////workstation hostid 800059c1 Inventra                                      //  input [31:0] ACC;  input  [4:0] ScalerShift;  input  [2:0] ShiftCntrl;  input        SXM;  output [31:0] RightShiftOp;  reg        TopBit;  reg [31:0] RightShiftOp; // note that this variable is used as a temporary store  reg  [4:0] Shift;// Generate top bit from SXM and ACC bit 15always @(SXM or ACC)    TopBit = SXM & ACC[31];// Create shift valuealways @(ShiftCntrl or ScalerShift)    if (ShiftCntrl[0])        Shift = ScalerShift[3:0] + 1;    else    begin        Shift[4] = ScalerShift[4] & ~ShiftCntrl[2] & ShiftCntrl[1];        Shift[3] = ScalerShift[3] & ShiftCntrl[2];        Shift[2] = ScalerShift[2] & ShiftCntrl[2];        Shift[1] = ScalerShift[1] & ShiftCntrl[2];        Shift[0] = ScalerShift[0] & ShiftCntrl[2];    end// Barrel shifteralways @(ACC or Shift or TopBit)begin  if (Shift[0]) // shift 1 bit right    RightShiftOp = {TopBit,ACC[31:1]};  else RightShiftOp = {ACC[31:0]};  if (Shift[1]) // shift 2 bits right    RightShiftOp = {TopBit,TopBit,RightShiftOp[31:2]};  else RightShiftOp = {RightShiftOp[31:0]};  if (Shift[2]) // shift 4 bits right    RightShiftOp = {TopBit,TopBit,TopBit,TopBit,RightShiftOp[31:4]};  else RightShiftOp = {RightShiftOp[31:0]};  if (Shift[3]) // shift 8 bits right    RightShiftOp = {TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,                    RightShiftOp[31:8]};  else RightShiftOp = {RightShiftOp[31:0]};  if (Shift[4]) // shift 16 bits right    RightShiftOp = {TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,                    TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,TopBit,                    RightShiftOp[31:16]};  else RightShiftOp = {RightShiftOp[31:0]};endendmodule

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -