From 394e437c9108af1e05af3cfae839c3f4bbde2799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Str=C3=B6mbergson?= Date: Tue, 9 May 2023 14:16:28 +0200 Subject: [PATCH] Add test7: Control of LED RGB outputs. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Joachim Strömbergson --- hw/application_fpga/core/tk1/tb/tb_tk1.v | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/hw/application_fpga/core/tk1/tb/tb_tk1.v b/hw/application_fpga/core/tk1/tb/tb_tk1.v index 6e10eff..ef7499a 100644 --- a/hw/application_fpga/core/tk1/tb/tb_tk1.v +++ b/hw/application_fpga/core/tk1/tb/tb_tk1.v @@ -525,6 +525,28 @@ module tb_tk1(); endtask // test6 + //---------------------------------------------------------------- + // test7() + // LED control. + //---------------------------------------------------------------- + task test7; + begin + tc_ctr = tc_ctr + 1; + + $display(""); + $display("--- test7: LED control started."); + + $display("--- test7: LEDs R: 0x%1x, G: 0x%1x, B: 0x%1x", tb_led_r, tb_led_g, tb_led_g); + $display("--- test7: Writing to LED control address to invert LED output."); + write_word(ADDR_LED, 32'h0); + $display("--- test7: LEDs R: 0x%1x, G: 0x%1x, B: 0x%1x", tb_led_r, tb_led_g, tb_led_g); + + $display("--- test7: completed."); + $display(""); + end + endtask // test7 + + //---------------------------------------------------------------- // tk1_test //---------------------------------------------------------------- @@ -544,6 +566,7 @@ module tb_tk1(); test4(); test5(); test6(); + test7(); display_test_result(); $display("");