This contribution presents results on the Analytical Method (AM) algorithm for trigger primitive (TP) generation in the CMS Drift Tube (DT) chambers during the High Luminosity LHC operation (HL-LHC or LHC Phase II). The algorithm has been developed and validated both in software with an emulation approach, and through hardware implementation tests. The obtained performance on Phase II simulated data shows timing and position resolutions close to the ultimate performance of the DT chambers, with resilience to potential ageing situations. The firmware version has been implemented in the so-called AB7 (TwinMux), spare μTCA boards from the present DT system which host Xilinx Virtex 7 FPGAs, and included in a prototype chain of the HL-LHC electronics operated with real DT chambers during cosmic data taking. Agreement between the software emulation and the firmware implementation has been verified using different data samples, including a sample of real muons collected during 2016 data taking.