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

Can you force synthesis of registers?

SparkyNZ
New Contributor II
3,124 Views
bit [ 11 : 0 ] colorRGB[ 7 : 0 ];
bit [ 11 : 0 ] tempRGB;
..
tempRGB = colorRGB[ dataH ];
..
dataR = tempRGB[ 11 : 8 ];

When the above  code is synthesized, tempRGB does not appear in the RTL Viewer. It has been optimized/removed from the synthesized design.

Is there a way to force Quartus into synthesizing registers? ie. Is there a keyword I can use so that tempRGB must appear in my design?

0 Kudos
1 Solution
KhaiChein_Y_Intel
2,935 Views

Hi,


You may change to below:

     if( ( hcount >= hdat_begin ) && ( hcount <= hdat_last ) )

     begin

       

      if( hcount[ 0 ] == 0 )

      begin

       tempRGB <= colorRGB[ dataH ];


      end

      else

      begin

       tempRGB <= colorRGB[ dataL ];

      end


      dataR <= tempRGB[ 11 : 8 ];

      dataG <= tempRGB[ 7 : 4 ];

      dataB <= tempRGB[ 3 : 0 ];

     end


Thanks

Best regards,

KhaiY


View solution in original post

21 Replies
ak6dn
Valued Contributor III
452 Views

It is critical to understand the difference between blocking (=) and non-blocking (<=) assignments.

Blocking assignments work just like, for example, programming in C with assignments. So:

B = A;
C = B;
D = C;

at the end D will have whatever value A had in it. Computations and assignments strictly follow sequentially.

However, in a non-blocking sequence:

B <= A;
C <= B;
D <= C;

each right hand side gets evaluated with the current values of the variables, but no assignment is performed. Once all right hand sides are evaluated, then, at the end of the event block, all the computed right hand sides are stored in the corresponding left hand sides.

So the above sequence will take 3 time states to propagate the initial value in A to the final register D.

0 Kudos
Reply