ASMI Parallel II Intel® FPGA IP User Guide

ID 683669
Date 10/09/2023

Example 5: Read and Clear Flag Status Register

#If there is no errors, system console prints 0x00000080 
#Attempt to write data on protected sector
write_memory 0x40000000 0xabcd1234
#Bit 0 and Bit 4 of flag status register will set to 1 indicates program 
#operation has failed and program operation has attempted to modify the 
#protected array respectively
#set bit 0 and bit 4 to 0 to clear the error bit
clear_flag_status_reg 0x00000080
#read back flag status register to confirm the error bits are cleared