如何在 xilinx verilog 中使用 M2_1 MUX 或 FD 触发器等默认模块?

How to use default modules like M2_1 MUX or FD flipflop in xilinx verilog?

我可以在 xilinx 原理图 中使用这些默认模块,例如 M2_1 MUX、FD 触发器

verilog 中,我只能使用 基本门 ,例如 and, or ,not,xor

但是我可以在verilog中使用这些内置的多路复用器(M2_1)或触发器(FD)吗?,因为如果我使用行为代码,可能会有在某些情况下,概要或 xilinx 中的合成不佳。我也想使用系统级设计。

请帮我解决这个问题。 我需要包含任何库才能访问这个(内置门)吗?

请提供示例代码。我想要在 verilog 直接实例化 这些(Mux 和 Flipflop)就像 和,或

是的,您可以在 verilog 中使用它们。 Xilinx 提供了如何操作的用户指南 (example for 7 series here)

我给 link 的用户指南提供了 FDCE 触发器的示例,例如(第 131 页):

// FDCE:Single Data Rate D Flip-Flop with Asynchronous Clear and
// Clock Enable (posedge clk).
// 7 Series
// Xilinx HDL Libraries Guide, version 2012.2 
FDCE #(
    .INIT(1'b0)
    // Initial value of register (1'b0 or 1'b1)
)
FDCE_inst
(
    .Q(Q),
    // 1-bit Data output
    .C(C),
    // 1-bit Clock input
    .CE(CE),
    // 1-bit Clock enable input
    .CLR(CLR),
    // 1-bit Asynchronous clear input
    .D(D)
    // 1-bit Data input 
);
// End of FDCE_inst instantiation