Coder Social home page Coder Social logo

Magma is main, verilog is linked about linker HOT 3 OPEN

rdaly525 avatar rdaly525 commented on August 15, 2024
Magma is main, verilog is linked

from linker.

Comments (3)

leonardt avatar leonardt commented on August 15, 2024

Can you clarify what you want an example of? If you mean an example of using a templated verilog file, see the second cell in this notebook: https://github.com/phanrahan/magma/blob/master/notebooks/tutorial/Verilog.ipynb

We could add a similar interface which is DeclareFromCoreIRVerilogGenerator('generator_name', **params) which returns a magma circuit declaration with the matching ports/types. Then this could be compiled to CoreIR just in terms of the declaration which I think should just work.

The DeclareFromCoreIRVerilogGenerator could pass the generator reference and parameters to a coreir tool to get the coreir declaration for the generated module, which we could then parse using pycoreir to generate a magma declaration.

from linker.

rdaly525 avatar rdaly525 commented on August 15, 2024

Yeah, that was what I meant.

Since ideally magma does not need to know that library was from verilog, maybe something more generic like "DeclareFromExtern" or something along those lines. Ideally you just have to write one import function that will work independent of what langauge the libraries were written in.

from linker.

leonardt avatar leonardt commented on August 15, 2024

Yea that makes sense, I like the notion of an extern. The most explicit/verbose name would be DeclareFromExternGenerator, can brainstorm with a more concise name but I'll go with that for now.

from linker.

Related Issues (8)

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.