⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 data.vhd

📁 nand flash NAND01GR3B (st)的仿真模型 (VHDL) 的
💻 VHD
📖 第 1 页 / 共 2 页
字号:
  -- sub-address types  Subtype  BlockAddress_type     is  Std_Logic_Vector(BlockAddress_normRange);  Subtype  TotBlockAddress_type     is  Std_Logic_Vector(AddressWidthMax_max-1-BlockAddressInf downto 0);   -- memory organization  type PageSize_dev_type is array(bus_type) of natural;  constant PageSize_dev : PageSize_dev_type := (2112, 1056) ; -- 2048 word + 64 spare / 1024 + 32    Constant PageSize          : Natural := PageSize_dev(CD.bus_dev) ;     Constant nPage             : Natural := 64;     -- Number of Pages for each block  Constant BlockSize         : Natural := nPage * 2**(ColumnAddressSup+1); -- Block size [number of word]     -- (also contain the not valid addresses, when A10 = 1 and out of spare Area)  Constant nBlock      : Natural := (2**CD.AddressWidth_dev)/BlockSize ;            -- Page & block number range  Subtype  PageNum_range  is natural range nPage  - 1 downto 0;  SubType  BlockNum_range is natural range nBlock - 1 downto 0;  -- Electronic Signature constants   Constant ManufacturerCode : bit_vector(IObus_range_ext) := X"0020";  Constant ThirdColumn      : bit_vector(IObus_range_ext) := X"0000";  type FourthColumn_dev_type is array(bus_type) of bit_vector(IObus_range_ext);  constant FourthColumn_dev : FourthColumn_dev_type := (X"0016", X"0044") ;  Constant FourthColumn     : bit_vector(IObus_range_ext) := FourthColumn_dev(CD.bus_dev) ;  -------------------------------------------------- TIPI E COSTANTI USATI DA ENTITA' SPECIFICHE------------------------------------------------Type vectorBoolean_type is array (Integer range <>) of boolean;SubType Event is boolean;SubType TimeEvent is Time;Type vectorTimeEvent_type is array (Integer range <>) of TimeEvent;type PageBuffer_eventType is ( genericEv, pageLoad_forCacheRead ); Type PageBufferEvent is record   eventTime  : TimeEvent;   eventType  : PageBuffer_eventType;end record;Type vectorPageBufferEvent is array (Integer range <>) of PageBufferEvent;-- Message type (used in status_type)type message_type is ( NoError_msg, CmdSeq_msg, SuspCmd_msg, SuspAcc_msg , InvAddrRange_msg,                       AddrTog_msg, BuffSize_msg, SuspAccWarn_msg,                        InvVDD_msg, InvVPP_msg,                       BlockLockError_msg, BlockLockDown_msg, LockModeError_msg,                       ByteToggle_msg, BlkBuffer_msg, AddrCFI_msg, PreProg_msg, NoBusy_msg,                       NoSusp_msg, Suspend_msg, UDNlock_msg, UPlock_msg,                       Busy_msg, PRegPreProg_msg,                        NoOPallowed_msg, NoOPSameBlock_msg, NoOPguaranteed_msg, -- for Multiple Bank                       WrongReg_msg,   -- Error -- Register Address Error -- Register not found                       NoRegWrite_msg, -- Error -- is not possible write in this register                       NoRegRead_msg,  -- Error -- is not possible Read in this register                       InvDataUnitCount_msg,   -- Error -- invalid Data Unit Count in Start Buffer Register                       InvPartialDataUnit_msg, -- ???Warning??? -- invalid Partial Data Unit from command                       ResetInLoad_msg,    -- Error -- Reset down in Load Operation                       ResetInReadAll1_msg,    -- Error -- Reset down in Read All 1 Operation                       ResetInErase_msg,    -- Error -- Reset down in Erase Operation                       ResetInProgram_msg,  -- Error -- Reset down in Program Operation                       BlockAddrError_msg,  -- Error -- the Start Block Address is greater than the End Block Address                        StartBlockRegOutOfBound_msg,  -- Warning -- Start Block Address Register Out of Bound                       EndBlockRegOutOfBound_msg,    -- Warning -- Start Block Address Register Out of Bound                       NoUnLockBlock_msg,   -- Warning -- Invalid Lock Block operation in Locked-Down Block                       NoLockBlock_msg,     -- Warning -- Invalid UnLock Block operation in Locked-Down Block                       NoLockDownBlock_msg, -- Warning -- Invalid Lock-Down Block operation in Unlocked Block                       InvReadID_msg,       -- Warning -- Invalid Read ID Address                        OTPlock_msg, resetCDI_msg,   -- Added by GT                       GENERIC_ERROR_msg    -- Errore Generico                     );   -- Status of read operation    Type ReadModeName_type is ( ReadArray_status,  RandomDataOutput_status, RandomDataInput_status, CacheRead_status,                               ReadElectSignature_status, ReadStatusReg_status, ReadExtStatusReg_status, ReadBlockLock_status                            );   Type ReadMode_type is record        Mode: ReadModeName_type;        eventTime  : time;   End record;   Type vectorReadMode_type is array (Integer range <>) of ReadMode_type;    type ProgramMode_type is (none_mode, PageProgram_mode, CacheProgram_mode, CopyBackProgram_mode);  -- Device Status  Type Status_type is Record        Busy      : Boolean;        message   : Message_type;        isError   : Boolean;         updateTime : time;        resIndex : natural ;  End Record;  Type vectorStatus_type is array (Integer range <>) of Status_type;-- Declarations for Kernel and CUI decoder    type KernelReport_type is record        status : message_type;       eventTime : time;  end record;  type vectorKernelReport_type is array (Integer range <>) of KernelReport_type;  SubType ErrorEvent is Std_Logic;  Type vectorErrorEvent_type is array (Integer range <>) of ErrorEvent;   SubType IndexCommand_type is Integer;  Type vectorIndexCommand_type is array (Integer range <>) of IndexCommand_type;-- Output Buffer type BufferTaskName_type is (setDataValid, SetDataX, SetDataZ);type BufferTask_type is record        task: BufferTaskName_type;        putTime: time;        eventTime : time;end record;Type vectorBufferTask_type is array (Integer range <>) of BufferTask_type;-- Read Array type ReadTaskName_type is (none, Cache, RandomDataOutput, ReadArray, ReadBlockLock, ReadExtStatus);type ReadTask_type is record        Task      : ReadTaskName_type;        Address   : Address_type;        EventTime : time;end record;Type vectorReadTask_type is array (Integer range <>) of ReadTask_type;-- Page Buffer type PageBuffer_type is array (0 to PageSize - 1) of DataMem_type;type PageBufferTaskName_type is (none, BlockErase,ClearBuffer, ResetLen,  GetData, PutData,        PutAllDataToMemory, PutDataToMemory, ResetIndex, SetIndex, PutDataFromMemory, PutAllDataFromMemory,      PutAllPageToMemory, PutMemAddress, PutCopyBackData, CacheLoad, CacheEmpty);type PageBufferTask_type is record        task: PageBufferTaskName_type;        data: DataMem_type;        Index : Natural range 0 to PageSize - 1;        MemAddress : Natural;        MemAddressEnd : Natural;        ColAddress : Natural;        eventTime : time;        resIndex : natural range 0 to 3;end record;Type vectorPageBufferTask_type is array (Integer range <>) of PageBufferTask_type;-- Memory Constant MemBufferSize_dim : Natural := PageSize;type MemBuffer_type is array (0 to MemBufferSize_dim - 1) of DataMem_type;type MemTaskName_type is (none, init, put, get, BlockErase, getBlock, putBlock, ReadIFall1, load, save, printList, printData);     type MemoryTask_type is record         task     : MemTaskName_type;         data     : DataMem_type;         address  : AddrMem_type;         addressEnd : AddrMem_type;         MemBuffer: MemBuffer_type;         isAll1   : Boolean;       eventTime  : time;     end record;Type vectorMemoryTask_type is array (Integer range <>) of MemoryTask_type;-- Program        Type ProgTaskName_type is (none, PageProgram, CacheProgram, CopyBackProgram);     type ProgramTask_type is record        task          : ProgTaskName_type;        Address       : AddrMem_type;        eventTime     : time;     end record;    Type vectorProgramTask_type is array (Integer range <>) of ProgramTask_type;-- Erasetype EraseTaskName_type is (none, BlockErase);   constant BKEsetup_code   : natural := 16#60#;constant BKEconfirm_code : natural := 16#D0#;type EraseTask_type is record        task            : EraseTaskName_type;        BlockNumber      : Natural;         eventTime       : time;end record;Type vectorEraseTask_type is array (Integer range <>) of EraseTask_type;-- Electronic Signature  Type SignatureData_type is record     ManufacturerCode         : DataMem_type;     DeviceCode               : DataMem_type;       ThirdColumn              : DataMem_type;     FourthColumn             : DataMem_type;End Record;Type vectorSignatureData_type is array (Integer range <>) of SignatureData_type;-- Status registerType StatusRegisterTaskName_type is (none, Clear, Read, UpDateRegister);     Type StatusRegisterTask_type is record          task          : StatusRegisterTaskName_type;          SR            : DataReg_Type;          eventTime     : time;     End Record;Type vectorStatusRegisterTask_type is array (Integer range <>) of StatusRegisterTask_type;-- CacheType CacheStatus_type is record    isCacheMode : boolean ;    busy        : boolean ;    isLastPage  : boolean ;     eventTime   : time ;end record;Type vectorCacheStatus_type is array (Integer range <>) of CacheStatus_type;end data;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -