From e5eabec19af20e097b2d61890fe5bf337c3c115c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joachim=20Str=C3=B6mbergson?= Date: Mon, 8 Jul 2024 09:35:50 +0200 Subject: [PATCH] fpga: Expose PID, VID info in UDI for apps 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/rtl/tk1.v | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/application_fpga/core/tk1/rtl/tk1.v b/hw/application_fpga/core/tk1/rtl/tk1.v index 12b64c7..06c3e68 100644 --- a/hw/application_fpga/core/tk1/rtl/tk1.v +++ b/hw/application_fpga/core/tk1/rtl/tk1.v @@ -570,10 +570,12 @@ module tk1( tmp_read_data = cdi_mem[address[2 : 0]]; end - if ((address >= ADDR_UDI_FIRST) && (address <= ADDR_UDI_LAST)) begin - if (!switch_app_reg) begin - tmp_read_data = udi_rdata; - end + if ((address == ADDR_UDI_FIRST) & ~switch_app_reg) begin + tmp_read_data = udi_rdata; + end + + if (address == ADDR_UDI_LAST) begin + tmp_read_data = udi_rdata; end `ifdef INCLUDE_SPI_MASTER