6.5. Hardware Results
Table 7 summarizes the frame-level and logit-level consistency between the Float32 software model and the Q6.9 FPGA implementation. The Q6.9 FPGA implementation produced the same attack-wise Precision, Recall, and F1-score values as the Float32 software model on the validation set, indicating that the fixed-point implementation did not degrade the supervised binary detection performance at the metric level.
Table 8 presents the comparison of post-synthesis FPGA resource usage between prior FPGA-based IDSs and the proposed IDS. In particular, this table also shows the resource differences between the baseline LC-IDS, which was first implemented at RTL in the same Nexys A7-100T environment, and the proposed COL-IDS architecture lightweighted on that basis. The baseline LC-IDS and the proposed COL-IDS were both directly designed and synthesized at RTL under the same platform and implementation conditions in this study. Here, the baseline LC-IDS is a hardware architecture implemented on the basis of the existing software model and was designed in a streaming manner using five PEs in the Dense1 layer. Except for the Dense1 PE count and the model-dependent input/parameter sizes, the baseline LC-IDS and the proposed COL-IDS were implemented under the same RTL design conditions, including the fixed-point format, computation modules, memory interface, and synthesis constraints. Therefore, while presenting the FPGA implementation results of the proposed architecture, this table also quantitatively shows the benefits of lightweighting over the baseline in terms of LUTs, FFs, and on-chip memory usage. The prior FPGA-based IDS results are included as contextual references because their FPGA devices, model structures, detection units, and operating assumptions differ. The primary controlled hardware comparison in this work is between the RTL LC-IDS baseline and the proposed COL-IDS implemented under the same Nexys A7-100T platform and design constraints.
Table 7.
Frame-level and logit-level consistency between Float32 software and Q6.9 FPGA implementations.
Table 7.
Frame-level and logit-level consistency between Float32 software and Q6.9 FPGA implementations.
| Metric | Value |
|---|
| Attack-wise Precision/Recall/F1 | Identical to Float32 SW |
| Frame-level prediction agreement | 100.0000% |
| Sign-change count | 0 |
| MAE/RMSE of final logits | 0.01957/0.02380 |
| 95th/99th percentile absolute logit error | 0.04351/0.05772 |
| Maximum absolute logit error | 0.11060 |
However, identical aggregate metrics alone do not fully guarantee that the two implementations make the same decision for every individual CAN frame. Therefore, the final pre-sigmoid logits of the Float32 software model and the Q6.9 FPGA implementation were additionally compared on a frame-by-frame basis. The Q6.9 logits were converted back to their real-valued scale before comparison, and the logit-level error was evaluated using MAE, RMSE, high-percentile absolute errors, and maximum absolute error.
As shown in
Table 7, the frame-level prediction agreement between the Float32 software model and the Q6.9 FPGA implementation was 100.0000%, and no sign-change case was observed over the validation frames. Since the hardware implementation makes the binary normal/attack decision by checking the sign of the final logit, the zero sign-change count means that Q6.9 quantization and truncation did not change the final IDS decision for any validation frame. The final-logit MAE and RMSE were 0.01957 and 0.02380, respectively, and the 95th and 99th percentile absolute logit errors were 0.04351 and 0.05772, respectively. Even the maximum absolute logit error was 0.11060, and this numerical deviation did not cause any decision reversal around the logit-zero decision boundary.
These results show that the Q6.9 FPGA implementation preserves not only the aggregate Precision, Recall, and F1-score of the Float32 software model, but also the frame-level binary decisions. Therefore, the following FPGA resource, latency, timing-margin, and IPS-operation analyses are based on a fixed-point implementation that maintains the validation behavior of the original Float32 software model.
Table 8.
FPGA resource results of the proposed COL-IDS, the timing-feasible LC-IDS RTL baseline, and the literature-reported contextual references.
Table 8.
FPGA resource results of the proposed COL-IDS, the timing-feasible LC-IDS RTL baseline, and the literature-reported contextual references.
| Metric | QMLP-IDS [13] | BNN-IDS [15] | MA-QCNN [14] | Shallow CNN-IDS [16] | LC-IDS Baseline | Proposed |
|---|
| FPGA Device | Zynq Ultrascale + XCZU7EV | Zedboard XC7Z020 | Zynq Ultrascale + XCZU3EG | Nexys Video XC7A200T | Nexys A7-100T | Nexys A7-100T |
| LUTs | 56,733 | 33,224 | 30,726 | 17,059 | 4980 | 3976 |
| FFs | 72,146 | 54,175 | 48,400 | 11,062 | 4919 | 4101 |
| BRAM (Mb) | 3.06 | 4.85 | 2.5605 | 0.288 | 0.09 | 0.0352 |
| URAM (Mb) | 6.75 | 0 | 0 | 0 | 0 | 0 |
As can be seen from the table, the proposed architecture reduced LUT, FF, and BRAM usage compared with LC-IDS. Specifically, LUT usage decreased from 4980 to 3976, FF usage from 4919 to 4101, and BRAM usage from 0.09 Mb to 0.0352 Mb.
These results show that the proposed IDS reduces both computational and memory requirements compared with LC-IDS through integrated SW and HW lightweighting. In particular, the decrease in BRAM usage can be interpreted as resulting from the removal of the seven-frame accumulation buffer, the minimization of intermediate feature map storage, and the streaming-based processing scheme. In addition, the literature-reported FPGA-based IDS results provide contextual references showing that the proposed architecture remains within a resource range suitable for resource-constrained FPGA environments.
Meanwhile, the resource-reduced RTL architecture used in this work was obtained by reducing the number of PEs in the Dense1 layer from five to two and temporally distributing the computation.
Table 9 presents a latency comparison between the proposed IDS and prior FPGA-based IDS implementations reported in the literature. In this table, the detection unit denotes the number of CAN frames required to generate one detection decision. Therefore, the proposed IDS is listed as a per-CAN-frame detector because it produces a normal/attack decision for each received CAN frame without multi-frame buffering.
Table 9.
Latency results and contextual comparison with prior FPGA-based IDS implementations. For the LC-IDS baseline and the proposed COL-IDS, the reported latency denotes the DATA-complete-to-decision latency after ID-branch precomputation in the shared-module architecture. Prior values are the literature-reported contextual references and may use different latency definitions.
Table 9.
Latency results and contextual comparison with prior FPGA-based IDS implementations. For the LC-IDS baseline and the proposed COL-IDS, the reported latency denotes the DATA-complete-to-decision latency after ID-branch precomputation in the shared-module architecture. Prior values are the literature-reported contextual references and may use different latency definitions.
| Model | Latency | Detection Unit | Platform |
|---|
| QMLP-IDS [13] | 430 s | per CAN frame | Zynq Ultrascale |
| BNN-IDS [15] | 259 s | 30 CAN frame | Zynq-7000 |
| MA-QCNN [14] | 240 s | 4 CAN frame | Zynq Ultrascale |
| Shallow CNN-IDS [16] | 23 s | per CAN frame | Nexys Video |
| LC-IDS baseline | 2.44 s | per CAN frame | Nexys A7-100T |
| Proposed | 5.68 s | per CAN frame | Nexys A7-100T |
In the proposed shared-module architecture, the ID branch and the DATA branch operate at different points during CAN frame reception. The ID-branch computation is initiated immediately after CAN ID reception and must be completed before the DATA-branch computation begins because the two branches share the same computation module. The DATA branch starts after DATA-field reception is completed and generates the final IDS decision using the precomputed ID-branch result. Therefore, the 5.68
s reported in
Table 9 denotes the DATA-complete-to-decision latency after ID-branch precomputation, rather than the full-frame end-to-end latency of the entire CAN frame.
At the 50 MHz operating frequency used in this work, the ID-branch precomputation latency is 573 cycles, corresponding to 11.46 s, whereas the DATA-branch decision latency is 284 cycles, corresponding to 5.68 s. Accordingly, the real-time feasibility of the proposed architecture should be evaluated based on whether each branch completes within its available timing window during CAN frame reception, rather than by simply summing the two branch latencies as a single end-to-end computation time.
To verify whether the measured latency satisfies the timing budget of an actual CAN frame, the timing windows and slack margins of the ID branch and DATA branch were analyzed.
Figure 10 shows the branch-wise timing budget for a classical CAN 2.0B extended frame under a 1 Mbps bus environment, assuming a non-empty DATA frame.
In the proposed shared-module architecture, the ID branch starts after the extended CAN ID field is received and must complete before the DATA-branch computation begins. Therefore, the available timing window for the ID branch is determined by the interval from the start of ID-branch computation to the completion of DATA-field reception. In a CAN 2.0B extended frame, the fixed fields between the extended ID field and the DATA field consist of RTR 1 bit, r1 1 bit, r0 1 bit, and DLC 4 bits, totaling 7 bits. Since the DATA field length is bits, the available ID-branch timing window is bit times.
Although the shortest nominal interval would occur when DLC = 0, the practical timing analysis in this work uses DLC = 1 because the proposed IDS uses both ID and DATA features and targets DATA-bearing CAN frames. Therefore, DLC = 1 represents the minimum non-empty DATA-frame condition considered in this study. In this case, the available ID-branch timing window is
bit times, corresponding to 15
s at 1 Mbps [
1]. Since the measured ID-branch precomputation latency is 11.46
s, the ID branch has a slack margin of approximately 3.54
s. For larger DLC values, the DATA field becomes longer, and therefore the available ID-branch timing window increases accordingly.
For the DATA branch, computation starts after DATA-field reception is completed. In the considered CAN 2.0B extended-frame structure, the remaining interval after the DATA field is 25 bit times, corresponding to 25 s at 1 Mbps. Since the measured DATA-branch decision latency is 5.68 s, the DATA branch has a slack margin of approximately 19.32 s. These results indicate that both branches complete their computations within the respective timing windows under the CAN 2.0B extended-frame, 1 Mbps, non-empty DATA-frame condition.
This analysis was conducted as a branch-wise architectural timing evaluation based on nominal CAN bit fields. Bit stuffing was not included in the nominal bit-count analysis. Since bit stuffing increases the actual frame duration when it occurs, excluding it provides a conservative timing-margin analysis with respect to the in-frame computation windows. In addition, DLC = 0 frames and remote frames are outside the active-blocking timing scope of the current implementation because the proposed CNN-based IDS/IPS uses both ID and DATA features and targets DATA-bearing CAN frames. System-level factors such as bus load, bursty traffic, arbitration, buffering, and retransmission may affect network-level latency and message delivery behavior; however, they do not reduce the nominal in-frame timing windows used as the branch deadlines in this architectural analysis. Therefore, the timing results indicate branch-wise within-frame feasibility under the specified CAN 2.0B extended-frame, 1 Mbps, non-empty DATA-frame condition.
As shown in
Table 10, the Dense1 PE-count analysis was used to determine timing-feasible comparison points for both LC-IDS and the proposed COL-IDS. For the proposed COL-IDS, when the number of PEs in Dense1 is set to one, the ID-branch latency is 22.66
s, which exceeds the practical ID-branch timing window of 15
s under the DLC = 1 non-empty DATA-frame condition. In contrast, when the number of PEs is set to two or more, the proposed ID branch satisfies the timing budget. The DATA branch also satisfies its 25
s timing window for all PE settings.
Table 10.
Effect of Dense1 PE count on branch latency.
Table 10.
Effect of Dense1 PE count on branch latency.
| Dense1 PE Count | LC-IDS ID Branch Latency | Proposed ID Branch Latency | DATA Branch Latency |
|---|
| 1 | 67.46 s | 22.66 s | 11.08 s |
| 2 | 33.86 s | 11.46 s | 5.68 s |
| 5 | 13.7 s | 4.74 s | 2.44 s |
For the original LC-IDS structure, at least five Dense1 PEs are required to satisfy the same 15 s ID-branch timing window. With two PEs, the LC-IDS ID-branch latency is 33.86 s and therefore exceeds the timing budget because the seven-frame ID sequence input increases the ID-branch workload. In contrast, the proposed COL-IDS satisfies the same ID-branch timing window with only two Dense1 PEs, achieving an ID-branch latency of 11.46 s. Therefore, LC-IDS and COL-IDS are used as timing-feasible controlled comparison points in the resource and ASIC evaluations.
Figure 11 shows actual measured waveforms obtained by verifying the proposed IDS/IPS on the FPGA. The ID branch processing and DATA branch processing regions indicated in the figure correspond to the intervals in which the computations of the two branches are actually performed along the time axis during CAN frame reception. In addition, the IPS processing and error frame regions on the right show the process in which the IPS operates on a frame judged to be an attack and generates an error frame through the CAN controller. That is, the proposed architecture not only detects abnormal CAN traffic but also demonstrates that the IDS decision can trigger the IPS generator at the hardware level. These measured results support that the computation and IDS-triggered IPS operation of the proposed architecture can be performed continuously in the FPGA-based CAN verification setup. Together with the timing margin and detection latency results presented earlier, they also support the feasibility of frame-level detection and hardware-level IPS triggering in resource-constrained ECU-oriented implementations.
Because IPS operation may block a legitimate CAN frame or miss an attack frame depending on the decision threshold, the threshold-dependent false-blocking and missed-attack behavior was evaluated on the validation set.
Table 11 summarizes the FP/FN trend for sigmoid decision thresholds from 0.1 to 0.9. As the threshold increased, false positives decreased, whereas false negatives increased. This reflects the expected IPS trade-off: a lower threshold increases attack sensitivity but may increase false blocking, whereas a higher threshold reduces false blocking but may increase missed attacks.
Figure 11.
Measured FPGA waveforms showing hardware-level triggering of error-frame generation by the IDS/IPS path in the FPGA-based CAN verification setup. Colored overlays denote decoded CAN fields, and white dashed annotations mark the ID, DATA, and IPS processing intervals.
Figure 11.
Measured FPGA waveforms showing hardware-level triggering of error-frame generation by the IDS/IPS path in the FPGA-based CAN verification setup. Colored overlays denote decoded CAN fields, and white dashed annotations mark the ID, DATA, and IPS processing intervals.
Table 11.
Threshold-dependent FP/FN behavior for IDS-triggered IPS operation on the validation set.
Table 11.
Threshold-dependent FP/FN behavior for IDS-triggered IPS operation on the validation set.
| Sigmoid Threshold | FP | FN | False-Blocking Rate (%) | Missed-Attack Rate (%) | F1-Score (%) |
|---|
| 0.1 | 41 | 16 | 0.00152 | 0.00262 | 99.9953 |
| 0.2 | 34 | 19 | 0.00126 | 0.00311 | 99.9957 |
| 0.3 | 30 | 26 | 0.00111 | 0.00426 | 99.9954 |
| 0.4 | 30 | 31 | 0.00111 | 0.00508 | 99.9950 |
| 0.5 | 30 | 33 | 0.00111 | 0.00541 | 99.9948 |
| 0.6 | 28 | 39 | 0.00104 | 0.00639 | 99.9945 |
| 0.7 | 27 | 42 | 0.00100 | 0.00688 | 99.9943 |
| 0.8 | 27 | 49 | 0.00100 | 0.00803 | 99.9938 |
| 0.9 | 24 | 55 | 0.00089 | 0.00901 | 99.9935 |
At the adopted threshold of 0.5, corresponding to a logit threshold of 0, the proposed model produced 30 false positives among 2,703,525 normal frames and 33 false negatives among 610,372 attack frames, corresponding to false-blocking and missed-attack rates of 0.00111% and 0.00541%, respectively. Although the highest F1-score in the validation-set sweep was observed at a threshold of 0.2, the standard threshold of 0.5 was adopted to avoid validation-set-specific threshold tuning and to implement the FPGA decision as a simple sign check without a sigmoid unit or non-zero threshold comparator. This result reports dataset-level IPS-trigger behavior, not a full vehicle-level safety evaluation.
6.6. ASIC Implementation
To verify the feasibility of chip-level implementation of the proposed IDS, ASIC synthesis and layout implementation were performed based on the TSMC 28 nm process beyond FPGA-level verification. The system clock was set to 50 MHz in consideration of real-time operation in automotive ECU environments, and the gate count was calculated on the basis of a two-input NAND gate.
Figure 12 shows the ASIC layout of the entire Multi-Project Wafer (MPW) integrated system, and
Table 12 presents the comparison of ASIC implementation complexity between LC-IDS and the proposed IDS.
Figure 12 shows the ASIC layout of the MPW integrated system implemented based on the TSMC 28 nm process. This layout is not the placement result of a standalone chip containing only the proposed IDS, but rather a system-level implementation result in which multiple modules are included together. Therefore, the total chip area shown in the figure should not be interpreted as the area of the proposed IDS itself. Nevertheless, this layout shows that the proposed IDS can be implemented at the system level even in an actual MPW integrated environment and supports its feasibility for chip-level integration.
Figure 12.
ASIC layout of a multi-purpose test chip including the proposed IDS. The colors indicate different physical layout layers in the IC layout view and are used for visual distinction.
Figure 12.
ASIC layout of a multi-purpose test chip including the proposed IDS. The colors indicate different physical layout layers in the IC layout view and are used for visual distinction.
Table 12 presents the system-level ASIC implementation comparison between the LC-IDS baseline and the proposed COL-IDS. Both architectures were synthesized under the same 50 MHz system clock condition and include the same CAN controller. Compared with the LC-IDS baseline, the proposed COL-IDS reduced the IDS logic size from 37,545 gates to 29,318 gates and the SRAM-equivalent area from 62,142 gates to 22,541 gates. As a result, the total chip gate count was reduced from 118,420 gates to 70,592 gates.
This reduction is mainly attributed to the joint software-level and hardware-level lightweighting. At the software level, COL-IDS replaces the seven-frame ID sequence used in LC-IDS with a single-frame ID feature, thereby reducing the number of parameters required for inference and the corresponding SRAM requirement. At the hardware level, the LC-IDS RTL baseline was implemented with five PEs in the Dense1 layer, whereas COL-IDS uses two PEs and temporally distributes the computation through the streaming pipeline. Therefore, COL-IDS reduces both parameter-storage SRAM and computation logic while satisfying the required branch-wise timing constraint.
The power estimates show the same trend. COL-IDS reduces the total estimated ASIC power from 2.9375 mW to 2.0231 mW and the memory-group power from 1.8381 mW to 0.6387 mW, corresponding to reductions of 31.13% and 65.25%, respectively. For energy estimation, the full active inference time was computed as the sum of the ID-branch and DATA-branch active latencies. Although COL-IDS has a slightly longer full active inference time because of the reduced PE parallelism, its lower total estimated power reduces the active inference energy from 47.41 nJ to 34.68 nJ, corresponding to a 26.86% reduction. These values should be interpreted as implementation-level estimates under the stated synthesis condition: absolute power and energy may vary depending on process corner, voltage, temperature, switching activity, and SRAM macro/model assumptions.
Table 12.
System-level ASIC gate-count, power, and active-inference-energy comparison between the LC-IDS baseline and the proposed COL-IDS.
Table 12.
System-level ASIC gate-count, power, and active-inference-energy comparison between the LC-IDS baseline and the proposed COL-IDS.
| Metric | LC-IDS | Proposed IDS |
|---|
| System clock | 50 MHz | 50 MHz |
| CAN Controller | 18,733 gate | 18,733 gate |
| IDS Logic | 37,545 gate | 29,318 gate |
| Total area of SRAM | 62,142 gate | 22,541 gate |
| Total area of Chip | 118,420 gate | 70,592 gate |
| Operating voltage | 1.62 V | 1.62 V |
| Cell leakage power | 2.0570 mW | 1.2171 mW |
| Total dynamic power | 0.8805 mW | 0.8061 mW |
| Total estimated power | 2.9375 mW | 2.0231 mW |
| Memory-group power | 1.8381 mW | 0.6387 mW |
| Full active inference time | 16.14 s | 17.14 s |
| Full active inference energy | 47.41 nJ | 34.68 nJ |