Freedom U500 VC707 Error while flashing


#1

Hi all,
I have been following “SiFive Freedom U500 VC707 FPGA Getting Started Guide” to boot linux on Virtex-7 FPGA VC707 board. I’m getting the following error when i’m trying to flash .mcs and .prm files

MCS programming start address 0x06000000 should be a multiple of the flash program buffer size (20971520/0x1400000 bytes).
ERROR: [Labtools 27-3161] Flash Programming Unsuccessful
ERROR: [Common 17-39] ‘program_hw_cfgmem’ failed due to earlier errors.

I am using Windows(10) OS and Vivado 2016.1 Lab edition . I have connected both UART and JTAG cables to the board. I have set VC707 boot mode as suggested. But i don’t have “HiTechGlobal X8 PCI Express Gen1/2/3 FMC Module (Vita57.1)” as mentioned in guide.

I would appreciate some guidance on how to solve the error.


(Meadhbh Hamrick) #2

Hi @sunb,

Hmm… I just did this successfully on Linux. Might be worth it to double check the sha1 hashes vs the files you have:

$ sha1sum *
8774928848a7e28300dc9f63765b50e664dde438 freedom-u500-vc707-0-1.mcs
69c07aadcf24399faadabde3b270877925158f86 freedom-u500-vc707-0-1.prm

Also, I had some issues with switch settings in the past, but it didn’t give those exact errors. And I know vivado will emit a program_hw_cfgmem sometimes with uncompressed memory images (but if you’re using the .mcs file from the SiFive, this shouldn’t be the case.)

Can you flash a different .mcs file? Maybe there’s some config problem with the board or with your PC?

As chance would have it, I’m reflashing my VC707 later this evening. If you’re still having problems… I have a windows machine somewhere with the vivado toolchain somewhere. I’ll see if it’s 2016.1 and try it from there and take notes.

-Cheers
-M


#3

hi @mhamrick,

Thank you for your prompt reply. The sha1 hashes of my files matches with the values that you have mentioned.

I have tried flashing different .mcs files( downloaded from Freedom U500 VC707 FPGA Dev Kit Bitstream, all three versions) and I’m getting the same error.

Apart from setting VC707 boot mode as suggested in the guide, I haven’t done any other configuration on the board. On PC(Windows 10) side, after launching Vivado(2016.1 Lab edition), I clicked on “Open Hardware manager”->“Open Target”->“Auto Connect” which automatically connected to the hardware.

I have tried installing Vivado(2016.1 Lab edition) on Ubuntu(14.04 64-bit) but i was unable to find the compatible drivers. With no drivers target hardware is not getting detected.

Could you please let me know whether you have tried it.

Thanks ,
sunb.


(Megan A. Wachs) #4

As a sanity check, you selected the following SPIFlash parameters, correct?

59 AM


(Henry Styles) #5

This is orthogonal to your MCS programming issue - but if you do not have the PCIe FMC card, the pre-compiled bitstream will not boot Linux. The reset circuit waits for the MMCM in the PCIe IP to lock, which never happens because there is no PCIe REFCLK coming in from the PCIe FMC card.

To run without the FMC module, you should rebuild the bitstream from the following branch :


#6

Hi @mwachs5,

Thank you for your reply.

Yes, the parameters are correct. I have selected the same SPIFlash paramaters.

I have done Built-in-self test on board before flashing and the board seems to be working fine.

The problem might not be with .mcs file because i have checked sha1sum of the files as suggested by @mhamrick , the values are matching. Also I have tried flashing different .mcs files and I’m getting same error.

Need some help to solve this problem.


#7

Hi @henrystyles,

Thank you for your reply. I will keep that in mind :slight_smile:


(Meadhbh Hamrick) #8

And more news. I was finally able to install vivado on windows and can verify flashing from windows and linux both worked fine for me.


#9

hi @mhamrick
Thanks for your reply. We finally found out that the problem is with board hardware.

We were able to flash bitstream in new VC707 board :slight_smile:


#10

Hi @henrystyles,
I have tried to rebuild the bit-stream from the no-pcie-2 branch but was facing some problems with downloading some repos like qemu. Similar to below error

            _Cloning into 'env'..._
            _fatal: unable to connect to github.com:_
           _github.com[0: 192.30.253.113]: errno=Connection refused_
           _github.com[1: 192.30.253.112]: errno=Connection refused_

I have updated my global gitconfig file as below

           _[url "https://git.qemu.org/git"]_
           _insteadOf = https://git.qemu-project.org_

           _[url "https://git.qemu.org/git"]_
          _insteadOf = git://git.qemu-project.org_

          _[url "https://github.com/"]_
         _insteadOf = git://github.com/_

       _[url "https://github.com/"]_
        _insteadOf = git@github.com:_

      _[url "https://anongit.freedesktop.org/git"]_
      _insteadOf = git://anongit.freedesktop.org_

After updating, downloading of all sub modules was successful

But when i run

make -f Makefile.u500vc707devkit verilog

I am getting following errors

[warn] ~/.sbt/preloaded/edu/berkeley/cs/hardfloat_2.12/1.2/hardfloat_2.12-1.2.pom
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: edu.berkeley.cs#chisel3_2.12;3.2-SNAPSHOT: not found
[warn] :: edu.berkeley.cs#hardfloat_2.12;1.2: not found
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] edu.berkeley.cs:chisel3_2.12:3.2-SNAPSHOT
[warn] ± edu.berkeley.cs:rocketchip_2.12:1.2
[warn] edu.berkeley.cs:hardfloat_2.12:1.2
[warn] ± edu.berkeley.cs:rocketchip_2.12:1.2
[error] sbt.librarymanagement.ResolveException: unresolved dependency: edu.berkeley.cs#chisel3_2.12;3.2-SNAPSHOT: not found
[error] unresolved dependency: edu.berkeley.cs#hardfloat_2.12;1.2: not found
[error] at sbt.internal.librarymanagement.IvyActions$.resolveAndRetrieve(IvyActions.scala:331)
[error] at sbt.internal.librarymanagement.IvyActions$.$anonfun$updateEither$1(IvyActions.scala:205)
[error] at sbt.internal.librarymanagement.IvySbt$Module.$anonfun$withModule$1(Ivy.scala:243)
[error] at sbt.internal.librarymanagement.IvySbt.$anonfun$withIvy$1(Ivy.scala:204)
[error] at sbt.internal.librarymanagement.IvySbt.sbt$internal$librarymanagement$IvySbt$$action$1(Ivy.scala:70)
[error] at sbt.internal.librarymanagement.IvySbt$$anon$3.call(Ivy.scala:77)
[error] at xsbt.boot.Locks$GlobalLock.withChannel$1(Locks.scala:95)
[error] at xsbt.boot.Locks$GlobalLock.xsbt$boot$Locks$GlobalLock$$withChannelRetries$1(Locks.scala:80)
[error] at xsbt.boot.Locks$GlobalLock$$anonfun$withFileLock$1.apply(Locks.scala:99)
[error] at xsbt.boot.Using$.withResource(Using.scala:10)
[error] at xsbt.boot.Using$.apply(Using.scala:9)
[error] at xsbt.boot.Locks$GlobalLock.ignoringDeadlockAvoided(Locks.scala:60)
[error] at xsbt.boot.Locks$GlobalLock.withLock(Locks.scala:50)
[error] at xsbt.boot.Locks$.apply0(Locks.scala:31)
[error] at xsbt.boot.Locks$.apply(Locks.scala:28)
[error] at sbt.internal.librarymanagement.IvySbt.withDefaultLogger(Ivy.scala:77)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:199)
[error] at sbt.internal.librarymanagement.IvySbt.withIvy(Ivy.scala:196)
[error] at sbt.internal.librarymanagement.IvySbt$Module.withModule(Ivy.scala:242)
[error] at sbt.internal.librarymanagement.IvyActions$.updateEither(IvyActions.scala:190)
[error] at sbt.librarymanagement.ivy.IvyDependencyResolution.update(IvyDependencyResolution.scala:20)
[error] at sbt.librarymanagement.DependencyResolution.update(DependencyResolution.scala:56)
[error] at sbt.internal.LibraryManagement$.resolve$1(LibraryManagement.scala:46)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$12(LibraryManagement.scala:99)
[error] at sbt.util.Tracked$.$anonfun$lastOutput$1(Tracked.scala:68)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$19(LibraryManagement.scala:112)
[error] at scala.util.control.Exception$Catch.apply(Exception.scala:224)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11(LibraryManagement.scala:112)
[error] at sbt.internal.LibraryManagement$.$anonfun$cachedUpdate$11$adapted(LibraryManagement.scala:95)
[error] at sbt.util.Tracked$.$anonfun$inputChanged$1(Tracked.scala:149)
[error] at sbt.internal.LibraryManagement$.cachedUpdate(LibraryManagement.scala:126)
[error] at sbt.Classpaths$.$anonfun$updateTask$5(Defaults.scala:2383)
[error] at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error] at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:39)
[error] at sbt.std.Transform$$anon$4.work(System.scala:66)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:262)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error] at sbt.Execute.work(Execute.scala:271)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:262)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:174)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:36)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error] (ProjectRef(uri(“file:/xxx/xxx/xxx/no-pcie/freedom/rocket-chip/”), “rocketchip”) / update) sbt.librarymanagement.ResolveException: unresolved dependency: edu.berkeley.cs#chisel3_2.12;3.2-SNAPSHOT: not found
[error] unresolved dependency: edu.berkeley.cs#hardfloat_2.12;1.2: not found

A quick google search lead to an answer(the answer is specific to chisel but not to sifive freedom u500) which says that the error might be because of mismatch of scala version. But scala version of project (top level build.sbt) and rocket-chip(sub module repo build.sbt) seems to be same.

top level build.sbt:

      _scalaVersion := "2.11.12",  // This needs to match rocket-chip's scalaVersion;_

rocket-chip build.sbt

           _scalaVersion := "2.12.4",_
          _crossScalaVersions := Seq("2.12.4", "2.11.12"),_

How to solve this error? Any help will be greatly appreciated :slight_smile: