Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Magma 0.9 #419

Open
11 of 25 tasks
phanrahan opened this issue Jun 25, 2019 · 3 comments
Open
11 of 25 tasks

Magma 0.9 #419

phanrahan opened this issue Jun 25, 2019 · 3 comments
Assignees

Comments

@phanrahan
Copy link
Owner

phanrahan commented Jun 25, 2019

Tentative features for next major release of Magma

  • New type system
    • bracket syntax Bits[n] instead of Bits(n)
    • product types
    • sum types
    • Consistent with hwtypes
  • Make @combinational and @Sequential the preferred way to generate circuits
    • Polymorphism vs static typing
      • The plan is to implement an analysis pass that discovers polymorphic code and raises and error. In the future, if we decide to add polymorphism, this pass will provide the basis for an implementation. Until then, we will force the user to rewrite their code in a way that effectively duplicates code for handling different types, which forces them to acknowledge the fact that their code is creating extra hardware (rather than having a polymorphic operator implicitly compiled into two different functional units). This design allows a polymorphic layer to be implemented on top of magma, giving magma a simple, concise, precise semantics.
    • Macro story
  • Add a mode to compile circuit combinational/sequential directly to verilog using kratos and pass through the black box modules to coreir
  • Capture Python variable names for magma values(wires)/instances and pass through to verilog to improve debuggability
  • Better coreir integration
    • Depreciate mantle implementations of primitives on FPGAs
    • Mantle generators called from coreir
  • CoreIR verilogAST-based backend to improve readability of generated verilog: Refactor Verilog pass to use verilogAST rdaly525/coreir#770
  • Resource sharing optimizations
  • Comprehensive tests of the primitives
    • Formulate test plan
    • hwtypes implementation of primitives to test against
  • Uniquification
  • New generator framework (generators as types/classes) - experimental
  • Circuit editing API (for gemstone) - experimental
  • Updated magmathon (Pat)
    • Default should not depend on ice40
@leonardt
Copy link
Collaborator

I added two things to start making things more concrete.

For "better coreir integration", one thing that I have been thinking about:

Add a mode to compile circuit combinational/sequential directly to verilog using veriloggen and pass through the black box modules to coreir

This would improve the output verilog without having to reconstruct structure (if statements) from the netlist format

For " Consistent mantle implementations and tests"

hwtypes implementation of mantle to test against

@cdonovick brought up that we could provide one-to-one magma/hwtypes implementations for mantle, we could use the hwtypes version for generating simulation vectors and formal (verify the mantle generated RTL is equivalent to the SMT)

@phanrahan
Copy link
Owner Author

Good comments. Thanks.

@phanrahan
Copy link
Owner Author

Caleb made the suggestion that we simplify the system as we move towards full support for coreir.

The suggestion was to move all the hwtypes/coreir primitives to magma. The goal is to build is to tightly integrate these primitives into magma. A secondary goal is to simplify the mantle implementation, which is complicated because the mantle primitives do mapping.

The new mantle would just contain functions built on the primitives, such as counters, shift registers, fifos, etc.

@leonardt leonardt added this to the Summer 2019 milestone Jul 10, 2019
@leonardt leonardt removed this from the Autumn 2019 milestone Sep 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants