When generating RTL from Simulink model or MATLAB algorithm, there are several ways to integrate custom HDL IP with HDL Coder generated RTL.
Generate Black Box Interface for Subsystem
Black box for including custom HDL code in MATLAB to HDL workflow
Integrate Custom HDL Code by Using DocBlock