From cb2fd573b34ad54087494f6bec8a9e372a591504 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Str=C3=B6mbergson?= <joachim@assured.se>
Date: Tue, 9 May 2023 11:24:54 +0200
Subject: [PATCH] Add dummy LED macro driver module needed for simulation
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Joachim Strömbergson <joachim@assured.se>
---
 hw/application_fpga/core/tk1/tb/sb_rgba_drv.v | 22 +++++++++++++++++++
 .../core/tk1/toolruns/Makefile                |  2 +-
 2 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100644 hw/application_fpga/core/tk1/tb/sb_rgba_drv.v

diff --git a/hw/application_fpga/core/tk1/tb/sb_rgba_drv.v b/hw/application_fpga/core/tk1/tb/sb_rgba_drv.v
new file mode 100644
index 0000000..774563c
--- /dev/null
+++ b/hw/application_fpga/core/tk1/tb/sb_rgba_drv.v
@@ -0,0 +1,22 @@
+
+module SB_RGBA_DRV (
+                 output wire RGB0,
+                 output wire RGB1,
+                 output wire RGB2,
+                 input wire RGBLEDEN,
+                 input wire RGB0PWM,
+                 input wire RGB1PWM,
+                 input wire RGB2PWM,
+                 input wire CURREN
+		);
+
+  parameter CURRENT_MODE = 1;
+  parameter RGB0_CURRENT = 8'h0;
+  parameter RGB1_CURRENT = 8'h0;
+  parameter RGB2_CURRENT = 8'h0;
+
+  assign RGB0 = RGB0PWM;
+  assign RGB1 = RGB1PWM;
+  assign RGB2 = RGB2PWM;
+
+endmodule // SB_RGBA_DRV
diff --git a/hw/application_fpga/core/tk1/toolruns/Makefile b/hw/application_fpga/core/tk1/toolruns/Makefile
index 94211be..30d4cbb 100755
--- a/hw/application_fpga/core/tk1/toolruns/Makefile
+++ b/hw/application_fpga/core/tk1/toolruns/Makefile
@@ -12,7 +12,7 @@
 #===================================================================
 
 TOP_SRC=../rtl/tk1.v
-TB_TOP_SRC =../tb/tb_tk1.v
+TB_TOP_SRC =../tb/tb_tk1.v ../tb/sb_rgba_drv.v
 
 CC = iverilog
 CC_FLAGS = -Wall