Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)

reg~feeder REMOVE?

GOMEZ_IT
New Contributor I
2,077 Views
Good morning.
I'm trying to make 2-register synchronizers for the metstability problem on asynchronous signals.
Quartus automatically inserts the LUT between one register and another which calls regx~feeder.
Is it possible through some attribute to eliminate this block and connect the 2 registers directly?
Regards, Luca

reg_feeder.png 

Labels (1)
0 Kudos
14 Replies
sstrell
Honored Contributor III
2,051 Views

It would be hard to figure this out without seeing the code you are using to create the synchronizer.

0 Kudos
ShengN_Intel
Employee
2,024 Views

Hi,


The branch line between the reg1 output and LOGIC_CELL_COMB where it connected to? May be can try to avoid that branch.


Thanks,

Best Regards,

Sheng


0 Kudos
FvM
Honored Contributor I
2,016 Views

Hi,

it's just a misunderstanding respectively lack of knowledge about internal FPGA structure.

You are seeing "reg_feeders" in post mapping technology map. They are no separate FPGA hardware elements that can be intentionally used or omitted. They are integral part of FPGA logic element and simply belong to the DFF data path. Review device handbook LE chapter or  visualize implementation in resource property viewer (context menu "locate" in technology map).

The left block is combinational part of the locic cell (4-input LUT), just used as a buffer COMBOUT=DATAD in this case. 

FvM_0-1705051109932.png

 

0 Kudos
GOMEZ_IT
New Contributor I
2,002 Views
Thanks everyone for the replies.
@FvM: between the output of the LUT (combout) and the input of the FLOP (datain) there is a switch.
Can this switch not be switched to exclude the LUT?
The photo I inserted in the first post is incorrect. I attach the new one:

feeder2.png 

0 Kudos
GOMEZ_IT
New Contributor I
2,000 Views
I also attach the VHDL code.
This is an edge detector on the falling edge with integrated flops for the CDC:

library ieee;
use ieee.std_logic_1164.all;
entity EdgeDetector is
port (
clk :in std_logic;
d :in std_logic;
edge :out std_logic
);
end EdgeDetector;
architecture EdgeDetector_rtl of EdgeDetector is


signal meta1 :std_logic:='0';
signal meta2 :std_logic:='0';
signal reg1 :std_logic:='0';
signal reg2 :std_logic:='0';

attribute altera_attribute : string;
attribute altera_attribute of meta1:signal is "-name PRESERVE_REGISTER ON; -name SYNCHRONIZER_IDENTIFICATION FORCED_IF_ASYNCHRONOUS";
attribute altera_attribute of meta2:signal is "-name PRESERVE_REGISTER ON; -name SYNCHRONIZER_IDENTIFICATION FORCED_IF_ASYNCHRONOUS";
attribute altera_attribute of reg1:signal is "-name PRESERVE_REGISTER ON; -name SYNCHRONIZER_IDENTIFICATION FORCED_IF_ASYNCHRONOUS";
attribute altera_attribute of reg2:signal is "-name PRESERVE_REGISTER ON";


begin
reg: process(clk)
begin
if rising_edge(clk) then
meta1 <= d;
meta2 <= meta1;
reg1 <= meta2;
reg2 <= reg1;
edge <= (not reg1) and (reg2);
end if;
end process;
end EdgeDetector_rtl;

 

 

0 Kudos
FvM
Honored Contributor I
1,981 Views

Hi,

between the output of the LUT (combout) and the input of the FLOP (datain) there is a switch.
Can this switch not be switched to exclude the LUT?

as far as I understand, the datapath you are referring to has a specific dedication for SLOAD function. There's an optional register chain datapath, but I don't know if it's available in the present situation.

Basically fitter is selecting the best available datapath automatically, particularly considering timing constraints. Why do you worry about fitter results? 

0 Kudos
GOMEZ_IT
New Contributor I
1,976 Views
I don't need to achieve better results. 
I just wanted to understand if there are any constraints or attributes to pass to the
synthesizer to connect the registers as desired. Let's just say it's for educational purposes only
0 Kudos
FvM
Honored Contributor I
1,923 Views

Hi,
Quartus provides quite limited features to manually control fitting and routing results. Review this recent thread discussing a similar problem https://community.intel.com/t5/Intel-Quartus-Prime-Software/Altera-Register-Chain/m-p/1497097

Consider that Quartus is designed to fit complex circuits in an optimal way. You probably should take it as granted that it has no features to command a specific implementation of trivial circuits.

Even if you use wysiwyg_lcell low primitives to describe your circuit, it won't be necessarily exactly implemented as coded. The register cascade data path isn't even present in the lcell primitive.

0 Kudos
FvM
Honored Contributor I
1,833 Views

Hi,

I made an experiment with Cyclone 10 LP:

1. Implemented a register chain with cyclone10lp_ff wysiwyg primitives

2. Implemented a register chain with lpm_shiftreg
In both cases, datapath still goes through logic_cell_comb "reg feeder".

My guess, register chain path will be only used if logic_cell_comb is needed for other logic. Or it's not used by present Quartus versions at all.

0 Kudos
GOMEZ_IT
New Contributor I
1,811 Views
 
HI,

I also experimented with the wysiwyg primitives for cycloneive and 
I confirm that the feeder is always inserted with quartus_std_22.1. And trying to use certain pins of the flip-flop,
like sdata/sload, to try to force not to use the feeder,
quartus still ignores the mode in which I instantiated the primitive flipflop
and connects it as he wants, without giving errors or warnings!!
0 Kudos
sstrell
Honored Contributor III
1,722 Views

Have you tried removing the synchronizer identification attributes?  The Fitter may be adding the logic to preserve the synchronizer and maximize MTBF.  That might be what that logic is between the registers.

0 Kudos
GOMEZ_IT
New Contributor I
1,719 Views
Yes, I tried, but to no avail.
Does anyone have experience with direct register chains on cycloneive?
0 Kudos
sstrell
Honored Contributor III
1,718 Views

So even without any of the synthesis attributes, this is still happening?

0 Kudos
GOMEZ_IT
New Contributor I
1,706 Views

YES

0 Kudos
Reply