📄 nand01gr3b.vhd
字号:
Buffer_task.putTime <= tEHQX(CD.TimeIndex_dev); Buffer_task.task <= setDataX; Buffer_task.eventTime <= now; wait for 0 fs; Buffer_task.putTime <= tEHQZ(CD.TimeIndex_dev); Buffer_task.task <= setDataZ; Buffer_task.eventTime <= now; elsif (R_N_d1'event) then -- Bus Release controlled by R_N Buffer_task.putTime <= tRHQX(CD.TimeIndex_dev); Buffer_task.task <= setDataX; Buffer_task.eventTime <= now; wait for 0 fs; Buffer_task.putTime <= tRHQZ(CD.TimeIndex_dev); Buffer_task.task <= setDataZ; Buffer_task.eventTime <= now; end if; end if; end Process process_OutputEnableSetTiming;----------------------------------------------------------------------------------------------------------------------------------------------------- PROCESSES FOR DEVICE COMMANDS ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Read Commmand -----------------------------------------------------------------------------------------cmdProcess_ReadSetup: Process Variable tempIndex_slv : Std_Logic_vector(11 downto 0); Variable tempIndex_int : Integer; begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = ReadCmdCode_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Read Memory Array setup)"); elsif (isSR_underCACHEREAD) then PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Exit from Read Status Register and return to Cache Read"); isSR_underCACHEREAD:= false; Read_mode.mode <= CacheRead_status; Read_mode.eventTime <= now; else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Read Memory Array [First Code]"); Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; end if; end if;end process cmdProcess_ReadSetup;cmdProcess_ReadCfm: Process Variable tempIndex_slv : Std_Logic_vector(11 downto 0); Variable tempIndex_int : Integer; begin wait until Kernel_CommandDecode'transaction'event; if Kernel_CommandDecode = ReadCfmCode_cmd then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Read Memory Array confirm)"); else Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Read Memory Array [Confirm Code]"); -- 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 <= PutDataFromMemory; PageBuffer_task.MemAddress <= slv2int(hold_Address); PageBuffer_task.MemAddressEnd <= 0; -- NP Address = 0 PageBuffer_task.ColAddress <= 0; -- NP PageBuffer_task.Index <= slv2int(hold_Address(ColumnAddress_range)); PageBuffer_task.eventTime <= now; PageBuffer_task.data <= (others => '0'); -- NP PageBuffer_task.resIndex <= 0; -- NP wait until Kernel_PageComplete'event; end if; end if;end process cmdProcess_ReadCfm;----------------------------------------------------------- RandomDataOutput Commmand -----------------------------------------------------------------------------cmdProcess_RandomDataOutputSetup: Process begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = RandomDataOutputCmdCode_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Random Data Output setup)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Random Data Output [Setup Code]"); Read_mode.mode <= RandomDataOutput_status; Read_mode.eventTime <= now; end if; end if; End Process cmdProcess_RandomDataOutputSetup;cmdProcess_RandomDataOutputCfm: Process begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = RandomDataOutputCfmCode_cmd and Read_mode.mode=RandomDataOutput_status) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Random Data Output confirm)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Random Data Output [Confirm Code]"); Read_task.task <= RandomDataOutput; Read_task.Address <= hold_address; Read_task.eventTime <= now; wait until Kernel_ReadTaskComplete'event; PageBuffer_task.task <= PutAllDataFromMemory; PageBuffer_task.MemAddress <= slv2int(hold_Address); PageBuffer_task.MemAddressEnd <= 0; -- Address = 0 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_RandomDataOutputCfm;----------------------------------------------------------- Cache Read Commmand -----------------------------------------------------------------------------------cmdProcess_CacheRead: Process begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = CacheRead_cmd and Read_mode.mode=ReadArray_status) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Cache Read)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Cache Read"); Read_mode.mode <= CacheRead_status; Read_mode.eventTime <= now; Read_task.task <= Cache; Read_task.Address <= hold_address; Read_task.eventTime <= now; wait until Kernel_ReadTaskComplete'event; end if; end if;End Process cmdProcess_CacheRead;cmdProcess_ExitCacheRead: Process begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = ExitCacheRead_cmd) then if (Kernel_Status.busy) then PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Exit Cache Read)"); else PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Exit Cache Read"); Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; end if; end if;End Process cmdProcess_ExitCacheRead;----------------------------------------------------------- PageProgram Commmand ----------------------------------------------------------------------------------cmdProcess_PageProgramSetup: Process begin wait until Kernel_CommandDecode'transaction'event; if (Kernel_CommandDecode = PageProgramCmdCode_cmd) then if ((CacheStatus.isCacheMode and not(CacheStatus.busy)) or not(Kernel_Status.busy) ) then PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Page or Cache Program [Sequential Data Input default]"); isPageProgramCmdCode := true; isFirstData := true; Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; PageBuffer_task.task <= ClearBuffer; PageBuffer_task.eventTime <= now; PageBuffer_task.MemAddress <= 0; -- NP; PageBuffer_task.MemAddressEnd <= 0; -- Address = 0 PageBuffer_task.ColAddress <= 0; -- NP PageBuffer_task.Index <= 0; -- NP; PageBuffer_task.data <= (others => '0'); -- NP PageBuffer_task.resIndex <= 0; -- NP wait until Kernel_PageComplete'event; else PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Page or Cache Program)"); end if; end if;End Process cmdProcess_PageProgramSetup; cmdProcess_PageProgramCfm: Process Variable AddressWithColumn0 : Address_type; begin wait until Kernel_CommandDecode'transaction'event; If (Kernel_CommandDecode = PageProgramCfmCode_cmd and isPageProgramCmdCode) then if ((CacheStatus.isCacheMode and not(CacheStatus.busy)) or not(Kernel_Status.busy) ) then PrintString("[" & time2str(now) & "] " & chip_indication & "Command Issued: Page Program [Confirm Code]"); if (CacheStatus.isCacheMode) then 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; CacheStatus.isLastPage <= true; CacheStatus.eventTime <= now; CacheStatus.busy <= true; -- NP CacheStatus.isCacheMode <= true; -- NP else isPageProgramCmdCode := false; isFirstCPoperation := true; Read_mode.mode <= ReadArray_status; Read_mode.eventTime <= now; PageBuffer_task.task <= PutMemAddress; PageBuffer_task.MemAddress <= slv2int(hold_address); PageBuffer_task.MemAddressEnd <= 0; -- Address = 0 PageBuffer_task.ColAddress <= slv2int(hold_address(ColumnAddress_range)); PageBuffer_task.eventTime <= now; PageBuffer_task.Index <= 0; -- NP PageBuffer_task.data <= (others => '0'); -- NP wait until Kernel_PageComplete'event; if isCopyBackCmdCode then Program_task.task <= CopyBackProgram; -- Set Address with coloumn address = 0 AddressWithColumn0 := hold_address(BlockAddress_range) & hold_address(PageAddress_range) & ColumnAddress0; PageBuffer_task.MemAddress <= slv2int(AddressWithColumn0); Program_task.address <= slv2int(AddressWithColumn0); else Program_task.task <= PageProgram; Program_task.address <= slv2int(hold_address); end if; isCopyBackCmdCode := false; updateCopyBackMode <= now; --not updateCopyBackMode Program_task.eventTime <= now; wait until Program_Status.message'event; Kernel_Report.status <= Program_Status.message; Kernel_Report.eventTime <= now; end if; else PrintString("[" & time2str(now) & "] " & chip_indication & "#Warning: Device is Busy Command Ignored (Page Program confirm)"); end if;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -