6764 - MachXO3: How to perform OTP programming in MachXO3?

6764 - MachXO3: How to perform OTP programming in MachXO3?

See below steps:
 
1. In the Lattice Diamond Software - Spreadsheet View, Global Preferences in Diamond Tool, set the OTP column as ONE_TIME_PROGRAM = FLASH, then generate the .JED file.
 
2. Create an .XCF file from Diamond Programmer using the .JED file with the operation “Security EPV with OTP Option” and save. DO NOT PROGRAM THE DEVICE AT THIS STEP as we will only use the .XCF file for Step#3
 
3. Generate .SVF (Serial Vector File) file with the help of Diamond Deployment Tool using .XCF file created from above steps.
 
4. Open .SVF file in Text Editor and check for LSC_PROG_OTP(0xF9) Instruction in SVF file.
 
The opcode that will be used in the SDR of LSC_PROG_OTP(0xF9) will be the one to determine which part of the OTP fuses will you want to program (which is indicated on page 66 of FPGA-TN-02055).
 
For example:
If you want to OTP the feature row only, you have to program bits 1 and 5 = 0010 0010: so that means you have to change the SDR to SDR (22)
If you want to OTP the SRAM only, you have to program bits 0 and 4 = 0001 0001: so that means you have to change the SDR to SDR (11)
If you want to OTP both SRAM and Feature row, you have to program bits 1,5,0 and 4 = 0011 0011: so that means you have to change the SDR to SDR (33)
 
To summarize the table for programming the OTP fuses please see below screenshot:
 
 
 
 
5. Load the modified SVF file in the Download debugger(is a part of Deployment Tool), and program your device.