From 8752c8acdc43e5329232209c7c3ee04e5b928306 Mon Sep 17 00:00:00 2001 From: dxl <64101226@qq.com> Date: Sat, 10 Oct 2026 10:30:07 +0800 Subject: [PATCH] FPGA: Use `$signed` instead of the minus sign (`-`) to improve compatibility across different synthesis tools. --- fpga/hi_iso14443a.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fpga/hi_iso14443a.v b/fpga/hi_iso14443a.v index e7b664d60..bff2bc0bd 100644 --- a/fpga/hi_iso14443a.v +++ b/fpga/hi_iso14443a.v @@ -221,7 +221,7 @@ begin if (mod_type == `FPGA_HF_ISO14443A_SNIFFER) begin // detect modulation signal: if modulating, there must have been a falling AND a rising edge - if ((rx_mod_falling_edge_max > edge_detect_threshold_high) && (rx_mod_rising_edge_max < -edge_detect_threshold_high)) + if ((rx_mod_falling_edge_max > $signed(edge_detect_threshold_high)) && (rx_mod_rising_edge_max < -$signed(edge_detect_threshold_high))) curbit <= 1'b1; // modulation else curbit <= 1'b0; // no modulation @@ -229,7 +229,7 @@ begin else begin // detect modulation signal: if modulating, there must have been a falling AND a rising edge - if ((rx_mod_falling_edge_max > edge_detect_threshold) && (rx_mod_rising_edge_max < -edge_detect_threshold)) + if ((rx_mod_falling_edge_max > $signed(edge_detect_threshold)) && (rx_mod_rising_edge_max < -$signed(edge_detect_threshold))) curbit <= 1'b1; // modulation else curbit <= 1'b0; // no modulation