yosys/frontends/ast
Rupert Swarbrick ee2b5b7ed1 Generate an RTLIL representation of bind constructs
This code now takes the AST nodes of type AST_BIND and generates a
representation in the RTLIL for them.

This is a little tricky, because a binding of the form:

    bind baz foo_t foo_i (.arg (1 + bar));

means "make an instance of foo_t called foo_i, instantiate it inside
baz and connect the port arg to the result of the expression 1+bar".
Of course, 1+bar needs a cell for the addition. Where should that cell
live?

With this patch, the Binding structure that represents the construct
is itself an AST::AstModule module. This lets us put the adder cell
inside it. We'll pull the contents out and plonk them into 'baz' when
we actually do the binding operation as part of the hierarchy pass.

Of course, we don't want RTLIL::Binding to contain an
AST::AstModule (since kernel code shouldn't depend on a frontend), so
we define RTLIL::Binding as an abstract base class and put the
AST-specific code into an AST::Binding subclass. This is analogous to
the AST::AstModule class.
2021-08-13 17:11:35 -06:00
..
Makefile.inc Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
ast.cc Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
ast.h Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
ast_binding.cc Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
ast_binding.h Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
dpicall.cc Fixing old e-mail addresses and deadnames 2021-06-08 00:39:36 +02:00
genrtlil.cc Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
simplify.cc verilog: Emit $meminit_v2 cell. 2021-07-28 23:18:38 +02:00