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: 
Explorer
Explorer
519 Views
Registered: ‎05-23-2017

A question about "write_cfgmem"

Jump to solution

I have two files and want to emberge them toghether to be on *.mcs file for configuring the flash (size : 32MB).

Here is the command I used:

write_cfgmem -format mcs -interface SPIx4 -size 32 -loadbit "up 0x0 alisha_xilinx.bit" -loaddata "up $::env(BITSIZE) bbl" -file $mcsfile -force

Addr1                   Addr2                              Date File(s)
0x00000000 0x0050554F Sep 23 19:08:09 2019 work-fpga/alisha_xilinx.bit
0x00600000 0x013DE27F Sep 26 11:30:30 2019 work-fpga/bbl

0 -rw-r--r-- 1 root root 54471800 Sep 26 11:30 alisha_xilinx.mcs

 

The total size of bbl + bit is around 20MB (x013DE27F) why the final size of mcs is around 54MB?

 

 

 

 

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Explorer
Explorer
423 Views
Registered: ‎03-31-2016

Re: A question about "write_cfgmem"

Jump to solution

The MCS is a encoded file type, it is not literally the bit for bit representation of what is in the flash.

If you could look at the content at the bit level of the MCS, with a hex viewer for example, it would NOT be the same as the bit level content of the flash.

Look at the Wikipedia article I referenced.

View solution in original post

5 Replies
Explorer
Explorer
495 Views
Registered: ‎03-31-2016

Re: A question about "write_cfgmem"

Jump to solution

Because it is an MCS file and not a raw binary.

MCS is ASCII (text) encoded so the data is at least doubled.  It also has some address and command bytes.  Look at the wikipedia article on the Intel HEX format.

Explorer
Explorer
452 Views
Registered: ‎05-23-2017

Re: A question about "write_cfgmem"

Jump to solution

@necare81 

 

Thanks a lot!

That makes sense.

One wired thing is the  capacity of QSPI flash on my FPGA board is just 32MB. While even I program this 54MB MCS file to the flash the vivado hardware manager complains nothing and told me the programming is successful.

There is no checking the size of the file and the capacity of the flash?

Or it just checks the *.bit file used for the FPGA configuration and not for others (bbl in my case used for linux booting)

Is this a bug?

 

 

0 Kudos
Highlighted
Explorer
Explorer
424 Views
Registered: ‎03-31-2016

Re: A question about "write_cfgmem"

Jump to solution

The MCS is a encoded file type, it is not literally the bit for bit representation of what is in the flash.

If you could look at the content at the bit level of the MCS, with a hex viewer for example, it would NOT be the same as the bit level content of the flash.

Look at the Wikipedia article I referenced.

View solution in original post

Moderator
Moderator
419 Views
Registered: ‎06-05-2013

Re: A question about "write_cfgmem"

Jump to solution
You can refer to these two ARs. Overhead in the mcs doesn't occupy the memory space.

https://www.xilinx.com/support/answers/43961.html
https://www.xilinx.com/support/answers/476.html

Thanks
Harshit
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Explorer
Explorer
342 Views
Registered: ‎05-23-2017

Re: A question about "write_cfgmem"

Jump to solution

Got it!

Thanks!

 

0 Kudos