I suspect that you have three blocks in your model, the third being a terminator, a scope, or something else that doesn't generate HDL code. And, you are generating code for the entire model. The use of a terminator/scope/etc. block indicates that you don't care about the signal output connected to it, so HDL Coder removes the blocks that feed into the terminator. You end up with no blocks or code in your design.
If this is the case, change the terminator/scope/etc. to an output port (or add an output port in parallel to the e.g. scope) and you will get the code that you were expecting.
Alternatively, place just the blocks you want to generate HDL code for into a subsystem, and generate code for that subsystem.
Best Answer