Hardware Project Update

in open •  4 years ago 

From: https://github.com/ucb-bar/chipyard/issues/109

In the discussion on #641, @jerryz123 and I talked about the proper form of a Chipyard Docker image.

After several days of fiddling, I think my thoughts have changed. Arch Linux has high quality precompiled binaries for the riscv toolchain, and they're kept up to date. With https://gitlab.com/virgohardware/core I'm trying to make it as easy as possible to:

  • modify / create an SOC
  • build the SOC
  • test the SOC
  • compile Linux for the SOC
  • run linux on it in simulation
  • run linux on it using a cloud FPGA, probably using fire.sim
  • download FPGA bitstreams for user-owned FPGAs
  • prep the core for manufacturing and download the needed binaries for that

Why do I now favor Arch and precompiled RISCV Tools?

It's the build times, and horsepower needed for a build.

A complete image is going to contain:

  • Chipyard
  • Risc-v tools
  • esp tools
  • riscv-linux

....that's an incomplete list but those make up the majority of the build time. I'd like for users to be able to use the exact same build environment as CI, so that there's no question about "if it builds on my PC or dev server, will it also build in the core CI system?"

@jerryz123 recommended to go with the versions released as submodules in Chipyard, as there could be compatibly issues.

I am new-ish to RISC-V and semiconductors, but I am now thinking that it may be easier to get to this "end state goal" of fast dev env setups weather building a Docker image locally or pulling a Docker image from our registry or somewhere else by testing:

currently:

My arch-based Dockerfile can build every core in master, no tests.
My ubuntu-based Dockerfile does not work, it dies during the riscv-tools setup

What I am going to pursue:

  • Validate these functions on Arch:
    • Build
    • test in sim
    • build for fpga
    • build for manufacturing

Most open core projects and their HDLs have great documentation, but the development environment setup is both time consuming and complex.

I currently have Arch-based Docker images for:

  • Bluespec
  • Chipyard
  • SpinalHDL

Currently, I'm not using tools like ccache and maybe distcc though I was for a while and I plan to add them again.

The feeling of creating an SOC from upstream modules and knowing that it could actually be built one day (though the 0.0.1 was not at all practical) was incredible!

I would like to help others do that (and more) without spending quite as much time on figuring out the development environment and how to start, and I have an inkling these Arch images will help because they'll drastically reduce setup times.

but--

what do you think?

:)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!