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

Very slow clock should be constraint as false path?

Armando1989
Novice
295 Views

Hi there

Ive just created project in which 1200bps rs232 data is sampled and then loaded into 8 paralel registers to leds. All registers but the final latch are driven by 50MHz board, but set clk_enable siganl which is 1200Hz, avoiding as far as i could clock domain cross. It seems working fine based on simulations and timing results.

However my question is, basically quartus considers register on image a clock for sure:

Armando1989_0-1726049529682.png

Armando1989_1-1726049676467.png

 

however that clock is just the latch signal to the output registers and happens only 1200hz/11 at most because its only active when new rs232 8 bit data has been captured... I cannot create such a low "derived" clock  on constraints as it says divide factor is out of range.

Should be considered false path between clk and output of Word registers?

Im not quite sure how to cover that constraint right now.

Thanks in advance

BR

 

Labels (1)
0 Kudos
1 Solution
sstrell
Honored Contributor III
235 Views

The problem is that you are using DONE as a clock signal.  It's not.  You should just create combinatorial logic or better yet synchronize the loading of word with clk.

always @(negedge clk) begin
   if (reset) begin
       word<=0;
   end
   else if (DONE && clk_enable) begin
       word<=tmp[7:0];
   end
end

 

View solution in original post

10 Replies
sstrell
Honored Contributor III
266 Views

You may be able to get away with false pathing it, but how is it coded?

Armando1989
Novice
249 Views
Hi ssteell thanks in advance
Im not quite sure you mean with "how is it coded". If u need i can post verilog code for that module.
Br
0 Kudos
sstrell
Honored Contributor III
247 Views

Yeah, I mean seeing how you coded the signal to understand its behavior.

Armando1989
Novice
240 Views

Here u have

Thanks!

0 Kudos
sstrell
Honored Contributor III
236 Views

The problem is that you are using DONE as a clock signal.  It's not.  You should just create combinatorial logic or better yet synchronize the loading of word with clk.

always @(negedge clk) begin
   if (reset) begin
       word<=0;
   end
   else if (DONE && clk_enable) begin
       word<=tmp[7:0];
   end
end

 

Armando1989
Novice
150 Views

Hi

Yep that did the trick, i guess is just apply same logic ive just being doing with clk_enable to maintain just clk 50MHz domain.

One drawback i see using sclock enable method is: Capture window gets quite short and cannot be extended by more than one 50Mhz cycle, since your FSM is sampling 1200Hz data once at a time, u cannot extend capturing window ie: 2x50MHz clocks, as would sample more than 1 time each 1200Hz sample and FSM will missbehave.

When have to sync 2 signals between fsm and capturing module as below, with that capturing window there is little space and hold time constraint gets worse of course. Below there is  half 50MHZ clk 10ns. The reason of "50MHz negedge" for DONE is just to have room for the GO signal to set low just within one 50MHz clk :D.

Armando1989_0-1726124796337.png

Thanks!

0 Kudos
sstrell
Honored Contributor III
119 Views

You could use a counter to keep track of a signal level for multiple clock cycles.  Or you could use a multicycle timing exception to have the timing analysis extended an extra cycle if you can't change the design.

Armando1989
Novice
101 Views

Hi Sstrell

1-"You could use a counter to keep track of a signal level for multiple clock cycles"-->that not sure how, my FSM is sampling the 1200baud data for each 1200Hz clock enable pulse (one 50MHz clock every 1200Hz) . 

2-"Or you could use a multicycle timing exception to have the timing analysis extended an extra cycle if you can't change the design"-->in my case as u see my capture window is half 50Mhz clock, FSM samples on rising edge and capturer on falling edge, so cannot apply multicycle between both modules.

 

JFYI let u the simple FSM code, u can see what i mean..  For your porpossal might need to modify FSM increasing number of states it stays as GO=0 and GO=1, sampling several clock cycles like a sequence detector, ie: detect 2 zeroes triggers start bit then move to state RUN...?. Of course would need also to enlarge the clock enable width for the appropiate window... lets say... 4X50MHz clk´s each 1200Hz...

Now FSM is just simple IDLE<-->RUN...

 

As u see im just trying to learn and enhace, even timing is acceptable around 112MHz, slack is also ok...

Thanks for your share and time in advance!.

BR

 

0 Kudos
FvM
Honored Contributor I
90 Views
Hi,
some improvements suggested. Presume rs232 input data is asynchronous to FSM clock. Then a certain rate of FSM failure must be expected, worst case a non-recoverable transition to an illegal state. It's necessary to add a synchronizer register chain for data.
Armando1989
Novice
84 Views
Hello FVM
No worries, rs232 input signals are pass trough 2 flop synchronizers, just are spare modules outside.
Br
0 Kudos
Reply