Add support to generate_lut for writing CSP