From f9dc1a2184720748c36042792888f6e82867f285 Mon Sep 17 00:00:00 2001 From: Catherine Date: Fri, 5 Jan 2024 20:18:36 +0000 Subject: [PATCH] cxxrtl: fix comment wording. NFC --- backends/cxxrtl/runtime/cxxrtl/cxxrtl.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h b/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h index 53fb3dbc010..183fbb2c7c7 100644 --- a/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h +++ b/backends/cxxrtl/runtime/cxxrtl/cxxrtl.h @@ -841,24 +841,22 @@ std::ostream &operator<<(std::ostream &os, const value_formatted &vf) return os; } -// An object that can be passed to a `commit()` method in order to produce a replay log of every -// state change in the simulation. +// An object that can be passed to a `commit()` method in order to produce a replay log of every state change in +// the simulation. struct observer { - // Called when a `commit()` method for a wire is about to update the `chunks` chunks at `base` - // with `chunks` chunks at `value` that have a different bit pattern. It is guaranteed that - // `chunks` is equal to the wire chunk count and `base` points to the first chunk. + // Called when the `commit()` method for a wire is about to update the `chunks` chunks at `base` with `chunks` chunks + // at `value` that have a different bit pattern. It is guaranteed that `chunks` is equal to the wire chunk count and + // `base` points to the first chunk. virtual void on_commit(size_t chunks, const chunk_t *base, const chunk_t *value) = 0; - // Called when a `commit()` method for a memory is about to update the `chunks` chunks at - // `&base[chunks * index]` with `chunks` chunks at `value` that have a different bit pattern. - // It is guaranteed that `chunks` covers is equal to the memory element chunk count and `base` - // points to the first chunk of the first element of the memory. + // Called when the `commit()` method for a memory is about to update the `chunks` chunks at `&base[chunks * index]` + // with `chunks` chunks at `value` that have a different bit pattern. It is guaranteed that `chunks` is equal to + // the memory element chunk count and `base` points to the first chunk of the first element of the memory. virtual void on_commit(size_t chunks, const chunk_t *base, const chunk_t *value, size_t index) = 0; }; -// The `null_observer` class has the same interface as `observer`, but has no invocation overhead, -// since its methods are final and have no implementation. This allows the observer feature to be -// zero-cost when not in use. +// The `null_observer` class has the same interface as `observer`, but has no invocation overhead, since its methods +// are final and have no implementation. This allows the observer feature to be zero-cost when not in use. struct null_observer final: observer { void on_commit(size_t chunks, const chunk_t *base, const chunk_t *value) override {} void on_commit(size_t chunks, const chunk_t *base, const chunk_t *value, size_t index) override {}