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

📄 bufgmux_instanciate.v

📁 Xilinx Ise 官方源代码盘 第四章
💻 V
字号:
/*-------------------------------------------------------------------------------
--                 BUFGMUX instanciation using Synplify                      --
-------------------------------------------------------------------------------
--
-- GENERAL:
-- Synplify does not infer BUFGMUX: Instanciation is required.
--
-- The BUFGMUX resources: (See Virtex-II Handbook for more details)
--   - BUFGMUX is a multiplexed global clock buffer that can select between 2 
--     input clocks.
--
-- NOTES:
--   - Instanciation: Each input clock of the BUFGMUX that comes from an external
--      signal should specify the "xc_padtype" attribute. By default Synplify 
--      infers a BUFGP instead of a IBUFG for that clock pad signal resulting 
--      in more resource usage and a slower design. 
--      (attribute no longuer needed in release 7.1)
-------------------------------------------------------------------------------
-- Example: BUFGMUX instanciation
-----------------------------------------------------------------------------*/

module bufgmux_instanciate (clk_pad, clk_debug_pad, normal_mode, a, b, p);
  input         clk_pad       /* synthesis xc_padtype = "IBUFG" */;
  input         clk_debug_pad /* synthesis xc_padtype = "IBUFG" */;
  input         normal_mode;
  input  [15:0] a;
  input  [15:0] b;
  output [31:0] p;

  reg    [31:0] p;
  wire          clk;

// BUFGMUX instanciation
  BUFGMUX U1 ( .O(clk),
               .I0(clk_debug_pad),
               .I1(clk_pad),
               .S(normal_mode) );

// Equivalent BUFGMUX behavioral description (Not available yet for inference)
//  clk <= clk_pad when normal_mode='1' else clk_debug; -- Not available yet for inference

// other code
  always @(posedge clk)
  begin
       p <= a * b;
  end

endmodule

⌨️ 快捷键说明

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