I understand that you want to generate triangular wave from your Simulink model using the HDL Coder. The following link will help you in basic HDL code generation process:
HDL code can be generated only if the blocks are supported by the HDL Coder. To find blocks and system objects supporting HDL code generation, please refer to the following page: