FPGATrackSim imports FPGA equivalent 2D Hough Transform functions
The Original HoughTransformTool works mathematically slightly differently from how FPGA works. To evaluate FPGA-based performance more realistically, an additional flag, "HoughType," is implemented to switch the HoughTransformTool function from the original version to more FPGA-like versions. The default flag is HoughType="Original", and it works as it was with this flag. With HoughType="LowResource", the so-called "LowResource" version of the FPGA implementation is reproduced, and its performance is evaluated. This reads pre-calculated ranges to fire each bin as LUTs and refers to this LUTs value to construct an accumulator. With HoughType="Flexible", the so-called "Flexible" version of the FPGA implementation is reproduced, and its performance is evaluated. This version mimics how the FPGA is implemented, i.e., it performs bit-wise calculations. In both cases, the difference is only how to construct an accumulator, and they are tested using the following options.
For LowResource
python -m FPGATrackSimConfTools.FPGATrackSimAnalysisConfig \
--evtMax=${WRP_EVT} \
Trigger.FPGATrackSim.wrapperFileName=${WRAPPER} \
Trigger.FPGATrackSim.mapsDir=${MAPS} \
Trigger.FPGATrackSim.tracking=False \
Trigger.FPGATrackSim.bankDir=${BANKS}\
Trigger.FPGATrackSim.region=0 \
Trigger.FPGATrackSim.Hough.xBins=64 \
Trigger.FPGATrackSim.Hough.yBins=216 \
Trigger.FPGATrackSim.Hough.threshold=[7] \
Trigger.FPGATrackSim.Hough.xBufferBins=0 \
Trigger.FPGATrackSim.Hough.yBufferBins=0 \
Trigger.FPGATrackSim.Hough.houghType="" \
Trigger.FPGATrackSim.spacePoints=False \
Trigger.FPGATrackSim.Hough.hitExtendX=[0,0,0,0,0,0,0,0,0] \
Trigger.FPGATrackSim.Hough.requirements=${REQUIREMENTS}
For Flexible
python -m FPGATrackSimConfTools.FPGATrackSimAnalysisConfig \
--evtMax=${WRP_EVT} \
Trigger.FPGATrackSim.wrapperFileName=${WRAPPER} \
Trigger.FPGATrackSim.mapsDir=${MAPS} \
Trigger.FPGATrackSim.tracking=False \
Trigger.FPGATrackSim.spacePoints=True \
Trigger.FPGATrackSim.Hough.houghType="Flexible" \
Trigger.FPGATrackSim.bankDir=${BANKS} \
Trigger.FPGATrackSim.Hough.phiMin=0.2379228692792084 \
Trigger.FPGATrackSim.Hough.phiMax=0.5620771307207917 \
Trigger.FPGATrackSim.Hough.qptMin=-1.4821757705956153 \
Trigger.FPGATrackSim.Hough.qptMax=1.4821757705956153 \
Trigger.FPGATrackSim.Hough.xBins=138 \
Trigger.FPGATrackSim.Hough.yBins=82 \
Trigger.FPGATrackSim.Hough.threshold=[7] \
Trigger.FPGATrackSim.sampleType="singleMuons" \
Trigger.FPGATrackSim.singleTrackSample=True \
Trigger.FPGATrackSim.Hough.phi_range=6.28318530717958 \
Trigger.FPGATrackSim.Hough.r_max=8191 \
Trigger.FPGATrackSim.Hough.phi_coord_max=65535 \
Trigger.FPGATrackSim.Hough.r_max_mm=990 \
Trigger.FPGATrackSim.Hough.bitwise_qApt_conv=2048 \
Trigger.FPGATrackSim.Hough.bitwise_phi0_conv=8 \
Trigger.FPGATrackSim.Hough.phi0_sectors=1 \
Trigger.FPGATrackSim.Hough.qApt_sectors=1 \
Trigger.FPGATrackSim.Hough.pipes_qApt=1 \
Trigger.FPGATrackSim.Hough.pipes_phi0=1 \
Trigger.FPGATrackSim.Hough.hitExtendX=[0,0,0,0,0,0,0,0] \
Trigger.FPGATrackSim.region=3
So far, some hardcode lines for LowResource cover only the barrel region. Once full region maps are ready, this will be replaced. For the Flexible version, once maps are ready, it can work in any region.
In addition, the roadMerge function is implemented in HoughTransformTool. This function merges all the neighbouring roads to suppress the number of output roads. As a side effect, the number of fit combinations is to be increased, but depending on the configuration, this side effect is small compared to the reduction of road size. So, this function allows us to investigate the best configuration.