Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15323 Discussions

Constraining signal on FPGA output

Erlend
Beginner
297 Views

Hi

I am currently working on a ADC driver interface and I have come across the following timing requirement for the chip-select signal. My sclk is running at 50MHz, 20ns time period. Notice that both sclk and n_cs is driven by the FPGA, while the requirements are seen from the ADC.

Erlend_0-1619161032417.png

As we can see, there is one requirement for rising edge of n_cs and another for the falling edge. 

 

Erlend_5-1619163318271.png

In my current implemented solution, the n_cs signal is

- set low on sclk rising edge

- set high on sclk falling edge

Erlend_7-1619164635938.png

This functionality is implemented using a combination of two processes, one for rising_edge(sclk), while a delayed signal is created using falling_edge(sclk). (VHDL)

The sclk is also used as output to the ADC, and is properly constrained as a 50MHz clock internally and as a generated (virtual) clock on the FPGA output pin.

My problem is that I do not understand how n_cs should be constrained on the FPGA output. 

Using the chosen topology,  would it be enough for the n_cs signal to have the same propagtaion delay to the FPGA pin as sclk (assuming equal PCB trace delay for sclk and n_cs)? In that case, how would I go about setting up such a constraint?

I would appreciate any insight into this problem.

 

0 Kudos
6 Replies
sstrell
Honored Contributor III
264 Views

Can you show the SDC you have so far?

n_cs is just an output so you would use set_output_delay.

Erlend
Beginner
258 Views

Hi Sstrell.

 

The following constraints applies for the driver clock and the n_cs output port:

 

# First, a 50Mhz clock is made by toggeling the clk_50 register in a 100MHz process. The 50 Mhz clock source is constrained as follows:
# Define 50 MHz clock source, derived from 100MHz clock
create_generated_clock -name CLK_50MHZ -source {*|pll1|clk[2]} -divide_by 2 [get_registers {*clk_50}]

 

# The 50 MHz clock is used for the driver logic and to drive the CS1_AD_CLK output FPGA pin
# Create virtual clock on SCLK output pin. This virtual clock is the referance point for Signals to and from the ADC.
create_generated_clock -name ADC_SCLK -source [get_registers {*clk_50}] -divide_by 1 [get_ports {CS1_AD_CLK}]

 

# The following constraint is a placeholder for the proper output constraint..
set_false_path -from * -to [get_ports {CS1_AD_NCS}]

 

sstrell
Honored Contributor III
249 Views

First, I'm assuming CS1_AD_NCS is the output port for n_cs.  As such, you should not have a false path on it (you do mention that's a placeholder).  You should, however, have a false path on the clock output so it is not analyzed as a data output (should only be analyzed as a clock).

Then you need set_output_delay for n_cs to tie your output clock to the n_cs output.  This is basically a source synchronous output interface.  Assuming you're matching the trace lengths for the clock and n_cs, constraints might look like this:

set_output_delay -max 7 -clock [get_clocks ADC_SCLK] [get_ports CS1_AD_NCS] -clock_fall

set_output_delay -min -8 -clock [get_clocks ADC_SCLK] [get_ports CS1_AD_NCS]

 

SyafieqS
Moderator
190 Views

Hi Erlend,


Any updates?


Erlend
Beginner
182 Views

Hi, and sorry for the missing reply!

 

I was thrown into another project temporarely and will come back to this problem during the next couple of weeks.

SyafieqS
Moderator
162 Views

Since you need more time on this. I will put to close pending and you may reopen this in future or simply create new case.


Reply