[sw] Introduce link-time dependency injection
This change unifies the two existing Meson tres into one by introducing
"link time dependency injection," described in #1162.
Signed-off-by: Miguel Young de la Sota <mcyoung@google.com>
diff --git a/sw/device/lib/arch/device_sim_verilator.c b/sw/device/lib/arch/device_sim_verilator.c
new file mode 100644
index 0000000..fa84314
--- /dev/null
+++ b/sw/device/lib/arch/device_sim_verilator.c
@@ -0,0 +1,15 @@
+// Copyright lowRISC contributors.
+// Licensed under the Apache License, Version 2.0, see LICENSE for details.
+// SPDX-License-Identifier: Apache-2.0
+
+#include "sw/device/lib/arch/device.h"
+
+/**
+ * Device-specific symbol definitions for the Verilator device.
+ */
+
+const device_type_t kDeviceType = kDeviceSimVerilator;
+
+const uint64_t kClockFreqHz = 500 * 1000; // 500kHz
+
+const uint64_t kUartBaudrate = 9600;