Giter VIP home page Giter VIP logo

Comments (5)

olofk avatar olofk commented on July 17, 2024

This touches upon two things that I have been thinking about quite a lot but never written down.

The first thing is detecting tool versions. We have other cases where we want to work around bugs in the tools (such as $clog2 being broken in different ways in different Xilinx tool versions). For this I think we should add a function to each backend to query the version.

The second thing is conditionals. There are lots of places where we could benefit from conditional inclusions, so I don't think we want to limit this just to filesets. We could basically support this for any string list in the .core files. My idea has always been to model this around Gentoo's conditional syntax, and in the long run also add support for Gentoo style use flags in the .core files, which is somewhat related. This would for example allow us to have conditional dependencies, or setting different tool parameters depending on which flags that are set. I'm not sure however how complicated this would be to implement, and this is partly why I haven't started working on it.

I'm not stuck on my original idea, but I want something that can encompass the different potential use cases that I have thought about. We should brainstorm a bit here and try to come up with some ideas here.

from fusesoc.

wallento avatar wallento commented on July 17, 2024

I am thinking about using branches and versioning, but also that does not really lead to a good scalable solution.

from fusesoc.

olofk avatar olofk commented on July 17, 2024

Actually, I just got an idea here. In the long term I still want the useflags solution, but I got something that's easy to implement and would solve a class of problems

All filesets have a set of usage flags. The recognized values are currently which type of flow (i.e. sim, synth) or the toolname (i.e. icestorm, ise, quartus, vivado, ghdl, icarus, modelsim, verilator, xsim) These flags are set internally by FuseSoC depending on the flow. What we could do is to allow users to set extra flags on the command line, and add these to the filesets. In your example we could set usage = mig2 on one fileset and usage = mig3. It's then up to the user to set the correct flags. By using a pre-build script we could perhaps even check that one of the flags are set before running

This would solve another class of problems that I have had, where I want to switch between generic and Altera-specific implementations of some primitives when I do a modelsim simulation.

It could look something like this

fusesoc --usage=mig3,xilinx_rams,bloated_cpu build nexys4

We could perhaps even allow negations, so that certain filesets are excluded if a flag is set, like usage = sim -mig3. Probably need to define some rules for that though, so maybe later. What do you think?

from fusesoc.

Fatsie avatar Fatsie commented on July 17, 2024

I am now playing with some 8-bit cores on freecores (T80 and T65). Coming from a software background I am surprised/confused by how unportable RTL seems to be between different platforms.
One of the things I would like to have and help implement is generic RAM, ROM, register file blocks. The proposed usage directive is possible usable for that. I would like to limit the need for command line specification of the usage though. IMO, a generic 2048x8 RAM should use optimal implementation for given FPGA or ASIC without the need of specifying a usage on the command line; or do you want to move it to a tool on a higher level than fusesoc ?

from fusesoc.

olofk avatar olofk commented on July 17, 2024

Sorry for the late reply. My answer was becoming a bit longer than I had first intended, so I decided to address this in a blog post instead http://olofkindgren.blogspot.com/2017/01/the-dream-of-hdl-standard-libraries.html

One thing that is not answered in the blog is how to make FuseSoC aware of which implementation to use without manually specifying it. As a first step, I think we could write down the use flags that should be used in the top-level core file, so we don't need to specify them on the command line. In the long run I would like to have a somewhat more clever approach, but this should at least address the most common cases.

Also, I should let you know that I've started looking into the use flags implementation now. It's on top of the priority list and will hopefully be incorporated into FuseSoC soon, if I find the time to work on it

from fusesoc.

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.