cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
844 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
Highlighted
Xilinx Employee
Xilinx Employee
1,116 Views
Registered: ‎01-10-2012

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"

View solution in original post

0 Kudos
2 Replies
Highlighted
Xilinx Employee
Xilinx Employee
1,117 Views
Registered: ‎01-10-2012

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"

View solution in original post

0 Kudos
Highlighted
Observer
Observer
813 Views
Registered: ‎12-12-2017

that works.

0 Kudos