Visible to Intel only — GUID: mwh1409959597166
Ixiasoft
Visible to Intel only — GUID: mwh1409959597166
Ixiasoft
1.5.2. Secondary Register Control Signals Such as Clear and Clock Enable
To make the most efficient use of the signals in the device, ensure that HDL code matches the device architecture as closely as possible. The control signals have a certain priority due to the nature of the architecture. Your HDL code must follow that priority where possible.
Your synthesis tool can emulate any control signals using regular logic, so achieving functionally correct results is always possible. However, if your design requirements allow flexibility in controlling use and priority of control signals, match your design to the target device architecture to achieve the most efficient results. If the priority of the signals in your design is not the same as that of the target architecture, you may require extra logic to implement the control signals. This extra logic uses additional device resources, and can cause additional delays for the control signals.
In certain cases, using logic other than the dedicated control logic in the device architecture can have a larger impact. For example, the clock enable signal has priority over the synchronous reset or clear signal in the device architecture. The clock enable turns off the clock line in the LAB, and the clear signal is synchronous. Therefore, in the device architecture, the synchronous clear takes effect only when a clock edge occurs.
If you define a register with a synchronous clear signal that has priority over the clock enable signal, Intel® Quartus® Prime synthesis emulates the clock enable functionality using data inputs to the registers. You cannot apply a Clock Enable Multicycle constraint, because the emulated functionality does not use the clock enable port of the register. In this case, using a different priority causes unexpected results with an assignment to the clock enable signal.
The signal order is the same for all Intel FPGA device families. However, not all device families provide every signal. The priority order is:
- Asynchronous Clear ( clrn)—highest priority
- Enable (ena)
- Synchronous Clear (sclr)
- Synchronous Load (sload)
- Data In (data)—lowest priority
The priority order for secondary control signals in Intel FPGA devices differs from the order for other vendors’ FPGA devices. If your design requirements are flexible regarding priority, verify that the secondary control signals meet design performance requirements when migrating designs between FPGA vendors. To achieve the best results. try to match your target device architecture.
Verilog D-type Flipflop bus with Secondary Signals
This module uses all Intel® Arria® 10 DFF secondary signals: clrn, ena, sclr, and sload. Note that it instantiates 8-bit bus of DFFs rather than a single DFF, because synthesis infers some secondary signals only if there are multiple DFFs with the same secondary signal.
module top(clk, clrn, sclr, sload, ena, data, sdata, q);
input clk, clrn, sclr, sload, ena;
input [7:0] data, sdata;
output [7:0] q;
reg [7:0] q;
always @ (posedge clk or posedge clrn)
begin
if (clrn)
q <= 8'b0;
else if (ena)
begin
if (sclr)
q <= 8'b0;
else if (!sload)
q <= data;
else
q <= sdata;
end
end
endmodule