From c25e80b08f473fce0fdf11f2445f5b3f3b2bf342 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Sat, 15 Oct 2022 13:59:46 -0700 Subject: Move shared_bus into arbiter --- infra/bus.h | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 infra/bus.h (limited to 'infra/bus.h') diff --git a/infra/bus.h b/infra/bus.h deleted file mode 100644 index e986174..0000000 --- a/infra/bus.h +++ /dev/null @@ -1,22 +0,0 @@ -#pragma once - -#include -#include - -#include "infra/sim.h" - -namespace infra { - template struct shared_bus : public sim { - std::array, peers> peerp; - port *outp = nullptr; - - void clock() { - for (unsigned int i = 0; i < peers; ++i) { - if (peerp[i].can_read()) { - assert(outp->can_write()); - outp->write(peerp[i].read()); - } - } - } - }; -} -- cgit v1.2.3