nthlayer_generate
