UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer rmogster
Observer
690 Views
Registered: ‎12-12-2017

Script to generate mcs

Jump to solution

I have a tcl script that I run to compile my project.  Everything works great until I get to the very end.

The tcl command to generate the mcs file fails because it can't find the bit files.  Sine this is a tcl script, I heave used several "set" commands to define the file paths.  The tcl command I use to generate the mcs file does not work with the "set" paths.

 

The following command fails, tool claims it can't find the file reaper_gold.bit.

 

write_cfgmem -force -format mcs -size 32 -interface SPIx1 -loadbit {up 0x00000000 "$bit/reaper_gold.bit" up 0x01000000 "$bit/reaper_silver.bit" } -file "$bit/reaper.mcs"

 

The following command works, where I expanded the definition for $bit.

 write_cfgmem -force -format mcs -size 32 -interface SPIx1 -loadbit {up 0x00000000  "C:/Xilinx_projects/Spaceflight/reaper/lay/reaper.runs/impl_1/reaper_gold.bit" up 0x01000000  "C:/Xilinx_projects/Spaceflight/reaper/lay/reaper.runs/impl_1/reaper_silver.bit" } -file "$bit/reaper.mcs"

 

The tcl script has to be protable over several different machines, so the path cannot be hard coded.  

How do I make this work?

 

Thank you,

Rolf

0 Kudos
1 Solution

Accepted Solutions
Xilinx Employee
Xilinx Employee
962 Views
Registered: ‎01-10-2012

Re: Script to generate mcs

Jump to solution

Hi @rmogster

 

The parameters for write_cfgmem seems to expect absolute paths  hence you are running into issues.

 

Alternatively why don't you use something like this:

 

set bit_path "C:/Xilinx_projects/Spaceflight/reaper/lay/reaper.runs/impl_1
cd $bit_path
write_cfgmem -force -format mcs -size 32 -interface SPIx1 -loadbit {up 0x00000000 "./reaper_gold.bit" up 0x01000000 "./reaper_silver.bit" } -file "./reaper.mcs"

0 Kudos
2 Replies
Xilinx Employee
Xilinx Employee
963 Views
Registered: ‎01-10-2012

Re: Script to generate mcs

Jump to solution

Hi @rmogster

 

The parameters for write_cfgmem seems to expect absolute paths  hence you are running into issues.

 

Alternatively why don't you use something like this:

 

set bit_path "C:/Xilinx_projects/Spaceflight/reaper/lay/reaper.runs/impl_1
cd $bit_path
write_cfgmem -force -format mcs -size 32 -interface SPIx1 -loadbit {up 0x00000000 "./reaper_gold.bit" up 0x01000000 "./reaper_silver.bit" } -file "./reaper.mcs"

0 Kudos
Observer rmogster
Observer
659 Views
Registered: ‎12-12-2017

Re: Script to generate mcs

Jump to solution

that works.

0 Kudos