DuneNvme 1.0.2 This is a simple NVMe test environment that allows experimentation with the low level PCIe NVMe interfaces as available on a Xilinx FPGA environment. |
This module performs the Nvme write data functionality. More...
Entities | |
Behavioral | architecture |
Libraries | |
ieee | |
unisim | |
work |
Use Clauses | |
std_logic_1164 | |
numeric_std | |
vcomponents | |
NvmeStoragePkg | Package <NvmeStoragePkg> |
NvmeStorageIntPkg | Package <NvmeStorageIntPkg> |
Generics | |
Simulate | boolean := False |
Generate simulation core. | |
ClockPeriod | time := 8 ns |
The clocks period. | |
BlockSize | integer := NvmeStorageBlockSize |
System block size. | |
NvmeBlockSize | integer := 512 |
The NVMe's formatted block size. | |
NvmeTotalBlocks | integer := 134217728 |
The total number of 4k blocks available. |
Ports | ||
clk | in | std_logic |
The interface clock line. | ||
reset | in | std_logic |
The active high reset line. | ||
enable | in | std_logic |
Enable the data writing process. | ||
dataIn | inout | AxisStreamType := AxisStreamInput |
Raw data to save stream. | ||
waitingForData | out | std_logic |
Set when dataIn is empty so other tasks can be run. | ||
complete | out | std_logic |
Set when capture process is complete. | ||
requestOut | inout | AxisStreamType := AxisStreamOutput |
To Nvme request stream (3) | ||
replyIn | inout | AxisStreamType := AxisStreamInput |
from Nvme reply stream | ||
memReqIn | inout | AxisStreamType := AxisStreamInput |
From Nvme request stream (4) | ||
memReplyOut | inout | AxisStreamType := AxisStreamOutput |
To Nvme reply stream. | ||
regWrite | in | std_logic |
Enable write to register. | ||
regAddress | in | unsigned ( 3 downto 0 ) |
Register to read/write. | ||
regDataIn | in | std_logic_vector ( 31 downto 0 ) |
Register write data. | ||
regDataOut | out | std_logic_vector ( 31 downto 0 ) |
Register contents. | ||
regData | out | std_logic_vector ( 31 downto 0 ) |
Status register contents. |
Detailed Description
This module performs the Nvme write data functionality.
This module performs basic Nvme write data functionality.
- Date
- 2020-08-10
- Version
- 1.0.0
This module is the heart of the DuneNvmeStorage system. It's purpose is to write the incomming data blocks to the Nvme device. For performance it will concurrently write NvmeWriteNum (8) blocks. It implements a set of NvmeWriteNum x 4k buffers in RAM.
The module is controlled by the enable line, which enables the processing of input data, and the dataChunkStart and dataChunkSize registers. The dataChunkSize register specifies how many blocks to capture. It will continue to capture whilst the enable line is high and the number of blocks captured is less than the number of blocks in the dataChunkSize register.
On the start of a new data chunk capture, when the enable line goes high, the module will begin sending Trim/Deallocate requests to the Nvme drive as well as the data block data as it arrives. The unit sends the first Trim/Deallocate request before any data blocks and queues a maximum of 4 trim requests active at a time untill the entire data chunk region has been deallocated. Each trim request deallocates up to 32768 Nvme sized data blocks at a time.
For the incomming data blocks, an input process chooses a free buffer and then writes the data from the data input AXIS stream into this buffer. Once complete, when the last signal is set, the input process adds the buffer's number to a processing queue. A process then takes buffer number requests from the processing queue. When available an Nvme write request is sent to the Nvme write queue. On the Nvme reading the queue entry (from the NvmeQueue engine) it will perform "bus master" memory reads from the appropriate data buffer. Once the Nvme has completed the write (well taken in the write data) it will send a reply to the reply queue. The NvmeWrite's reply process will process these, storing any error status, and then will free the buffer that was used.
As the system allows up to NvmeWriteNum concurrent writes, it is able to hide ittermitant large write latencies. Notes: The parameter NvmeWriteNum should be less than NvmeQueueNum and leave room for 4 trim requests. It assumes the DuneDvme block size is set in BlockSize and the DataIn stream's last signal is synchonised with the end of each input block. At the moment it assumes the Nvme's internal block size is NvmeBlockSize Bytes (typically 512). At the moment it stores the first status reply error but continues running ignoring the error. There are no timeouts or any other error handling. It will limit the dataChunkSize to the value of the parameter NvmeTotalBlocks.
- Copyright
- 2020 Beam Ltd, Apache License, Version 2.0 Copyright 2020 Beam Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
- Date
- 2020-04-14
- Version
- 0.0.1
This is an intial, simplistic NvmeWrite implementation. It could be still useful for testing/debug of issues.
- Copyright
- 2020 Beam Ltd, Apache License, Version 2.0 Copyright 2020 Beam Ltd Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Member Data Documentation
◆ regAddress
| Port |
Register to read/write.
Status register to read.
The documentation for this class was generated from the following files:
- /src/dune/source/DuneNvme/src/NvmeWrite.vhd
- /src/dune/source/DuneNvme/src/NvmeWriteBasic.vhd
Generated by 1.8.15