To help you create block replacement rules, Simulink® Design Verifier™ provides an annotated template that contains a skeleton implementation of the requisite callbacks:
To create a block replacement rule, make a copy of the template and edit the copy to implement the desired behavior for the rule you are creating. The comments in the template provide hints about how to use each section.
Block replacement rules have the following restrictions:
The function that represents a block replacement rule must include particular callbacks. Use the block replacement rule template as a starting point for writing a custom rule. (See Block Replacements for Unsupported Blocks.)
The function that represents a block replacement rule must be on the MATLAB® search path.