Yes, simply remove then nested generate / endgenerate keywords. See IEEE Std 1800-2012 § 27 Generate ...
stackoverflow.com