.WithFlag(0,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>dCacheEnabled,writeCallback:(_,val)=>dCacheEnabled=val,name:"DCACHE_ENABLE")// The bit is used to activate the data cache. 0: disable, 1: enable
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"DCACHE_SIZE_MODE")// The bit is used to configure cache memory size.0: 32KB, 1: 64KB
.WithValueField(2,2,FieldMode.Read|FieldMode.Write,name:"DCACHE_BLOCKSIZE_MODE")// The bit is used to configure cache block size.0: 16 bytes, 1: 32 bytes,2: 64 bytes
.WithFlag(0,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>false,name:"DCACHE_INVALIDATE_ENA")// The bit is used to enable invalidate operation. It will be cleared by hardware after invalidate operation done.
.WithFlag(1,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>false,name:"DCACHE_WRITEBACK_ENA")// The bit is used to enable writeback operation. It will be cleared by hardware after writeback operation done.
.WithFlag(2,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>false,name:"DCACHE_CLEAN_ENA")// The bit is used to enable clean operation. It will be cleared by hardware after clean operation done.
.WithFlag(3,FieldMode.Read,valueProviderCallback:(_)=>true,name:"DCACHE_SYNC_DONE")// The bit is used to indicate clean/writeback/invalidate operation is finished.
.WithValueField(0,32,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>0,name:"DCACHE_SYNC_ADDR")// The bits are used to configure the start virtual address for clean operations. It should be combined with DCACHE_SYNC_SIZE_REG.
.WithValueField(0,32,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>0,name:"DCACHE_SYNC_SIZE")// The bits are used to configure the length for sync operations. The bits are the counts of cache block. It should be combined with DCACHE_SYNC_ADDR_REG.
.WithFlag(0,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>false,name:"DCACHE_PRELOAD_ENA")// The bit is used to enable preload operation. It will be cleared by hardware after preload operation done.
.WithFlag(1,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>true,name:"DCACHE_PRELOAD_DONE")// The bit is used to indicate preload operation is finished.
.WithFlag(2,FieldMode.Read|FieldMode.Write,name:"DCACHE_PRELOAD_ORDER")// The bit is used to configure the direction of preload operation. 1: descending, 0: ascending.
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"DCACHE_AUTOLOAD_SCT0_ENA")// The bits are used to enable the first section for autoload operation.
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"DCACHE_AUTOLOAD_SCT1_ENA")// The bits are used to enable the second section for autoload operation.
.WithFlag(2,FieldMode.Read|FieldMode.Write,name:"DCACHE_AUTOLOAD_ENA")// The bit is used to enable and disable autoload operation. It is combined with dcache_autoload_done. 1: enable, 0: disable.
.WithFlag(3,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>true,name:"DCACHE_AUTOLOAD_DONE")// The bit is used to indicate autoload operation is finished.
.WithFlag(4,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>false,name:"DCACHE_AUTOLOAD_ORDER")// The bits are used to configure the direction of autoload. 1: descending, 0: ascending.
.WithValueField(5,2,FieldMode.Read|FieldMode.Write,name:"DCACHE_AUTOLOAD_RQST")// The bits are used to configure trigger conditions for autoload. 0/3: cache miss, 1: cache hit, 2: both cache miss and hit.
.WithValueField(7,2,FieldMode.Read|FieldMode.Write,name:"DCACHE_AUTOLOAD_SIZE")// The bits are used to configure the numbers of the cache block for the issuing autoload operation.
.WithFlag(9,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>false,name:"DCACHE_AUTOLOAD_BUFFER_CLEAR")// The bit is used to clear autoload buffer in dcache.
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"ICACHE_SYNC_OP_FAULT_INT_CLR")// The bit is used to clear interrupt by sync configurations fault.
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"ICACHE_PRELOAD_OP_FAULT_INT_CLR")// The bit is used to clear interrupt by preload configurations fault.
.WithFlag(2,FieldMode.Read|FieldMode.Write,name:"DCACHE_SYNC_OP_FAULT_INT_CLR")// The bit is used to clear interrupt by sync configurations fault.
.WithFlag(3,FieldMode.Read|FieldMode.Write,name:"DCACHE_PRELOAD_OP_FAULT_INT_CLR")// The bit is used to clear interrupt by preload configurations fault.
.WithFlag(4,FieldMode.Read|FieldMode.Write,name:"DCACHE_WRITE_FLASH_INT_CLR")// The bit is used to clear interrupt by dcache trying to write flash.
.WithFlag(5,FieldMode.Read|FieldMode.Write,name:"MMU_ENTRY_FAULT_INT_CLR")// The bit is used to clear interrupt by mmu entry fault.
.WithFlag(6,FieldMode.Read|FieldMode.Write,name:"DCACHE_OCCUPY_EXC_INT_CLR")// The bit is used to clear interrupt by dcache trying to replace a line whose blocks all have been occupied by occupy-mode.
.WithFlag(7,FieldMode.Read|FieldMode.Write,name:"IBUS_CNT_OVF_INT_CLR")// The bit is used to clear interrupt by ibus counter overflow.
.WithFlag(8,FieldMode.Read|FieldMode.Write,name:"DBUS_CNT_OVF_INT_CLR")// The bit is used to clear interrupt by dbus counter overflow.
.WithValueField(7,2,FieldMode.Read|FieldMode.Write,name:"CACHE_MMU_OWNER")// The bits are used to specify the owner of MMU.bit0: icache, bit1: dcache, bit2: dma, bit3: reserved.
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"ENA")// The bit is used to enable dcache freeze mode
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"MODE")// The bit is used to configure freeze mode, 0: assert busy if CPU miss 1: assert hit if CPU miss
.WithFlag(2,FieldMode.Read,valueProviderCallback:(_)=>true,name:"DONE")// The bit is used to indicate dcache freeze success
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"ENA")// The bit is used to enable icache freeze mode
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"MODE")// The bit is used to configure freeze mode, 0: assert busy if CPU miss 1: assert hit if CPU miss
.WithFlag(2,FieldMode.Read,valueProviderCallback:(_)=>true,name:"DONE")// The bit is used to indicate icache freeze success
.WithFlag(0,FieldMode.Read|FieldMode.Write,valueProviderCallback:(_)=>iCacheEnabled,writeCallback:(_,val)=>iCacheEnabled=val,name:"ICACHE_ENABLE")// The bit is used to activate the data cache. 0: disable, 1: enable
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"ICACHE_WAY_MODE")// The bit is used to configure cache way mode.0: 4-way, 1: 8-way
.WithFlag(2,FieldMode.Read|FieldMode.Write,name:"ICACHE_SIZE_MODE")// The bit is used to configure cache memory size.0: 16KB, 1: 32KB
.WithFlag(3,FieldMode.Read|FieldMode.Write,name:"ICACHE_BLOCKSIZE_MODE")// The bit is used to configure cache block size.0: 16 bytes, 1: 32 bytes
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"ICACHE_INVALIDATE_ENA")// The bit is used to enable invalidate operation. It will be cleared by hardware after invalidate operation done.
.WithFlag(1,FieldMode.Read,valueProviderCallback:(_)=>true,name:"ICACHE_SYNC_DONE")// The bit is used to indicate invalidate operation is finished.
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"ICACHE_PRELOAD_ENA")// The bit is used to enable preload operation. It will be cleared by hardware after preload operation done.
.WithFlag(1,FieldMode.Read,valueProviderCallback:(_)=>true,name:"ICACHE_PRELOAD_DONE")// The bit is used to indicate preload operation is finished.
.WithFlag(2,FieldMode.Read|FieldMode.Write,name:"ICACHE_PRELOAD_ORDER")// The bit is used to configure the direction of preload operation. 1: descending, 0: ascending.
.WithFlag(0,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_SCT0_ENA")// The bits are used to enable the first section for autoload operation.
.WithFlag(1,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_SCT1_ENA")// The bits are used to enable the second section for autoload operation.
.WithFlag(2,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_ENA")// The bit is used to enable and disable autoload operation. It is combined with icache_autoload_done. 1: enable, 0: disable.
.WithFlag(3,FieldMode.Read,valueProviderCallback:(_)=>true,name:"ICACHE_AUTOLOAD_DONE")// The bit is used to indicate autoload operation is finished.
.WithFlag(4,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_ORDER")// The bits are used to configure the direction of autoload. 1: descending, 0: ascending.
.WithValueField(5,2,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_RQST")// The bits are used to configure trigger conditions for autoload. 0/3: cache miss, 1: cache hit, 2: both cache miss and hit.
.WithValueField(7,2,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_SIZE")// The bits are used to configure the numbers of the cache block for the issuing autoload operation.
.WithFlag(9,FieldMode.Read|FieldMode.Write,name:"ICACHE_AUTOLOAD_BUFFER_CLEAR")// The bit is used to clear autoload buffer in icache.
.WithValueField(0,12,FieldMode.Read,valueProviderCallback:(_)=>{if(iCacheEnabled)return1;elsereturn0;},name:"ICACHE_STATE")// The bit is used to indicate whether icache main fsm is in idle state or not. 1: in idle state, 0: not in idle state
.WithValueField(12,12,FieldMode.Read,valueProviderCallback:(_)=>{if(dCacheEnabled)return1;elsereturn0;},name:"DCACHE_STATE")// The bit is used to indicate whether dcache main fsm is in idle state or not. 1: in idle state, 0: not in idle state