Giter Site home page Giter Site logo

Comments (6)

eugene-tarassov avatar eugene-tarassov commented on June 19, 2024

I believe you need to put cache parameters before new WithNSmallCores(1) ++
Alternatively you can define your own class instead of WithNSmallCores - this is the class that sets cache parameters.

Is there any method or tool that I could use to verify the resulting cache size?

Yes, just look into generated device tree file - system.dts

from vivado-risc-v.

cassebas avatar cassebas commented on June 19, 2024

Thank you! That was it. I was able to generate small cores with other cache sizes.
However, I can't seem to connect to the target when I use a core with a modified cache size.

With the 'normal' WithNSmallCores (unmodified caches) I get from the UART:

RISC-V 32, Boot ROM V3.7
Cannot access SD: Timeout
Cannot mount SD: Disk not ready

RISC-V 32, Boot ROM V3.7
adpcm_dec start
adpcm_dec stop
adpcm_dec cycles cold cache 8081
adpcm_dec cycles warm cache 5973

(This is a benchmark from tacle-bench, which I compiled with riscv toolchain and added some measurements.)

xsdb gives me:

xsdb% connect
tcfchan#0
xsdb% target
  1  xc7k325t
     2  RISC-V
        3  Hart #0 (Running)
xsdb%

But when I program my core with modified cache, I do get the output from the boot rom. But I cannot connect to the target, the Hart is not listed.

xsdb% connect
tcfchan#0
xsdb% target
  1  xc7k325t
xsdb%

Do you have any ideas?

from vivado-risc-v.

cassebas avatar cassebas commented on June 19, 2024

I have now tried to boot my (bare-metal) program from the SD-card. Since I used the mk-sd-card script, it was easier to boot from a 64-bit bootloader/program, so I moved to the Rocket64b1 core. When I boot from the SD-card, my program always runs fine.

But when using xsdb, I can only connect to the Hart #0 on a core with unmodified cache sizes. Again, when I modify the cache size (both ICache and DCache, e.g. 32K or 64K) then the Hart #0 (Running) won't show.

Hope you have some pointers on how to investigate this. Using xsdb is a lot more friendly than the SD card :-)

from vivado-risc-v.

eugene-tarassov avatar eugene-tarassov commented on June 19, 2024

the Hart #0 (Running) won't show

I cannot reproduce. I tried this config:

class Rocket32s1 extends Config(
  new WithNBreakpoints(8) ++
  new WithL1ICacheSets(16) ++
  new WithL1ICacheWays(1) ++
  new WithL1DCacheSets(16) ++
  new WithL1DCacheWays(1) ++
  new WithNSmallCores(1)  ++
  new WithRV32            ++
  new Rocket32BaseConfig)

xsdb appears working fine.
What version of Vitis do you use?

from vivado-risc-v.

cassebas avatar cassebas commented on June 19, 2024

I use Vitis 2022.2. I must say I don't use Ubuntu, but Archlinux.

I decided to try to build the bitstreams on another machine, and they seem to be running fine.

A difference between the two machines was that on the one that wasn't building OK, I had a separate sbt and scala installed. I removed them, and now this machine also seems to build OK.

I'm still not sure whether this was the solution. The cores that I have built today do run my benchmarks, but strangely I don't see the bootrom printing messages anymore.

Is it safe to follow your most recent master branch? Or should I switch to one of your releases?

Thanks for your help!

from vivado-risc-v.

eugene-tarassov avatar eugene-tarassov commented on June 19, 2024

Vitis 2022.2 should be OK.
Yes, it is safe to follow the master branch.
I have test automation running continuously, and I push to github only when tests are passing.

but strangely I don't see the bootrom printing messages anymore

Most likely it is issue with serial port setup on your host machine.
I have seen a lot of bugs in USB/Serial drivers on both Linux and Windows.

from vivado-risc-v.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.