mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-24 01:25:33 +00:00
functional backend: error out if multiply driven or undriven signals are seen, dont bother putting them in functionalir
This commit is contained in:
parent
145af6f10d
commit
6d329e142d
4 changed files with 5 additions and 34 deletions
|
@ -154,7 +154,6 @@ template<class NodePrinter> struct CxxPrintVisitor : public FunctionalIR::Abstra
|
|||
void state(Node, IdString name) override { print("current_state.{}", state_struct[name]); }
|
||||
void memory_read(Node, Node mem, Node addr) override { print("{}.read({})", mem, addr); }
|
||||
void memory_write(Node, Node mem, Node addr, Node data) override { print("{}.write({}, {})", mem, addr, data); }
|
||||
void undriven(Node, int width) override { print("Signal<{}>(0)", width); }
|
||||
};
|
||||
|
||||
struct CxxModule {
|
||||
|
|
|
@ -180,8 +180,6 @@ struct SmtPrintVisitor : public FunctionalIR::AbstractVisitor<SExpr> {
|
|||
|
||||
SExpr input(Node, IdString name) override { return input_struct.access("inputs", name); }
|
||||
SExpr state(Node, IdString name) override { return state_struct.access("state", name); }
|
||||
|
||||
SExpr undriven(Node, int width) override { return literal(RTLIL::Const(State::S0, width)); }
|
||||
};
|
||||
|
||||
struct SmtModule {
|
||||
|
@ -227,8 +225,7 @@ struct SmtModule {
|
|||
list("state", state_struct.name)),
|
||||
list("Pair", output_struct.name, state_struct.name)));
|
||||
auto inlined = [&](FunctionalIR::Node n) {
|
||||
return n.fn() == FunctionalIR::Fn::constant ||
|
||||
n.fn() == FunctionalIR::Fn::undriven;
|
||||
return n.fn() == FunctionalIR::Fn::constant;
|
||||
};
|
||||
SmtPrintVisitor visitor(input_struct, state_struct);
|
||||
auto node_to_sexpr = [&](FunctionalIR::Node n) -> SExpr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue