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

Make a new syntax node for modules #32

Open
thiskappaisgrey opened this issue Apr 13, 2024 · 0 comments
Open

Make a new syntax node for modules #32

thiskappaisgrey opened this issue Apr 13, 2024 · 0 comments

Comments

@thiskappaisgrey
Copy link
Collaborator

For the decompilation application, we need to turn the modules that we find back into verilog instantiations of the module (i.e. unflatten). Right now, I instantiate my module like:

(function ALU ( Expr  Expr Expr ) Expr :cost 0)

which is the "simplest" solution for now. However, I'd need to be able to turn this expression:

(ALU i_bit1 i_bit2 i_op) 

Into the verilog:

// may probably need to declare a wire for the output of the ALU or something
wire o_out;
alu alu(
           .i_a (o_a), 
          .i_b (o_b),
          .i_control (i_op),
          .o_res (o_out)
          );

when we do the decompilation and turn the Egglog expression back into the verilog again.

There are probably some other complications with this - but this is the idea for now.

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

1 participant