Giter VIP home page Giter VIP logo

Comments (5)

widlarizer avatar widlarizer commented on August 17, 2024

Can you further describe your use case? Is this not feasible to do and control in your sources?

from yosys.

povik avatar povik commented on August 17, 2024

@Peter-Herrmann From a preliminary discussion we are unlikely to support a full-fledged stub command which would provide all of the nice-to-have features. Some elementary stubbing can be achieved with existing Yosys commands, and those we can extend if there's an important omission, but once the stubbing involves the generation of non-trivial logic, we prefer users write HDL for those cases over a specialized stub command.

That being said I think you should be able to stub-out foo and connect the B_o output to a constant with the following:

delete foo/* foo/x:* %d
connect -set B_o 0 foo

The first command deletes everything but the ports. The second connects a constant. I am not sure if there's a command to create a pass-through.

from yosys.

Peter-Herrmann avatar Peter-Herrmann commented on August 17, 2024

Can you further describe your use case? Is this not feasible to do and control in your sources?

The same effect could be achieved in the source code with the preprocessor, but that has a few problems at scale.

  • For very large designs, this can be extremely tedious, and custom automation scripts are the usual solution. Instead of everyone having custom scripts to automate stub generation, it would be nice to have at least one popular tool that has a natively supported solution.
  • It is often necessary to stub out third party IPs that we do not want to modify directly (wrappers can achieve this, but it clutters the design hierarchy and can introduce breaking changes to existing testbenches)
  • It can dramatically decrease readability of source files, especially for large designs with many ports. Having every module come with stubbing-out lines could as much as double the size of the code base.
  • Having a tool to generate stubs procedurally reduces maintenance (port changes don't need to be changed in every configuration) and reduces surface area for bugs.

from yosys.

Peter-Herrmann avatar Peter-Herrmann commented on August 17, 2024

once the stubbing involves the generation of non-trivial logic, we prefer users write HDL for those cases over a specialized stub command.

I think this is a very reasonable stance.

Some elementary stubbing can be achieved with existing Yosys commands

I will try your suggestions out, this may be enough for my needs. Thank you!

from yosys.

povik avatar povik commented on August 17, 2024

I noticed I have mistyped the sample commands (the module name would be foo not top), see now

from yosys.

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.