FPGA跨時鐘信號同步簡單處理方法

   FPGA跨時鐘信號同步有很多方法,這裏給大家介紹一個非常簡單的方法,就是用xilinx帶參數宏解決。

xpm_cdc_single是把1bit的信號從一個時鐘域同步到另一個時鐘域,使用方法如下:

// xpm_cdc_single: Single-bit Synchronizer
// Xilinx Parameterized Macro, version 2019.1
xpm_cdc_single #(
 .DEST_SYNC_FF(4), // DECIMAL; range: 2-10
 .INIT_SYNC_FF(0), // DECIMAL; 0=disable simulation init values, 1=enable simulation init values
 .SIM_ASSERT_CHK(0), // DECIMAL; 0=disable simulation messages, 1=enable simulation messages
 .SRC_INPUT_REG(1) // DECIMAL; 0=do not register input, 1=register input
)
xpm_cdc_single_inst (
 .dest_out(dest_out), // 1-bit output: src_in synchronized to the destination clock domain. This output is
 // registered.
 .dest_clk(dest_clk), // 1-bit input: Clock signal for the destination clock domain.
 .src_clk(src_clk), // 1-bit input: optional; required when SRC_INPUT_REG = 1
 .src_in(src_in) // 1-bit input: Input signal to be synchronized to dest_clk domain.
);
// End of xpm_cdc_single_inst instantiation
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章