Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers

SDC FIle

Altera_Forum
Honored Contributor II
1,305 Views

HI, 

 

Can I use two .sdc files.... in different folders....  

 

Let us say I have two folders 1) Base_clock 2)Derived Clock 

 

In the folder named "Base_clock" I keep all the settings for base clock.... 

In the folder named "Derived_clock" I will generate the seconday clock which is generated from the base clock...  

 

If I use " set_global_assignments -name SDC_FILE " option to locate both the .sdc files in different folders .... The second file is over writing the first one....  

 

Please let me know how to use with this set up...  

 

 

Thanks, 

Srinath.
0 Kudos
4 Replies
Altera_Forum
Honored Contributor II
354 Views

You can add several sdc files via Assignments->Setting -->Files. This is what I do when using Altera MegaWizard generated IP like e.g. a DDR2 controller.

0 Kudos
Altera_Forum
Honored Contributor II
354 Views

HI, 

 

I am using tcl command flow.....  

 

When I give the command as shown below ... 

 

execute_module -tool sta -args "--sdc=$PROJECT_PATH/Synth/Constraints/$PROJECT.sdc --sdc=$PHY/derived_clk.sdc " 

 

the second .sdc file is being used .... the first one is never been considered ,....  

 

Please let me know how to include both the files for the project.... 

 

Expecting a early response ...  

 

 

Thanks,
0 Kudos
Altera_Forum
Honored Contributor II
354 Views

I have no expertise in 'tcl command flow' ... 

You can also manually add the two .sdc files in the project's .qsf file using e.g. 

set_global_assignment -name SDC_FILE file1.sdc 

set_global_assignment -name SDC_FILE file2.sdc
0 Kudos
Altera_Forum
Honored Contributor II
354 Views

SDC files are not something that need to be added every time. They get stored in the .qsf for the project so you might as well add them there. (If you had multiple .sdc files, it would make sense, but that's seldom done). There are tons of settings for a compile, so it's not recommended to add them all as command line options, especially if they're static. 

 

If you are changing something a lot, what I've seen and like is creating a .tcl file rather than a shell file, like so: 

project_open top 

set_global_assignment -name SDC_FILE file1.sdc 

set_global_assignment -name SDC_FILE file2.sdc 

qexec "quartus_map ..." 

qexec "quartus_merge ..." 

project_close 

... 

 

You then execute the file at a prompt with quartus_sh -t script.tcl 

 

As you can see, all the commands you normally run at a command prompt like quartus_map and quartus_merge have been moved to be the arguments of qexec. This allows you to enter/modify anything you want for the open project. 

 

Note that everything is stored in the .qsf though. It's not like the project is built from scratch each time, and the .sdc files are in there. I find this more useful if experimenting with settings that change, but you have to remove/modify settings through the script to really take them away. (And most settings are just more intuitive to modify through the GUI. I've worked with some die-hard command line people, but pretty much all agree the Quartus GUI has a lot of advantages that make it worthwhile to open, if just now and then...)
0 Kudos
Reply