From 4a860a06207f19c9ca573812629d8006f9af6b65 Mon Sep 17 00:00:00 2001 From: Emily Schmidt Date: Thu, 25 Jul 2024 07:59:00 +0100 Subject: [PATCH] functional backend: rename get_input and get_current_state to input and current_state (more consistent with other methods) --- kernel/functionalir.cc | 6 +++--- kernel/functionalir.h | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/kernel/functionalir.cc b/kernel/functionalir.cc index bc21b4d3648..195e47b12ac 100644 --- a/kernel/functionalir.cc +++ b/kernel/functionalir.cc @@ -499,7 +499,7 @@ class FunctionalIRConstruction { vector read_results; factory.add_state(mem->cell->name, FunctionalIR::Sort(ceil_log2(mem->size), mem->width)); factory.set_initial_state(mem->cell->name, MemContents(mem)); - Node node = factory.get_current_state(mem->cell->name); + Node node = factory.current_state(mem->cell->name); for (size_t i = 0; i < mem->wr_ports.size(); i++) { const auto &wr = mem->wr_ports[i]; if (wr.clk_enable) @@ -543,7 +543,7 @@ class FunctionalIRConstruction { log_error("The design contains a %s flip-flop at %s. This is not supported by the functional backend. " "Call async2sync or clk2fflogic to avoid this error.\n", log_id(cell->type), log_id(cell)); factory.add_state(ff.name, FunctionalIR::Sort(ff.width)); - Node q_value = factory.get_current_state(ff.name); + Node q_value = factory.current_state(ff.name); factory.suggest_name(q_value, ff.name); factory.update_pending(cell_outputs.at({cell, ID(Q)}), q_value); factory.set_next_state(ff.name, enqueue(ff.sig_d)); @@ -593,7 +593,7 @@ class FunctionalIRConstruction { DriveChunkWire wire_chunk = chunk.wire(); if (wire_chunk.is_whole()) { if (wire_chunk.wire->port_input) { - Node node = factory.get_input(wire_chunk.wire->name); + Node node = factory.input(wire_chunk.wire->name); factory.suggest_name(node, wire_chunk.wire->name); factory.update_pending(pending, node); } else { diff --git a/kernel/functionalir.h b/kernel/functionalir.h index e0af89d9f3a..fdbdcbde306 100644 --- a/kernel/functionalir.h +++ b/kernel/functionalir.h @@ -452,10 +452,10 @@ class FunctionalIR { auto [it, inserted] = _ir._state_sorts.emplace(name, sort); if (!inserted) log_error("state `%s` was re-defined", name.c_str()); } - Node get_input(IdString name) { + Node input(IdString name) { return add(NodeData(Fn::input, name), Sort(_ir._input_sorts.at(name)), {}); } - Node get_current_state(IdString name) { + Node current_state(IdString name) { return add(NodeData(Fn::state, name), Sort(_ir._state_sorts.at(name)), {}); } void set_output(IdString output, Node value) {