📄 nand01gr3b.vhd
字号:
End if; End Process cmdProcess_PageProgramCfm;----------------------------------------------------------- RandomDataInput Commmand ------------------------------------------------------------------------------cmdProcess_RandomDataInput: Process begin Wait until Kernel_CommandDecode'transaction'event; If (Kernel_CommandDecode = RandomDataInput_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Random Data Input)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Random Data Input"); isFirstData := true; Read_mode.mode <= RandomDataInput_status; Read_mode.eventTime <= now; PageBuffer_task.task <= ResetIndex; PageBuffer_task.MemAddress <= 0; -- NP PageBuffer_task.MemAddressEnd <= 0; -- NP PageBuffer_task.ColAddress <= 0; -- NP PageBuffer_task.eventTime <= now; PageBuffer_task.Index <= 0; -- NP PageBuffer_task.data <= (others => '0'); -- NP PageBuffer_task.resIndex <= 0; -- NP wait until Kernel_PageComplete'event; End if; End if;End Process cmdProcess_RandomDataInput;----------------------------------------------------------- CopyBackProgram Commmand ------------------------------------------------------------------------------cmdProcess_CopyBackProgramSetup: Process Variable AddressWithColumn0 : Address_type; begin Wait until Kernel_CommandDecode'transaction'event; If (Kernel_CommandDecode = CopyBackProgramCmdCode_cmd and Read_mode.mode=ReadArray_status) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Copy Back Program)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Copy Back Program [Read Phase completed]"); isCopyBackCmdCode := true; waitFirstCopyBackAddress := true; updateCopyBackMode <= now; Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; -- Call to Read task Read_task.task <= ReadArray; Read_task.Address <= hold_address; Read_task.eventTime <= now; wait until Kernel_ReadTaskComplete'event; -- Read Memory Page and storage in the Page Buffer PageBuffer_task.task <= PutAllDataFromMemory; PageBuffer_task.MemAddressEnd <= 0; -- Address = 0 PageBuffer_task.ColAddress <= 0; -- Set MemAddress with coloumn address = 0 AddressWithColumn0 := hold_address(BlockAddress_range) & hold_address(PageAddress_range) & ColumnAddress0; PageBuffer_task.MemAddress <= slv2int(AddressWithColumn0); PageBuffer_task.eventTime <= now; PageBuffer_task.Index <= 0; -- NP PageBuffer_task.data <= (others => '0'); -- NP PageBuffer_task.resIndex <= 0; -- NP wait until Kernel_PageComplete'event; end if; End if; End Process cmdProcess_CopyBackProgramSetup;cmdProcess_CopyBackProgramCfm: Process begin Wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = CopyBackProgramCfmCode_cmd and isCopyBackCmdCode) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Copy Back Program)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Copy Back Program [Copy Back Phase]"); isPageProgramCmdCode := true; isFirstData := true; Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; end if; End if; End Process cmdProcess_CopyBackProgramCfm;process_updateCopyBackMode : process begin wait until updateCopyBackMode'event; if isCopyBackCmdCode then isCopyBackMode <= true; else isCopyBackMode <= false; end if;end process process_updateCopyBackMode;----------------------------------------------------------- CacheProgram Commmand ---------------------------------------------------------------------------------cmdProcess_CacheProgramCfm: Process begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = CacheProgramCfmCode_cmd and isPageProgramCmdCode) then if (CacheStatus.isCacheMode and not(CacheStatus.busy)) or not(Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Cache Program"); PageBuffer_task.task <= PutMemAddress; PageBuffer_task.MemAddress <= slv2int(hold_address); PageBuffer_task.MemAddressEnd <= 0; PageBuffer_task.ColAddress <= slv2int(hold_address(ColumnAddress_range)); PageBuffer_task.eventTime <= now; PageBuffer_task.Index <= 0; -- NP PageBuffer_task.data <= (others => '0'); -- NP PageBuffer_task.resIndex <= 0; -- NP wait until Kernel_PageComplete'event; PageBuffer_task.task <= CacheLoad; PageBuffer_task.eventTime <= now; else PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Cache Program)"); end if; end if;End Process cmdProcess_CacheProgramCfm;process_CacheProgramControl: Process begin wait until Kernel_CommandDecode'transaction'event;if (Kernel_CommandDecode = CacheProgramCfmCode_cmd) then if (CacheStatus.isCacheMode and not(CacheStatus.busy)) or not(Kernel_Status.busy) then wait until Program_Status.message'event; Kernel_Report.status <= Program_Status.message; Kernel_Report.eventTime <= now; end if;end if; end process;process_ExitCacheMode: Process begin Wait until Kernel_CommandDecode'transaction'event or (reset'event and reset=true);If not(Kernel_Status.busy) and (Kernel_CommandDecode /= CacheProgramCfmCode_cmd) and (Kernel_CommandDecode /= PageProgramCmdCode_cmd) and (Kernel_CommandDecode /= PageProgramCfmCode_cmd) and (Kernel_CommandDecode /= None) then if (CacheStatus.isCacheMode) then CacheStatus.isCacheMode <= false; CacheStatus.eventTime <= now; CacheStatus.isLastPage <= false; CacheStatus.busy <= false; -- NP end if;end if;end process;----------------------------------------------------------- BlockErase Commmand -----------------------------------------------------------------------------------cmdProcess_BlockErase: Process beginwait until Kernel_CommandDecode'transaction'event;if (Kernel_CommandDecode = BlockErase_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Block Erase)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Block Erase" & " (block " & int2str(slv2int(hold_block)) & ")" ); Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; Erase_task.task <= BlockErase; Erase_task.BlockNumber <= slv2int(hold_block); Erase_task.eventTime <= now; wait until Erase_Status.message'event; Kernel_Report.status <= Erase_status.message; Kernel_Report.eventTime <= now; end if;end if;end process cmdProcess_BlockErase;----------------------------------------------------------- Read Status Register Commmand -------------------------------------------------------------------------cmdProcess_ReadStatusRegister: Process beginwait until (Kernel_CommandDecode'transaction'event); if (Kernel_CommandDecode = ReadStatusRegister_cmd) then PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Read Status Register "); if (read_mode.mode = CacheRead_status) then PrintString("[" & time2str(now) & "] " & chip_indication & "isSR_underCACHEREAD := true;"); isSR_underCACHEREAD := true; end if; Read_mode.mode <= readStatusReg_status; Read_mode.eventTime <= now; end if;end process cmdProcess_ReadStatusRegister;---------------------------------------------------------------- Read Electronic Signature Commmand -----------------------------------------------------------------------------cmdProcess_ReadElectronicSignature: Process beginwait until (Kernel_CommandDecode'transaction'event); if (Kernel_CommandDecode'transaction'event and Kernel_CommandDecode = ReadElectronicSignature_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Read Electronic Signature)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Read Electronic Signature "); Read_mode.mode <= ReadElectSignature_status; Read_mode.eventTime <= now; end if; end if; end process cmdProcess_ReadElectronicSignature;------------------------------------------------ Block Lock Command -------------------------------------------------------------cmdProcess_BlockLock: Process beginwait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = BlockLock_cmd and PowerUp=false) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Block Lock)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Blocks Lock"); isLatchBlockAddress := true; Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; BlockLock_task.task <= putLock; BlockLock_task.currentStatus <= LOCK; BlockLock_task.startBlock <= 0; BlockLock_task.endBlock <= 0; BlockLock_task.address <= 0; BlockLock_task.isUnLocked <= false; BlockLock_task.eventTime <= now; wait until Kernel_BlockLockComplete'event; Kernel_Report.status <= BlockLock_status.message; Kernel_Report.eventTime <= now; end if; end if; end process cmdProcess_BlockLock;------------------------------------------------------ Block Lock Down Command -----------------------------------------------------------------cmdProcess_BlockLockDown: Process Begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = BlockLockDown_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -