Skip to content

Commit

Permalink
Make BlockRun() private now that previous usages are moved to evalu…
Browse files Browse the repository at this point in the history
…ators.

PiperOrigin-RevId: 649217409
  • Loading branch information
grebe authored and copybara-github committed Jul 3, 2024
1 parent 91374e4 commit 4fa1743
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
3 changes: 0 additions & 3 deletions xls/interpreter/block_interpreter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -709,8 +709,6 @@ class ElaboratedBlockInterpreter final : public ElaboratedBlockDfsVisitor {
BlockInterpreter* current_interpreter_ = nullptr;
};

} // namespace

absl::StatusOr<BlockRunResult> BlockRun(
const absl::flat_hash_map<std::string, Value>& inputs,
const absl::flat_hash_map<std::string, Value>& reg_state,
Expand Down Expand Up @@ -776,7 +774,6 @@ absl::StatusOr<BlockRunResult> BlockRun(
return result;
}

namespace {
// A template for a generic BlockContinuation that calls a stateless evaluate
// function with all input.
template <typename Evaluate>
Expand Down
13 changes: 0 additions & 13 deletions xls/interpreter/block_interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,19 @@
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

#include "absl/container/flat_hash_map.h"
#include "absl/status/status.h"
#include "absl/status/statusor.h"
#include "absl/types/span.h"
#include "xls/codegen/module_signature.pb.h"
#include "xls/common/status/ret_check.h"
#include "xls/common/status/status_macros.h"
#include "xls/interpreter/block_evaluator.h"
#include "xls/ir/block.h"
#include "xls/ir/block_elaboration.h"
#include "xls/ir/events.h"
#include "xls/ir/value.h"

namespace xls {

// Runs a single cycle of a block with the given register values and input
// values. Returns the value sent to the output port and the next register
// state.
absl::StatusOr<BlockRunResult> BlockRun(
const absl::flat_hash_map<std::string, Value>& inputs,
const absl::flat_hash_map<std::string, Value>& reg_state,
const BlockElaboration& elaboration);

class InterpreterBlockEvaluator final : public BlockEvaluator {
public:
constexpr InterpreterBlockEvaluator() : BlockEvaluator("Interpreter") {}
Expand Down

0 comments on commit 4fa1743

Please sign in to comment.