cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Scholar
Scholar
3,685 Views
Registered: ‎04-07-2008

Are there ways to do conditional compilation of MHS and UCF

Jump to solution

Hi,

 

  We would like to take a ML510 system design and a corresponding custom board design (similar but with differences).

 

And create a single project that can accomodate both designs.  Using something similar to what is C Code.

 

such as #ifdef  and #ifndef.   

 

We would like to so this in the UCF file and also maybe not as important but would be helpful if we could do this also

in the MHS file since the files will be different as well.

 

Thank You,

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
4,382 Views
Registered: ‎02-01-2008

A long time ago I created a perl script to do this. I've attached the perl script and it contains some usage info in the comment section. Use at your own risk. This script is by no means supported by Xilinx.

 

Using the script, you would have your master ucf/mhs. Add your #ifdef, #ifndef, #else, #endif, #include to this master file. Then run the script on the master file with the defines that you want the #if... statements to react on. The script will output a new file that has the apropriate blocks of ucf/mhs commented out.

 

Let me know if it works out for you.

 

 

View solution in original post

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
4,383 Views
Registered: ‎02-01-2008

A long time ago I created a perl script to do this. I've attached the perl script and it contains some usage info in the comment section. Use at your own risk. This script is by no means supported by Xilinx.

 

Using the script, you would have your master ucf/mhs. Add your #ifdef, #ifndef, #else, #endif, #include to this master file. Then run the script on the master file with the defines that you want the #if... statements to react on. The script will output a new file that has the apropriate blocks of ucf/mhs commented out.

 

Let me know if it works out for you.

 

 

View solution in original post

0 Kudos
Highlighted
Scholar
Scholar
3,671 Views
Registered: ‎04-07-2008

Hi John,

  Thank you for the script.  I will give it a try.  I am not too familiar with perl yet.  I took the Idea

from this script and created a C file to do something similar to this. 

Thank You,

  Gary

 

 

0 Kudos