full layer code generation