Package: flash_ctrl_env_pkg
- File: flash_ctrl_env_pkg.sv
Description
Copyright lowRISC contributors.
Licensed under the Apache License, Version 2.0, see LICENSE for details.
SPDX-License-Identifier: Apache-2.0
Constants
| Name | Type | Value | Description |
|---|---|---|---|
| LIST_OF_ALERTS | string | parameters | |
| uint | uint | 4 | |
| FlashNumPages | uint | flash_ctrl_pkg::NumBanks * flash_ctrl_pkg::PagesPerBank | |
| FlashSizeBytes | uint | FlashNumPages * flash_ctrl_pk | |
| BytesPerPage | uint | FlashSizeBytes / FlashNumPages | Number of bytes in each of the flash pages. |
| BytesPerBank | uint | FlashSizeBytes / flash_ctrl_pkg::NumBanks | Num of bytes in each of the flash banks for each of the flash partitions. |
| InfoTypeBytes | uint | undefined | |
| FlashNumBusWords | uint | FlashSizeBytes / top_pkg::TL_DBW | |
| FlashNumBusWordsPerBank | uint | FlashNumBusWords / flash_ctrl_pkg::NumBanks | |
| FlashNumBusWordsPerPage | uint | FlashNumBusWordsPerBank / flash_ctrl_pkg::PagesPerBank | |
| FlashBankBytesPerWord | uint | flash_ctrl_pkg::DataWidth / 8 | |
| uint | uint | $clog2(FlashBankBytesPerWord) | |
| uint | uint | $clog2(flash_ctrl_pkg::WordsPerPage) | |
| uint | uint | $clog2(flash_ctrl_pkg::PagesPerBank) | |
| uint | uint | $clog2(flash_ctrl_pkg::NumBanks) | |
| uint | uint | flash_ctrl_pkg::BusPgmRes | |
| uint | uint | $clog2(FlashPgmRes) | |
| FlashMemAddrWordMsbBit | uint | FlashDataByteWidth - 1 | |
| FlashMemAddrLineMsbBit | uint | FlashDataByteWidth + FlashWordLineWidth - 1 | |
| FlashMemAddrPageMsbBit | uint | FlashDataByteWidth | |
| FlashMemAddrBankMsbBit | uint | FlashDataByteWidth + FlashWordLineW |
Types
| Name | Type | Description |
|---|---|---|
| flash_ctrl_intr_e | enum int { FlashCtrlIntrProgEmpty = 0, FlashCtrlIntrProgLvl = 1, FlashCtrlIntrRdFull = 2, FlashCtrlIntrRdLvl = 3, FlashCtrlIntrOpDone = 4, FlashCtrlIntrErr = 5, NumFlashCtrlIntr = 6 } |
types |
| flash_mem_init_e | enum { FlashMemInitCustom, FlashMemInitSet, FlashMemInitClear, FlashMemInitRandomize, FlashMemInitInvalidate } |
|
| flash_dv_part_e | enum logic [flash_ctrl_pkg::InfoTypes:0] { FlashPartData = 0, FlashPartInfo = 1, FlashPartInfo1 = 2, FlashPartRedundancy = 4 } |
Data partition and all info partitions |
| flash_mp_region_cfg_t | struct packed { bit en; bit read_en; bit program_en; bit erase_en; uint num_pages; uint start_page; } |
|
| flash_bank_mp_info_page_cfg_t | struct packed { bit en; bit read_en; bit program_en; bit erase_en; } |
|
| flash_op_t | struct packed { flash_dv_part_e partition; flash_erase_e erase_type; flash_op_e op; uint num_words; bit [TL_AW-1:0] addr; } |
|
| data_q_t | logic [TL_DW-1:0] | Data queue for flash transactions |