Cosmos OpenSSD + Hardware and Software source distribution
The new address of the official homepage of the OpenSSD project is openssd.dev.
Cosmos OpenSSD + Hardware and Software source distribution
License: GNU General Public License v3.0
Cosmos OpenSSD + Hardware and Software source distribution
The new address of the official homepage of the OpenSSD project is openssd.dev.
ECC-related modules in Tiger4NSC and BCHSharedKESforTiger4 of IPRepo 1.0.0 and predefined project 2Ch-8Way 1.0.0 have a bug, and the ECC module always reports page read failure (ECC fail) on read operation. We are aware of this issue and preparing source code patches.
Hi all,
I'm trying to debug an issue. I've got the following state:
Firmware console:
FTL reset complete!!!
Turn on the host PC
IRQ: 0x1
PCIe Link: 1
IRQ: 0x1
PCIe Link: 0
NVMe reset!!!
IRQ: 0x1
PCIe Link: 1
IRQ: 0x2
PCIe Bus Master: 0
IRQ: 0x2
PCIe Bus Master: 0
IRQ: 0x2
PCIe Bus Master: 1
IRQ: 0x4
PCIe IRQ Disable: 0
IRQ: 0x8
PCIe MSI Enable: 1, 0x0
IRQ: 0x20
NVME CC.EN: 1
NVMe ready!!!
Linux host (Kernel v4.12.8):
[ 0.421172] pci 0000:0b:00.0: [10ee:7028] type 00 class 0x010802
[ 0.421190] pci 0000:0b:00.0: reg 0x10: [mem 0xfb100000-0xfb101fff]
...
[ 4.850055] nvme nvme0: pci function 0000:0b:00.0
after 60 seconds timeout:
IRQ: 0x20
NVME CC.EN: 0
NVMe reset!!!
IRQ: 0x8
PCIe MSI Enable: 0, 0x0
IRQ: 0x4
PCIe IRQ Disable: 1
IRQ: 0x2
PCIe Bus Master: 0
[ 64.796608] nvme nvme0: I/O 41 QID 0 timeout, disable controller
[ 64.900752] nvme nvme0: Identify Controller failed (-4)
[ 64.900759] nvme nvme0: Removing after probe failure status: -5
Could it be that the problem happens because of the alignment issue (4 vs 16 bytes)?
If you have any tips how to debug this further please let me know.
Thank you in advance.
Best Regards,
Dmitry Voytik.
Reading operation doesn't work if an erase and/or a program operation was issued before:
#include "low_level_scheduler.h"
#include "fmc_driver.h"
#include "memory_map.h"
#include "init_ftl.h"
#include <stdio.h>
void test_read()
{
unsigned int chNo;
unsigned int wayNo;
unsigned int *status = (unsigned int *)(COMPLETE_TABLE_ADDR);
void *pageDataBuf = (void *)BUFFER_ADDR;
void *spareDataBuf = (void *)SPARE_ADDR;
unsigned int *errorInfo = (unsigned int *)ERROR_INFO_TABLE_ADDR;
printf("test read start...\r\n");
InitChCtlReg();
for(chNo = 0; chNo < CHANNEL_NUM; ++chNo) {
for(wayNo = 0; wayNo < WAY_NUM; ++wayNo) {
V2FResetSync(chCtlReg[chNo], wayNo);
V2FEnterToggleMode(chCtlReg[chNo], wayNo);
}
}
while (!(V2FReadyBusyAsync(chCtlReg[0]) & 1)) { /* spin */ }
#if 0 // REMOVE THIS LINE
// erase block
V2FEraseBlockAsync(chCtlReg[0], 0, 0);
V2FStatusCheckAsync(chCtlReg[0], 0, status);
while (1) {
while (!(*status & 1)) { /* spin */ }
if (((*status >> 1) & 0x60) == 0x60) {
if ((*status >> 1) & 3) {
printf("FAIL: status: %x", *status);
}
break;
// again
}
V2FStatusCheckAsync(chCtlReg[0], 0, status);
}
#endif // REMOVE THIS LINE
V2FReadPageTransferAsync(chCtlReg[0], 0, pageDataBuf, spareDataBuf,
errorInfo, status, 0);
while (!(*status & 1)) { /* spin */ }
printf("test read OK\r\n");
}
If you remove lines marked as "REMOVE THIS LINE" in the above code example then the erase command is executed before the read page command. *status variable is never updated and the last while loop always spins.
Could you please check if you also can observe this issue?
I test this code on commit 3242242 2017-08-23 openssd J89 (on) -> J82 (off) @ p.63
because the latest commit doesn't work (please see #10)
Currently, NVMe host controller does not support 4 b aligned data transfer, so if host PC issues some commands which requires 4 b aligned data transfer, Cosmos+ firmware would hang.
We are preparing a software-based workaround.
NAND flash memory device of 1 TB memory module requires minimum error correction rate of 100 b/4 KB; however, BCH ECC module in Cosmos+ can correct 13 error bits in 256 B chunk. Although total correctable error bit rates is 208b/4KB and looks higher than minimum requirements, it might not be able to correct 100 b of burst error bits.
The reason why BCH ECC module in Cosmos+ uses 256 b chunk is due to size limitation of FPGA. BCH ECC module for 4 KB chunk is too big to fit in most of middle-cost FPGAs.
Auto DMA engine for PRP data transfer mechanism on Cosmos+ NVMe controller are designed to supports device to/from host PC DMA with 16-byte aligned device address.
But somehow the auto DMA engine with 4-KB misaligned device address occurs data error.
I use OpenSSD2_bd.tcl in prebuilt hdf file to create a zynq project. I got some error. Because some related SSD ip core did not find, but OpenSSD website that related to some openSSD file did not open. Can you offer some ip core in the hardware project? Thank you !
Writing more than 28 GiB sequentially leads to failures.
Always successful:
[root@ndp-nvm-test ~]# dd if=/dev/zero of=/dev/nvme0n1p1 bs=1M count=29500 conv=fdatasync,notrunc
status=progress
30699159552 bytes (31 GB, 29 GiB) copied, 78.0004 s, 394 MB/s
29500+0 records in
29500+0 records out
30932992000 bytes (31 GB, 29 GiB) copied, 101.946 s, 303 MB/s
Always fails:
dd if=/dev/zero of=/dev/nvme0n1p1 bs=1M count=30000 conv=fdatasync,notrunc status=progress
31448891392 bytes (31 GB, 29 GiB) copied, 80.0064 s, 393 MB/s
dd: fdatasync failed for '/dev/nvme0n1p1': Input/output error
dd: fsync failed for '/dev/nvme0n1p1': Input/output error
Kernel v4.12.8 dmesg:
[ 8537.431183] blk_update_request: I/O error, dev nvme0n1, sector 60634400
...
[ 8537.478674] nvme nvme0: Abort status: 0x7
[ 8553.990942] nvme nvme0: Device not ready; aborting reset
[ 8553.990958] nvme nvme0: Removing after probe failure status: -19
[ 8554.047016] nvme0n1: detected capacity change from 259960864768 to 0
[ 8554.047038] buffer_io_error: 1101 callbacks suppressed
[ 8554.047042] Buffer I/O error on dev nvme0n1p1, logical block 7580127, lost async page write
[ 8554.047049] blk_update_request: 28 callbacks suppressed
[ 8554.047052] blk_update_request: I/O error, dev nvme0n1, sector 60643056
[ 8554.047055] Buffer I/O error on dev nvme0n1p1, logical block 7580126, lost async page write
No errors on firmware console, only messages of resetting after the driver resets the device:
NVME CC.EN: 0
PCIe Bus Master: 0
There is no XPAR_FABRIC_NVMEHOSTCONTROLLER_0_DEV_IRQ_ASSERT_INTR declaration so eclipse catches that as an error. The parameter is neither in xparameters.h not xparameters_ps.h
p.s: This is an existing problem in the prebuilt version. The predefined (2Ch8Way) version does not have this problem.
Cannot find the value of XPAR_FABRIC_NVMEHOSTCONTROLLER_0_DEV_IRQ_ASSERT_INTR in any releases.
Thanks
While I was trying Cosmos+ OpenSSD Boot Guide for SW Developer.pdf,
until P.15, after I ran
>> make
The CosmosPlusFirmware.elf can't be built. It said "undefined reference to 'check_auto_rx_dma_partial_done'"....
However, the 'check_auto_rx_dma_partial_done' function are in nvme/host_lld.c .
Why does the CosmosPlusFirmware.elf cannot be built?
Maximum single DMA transfer size of Cosmos+ NVMe DMA engine is 4-KB. Larger than 4-KB DMA transfer must be splitted.
Dear Cosmos+ Team,
We have some problems.
In summary, the set_direct_rx_dma()
and check_direct_rx_dma_done()
functions do not work properly.
The details are as follows.
Our environment
Problems
Sincerely,
Kyusik Kim.
A simple test shows that data either is not retained or corrupted:
mkfs.ext4 /dev/nvme0n1
mount /dev/nvme0n1 /mnt/
mount: /mnt: mount(2) system call failed: Structure needs cleaning.
Linux kernel v4.12.8
dmesg | tail -n 2
EXT4-fs (nvme0n1): ext4_check_descriptors: Block bitmap for group 448 not in group (block 9223372036886233088)!
EXT4-fs (nvme0n1): group descriptors corrupted!
Note: Before executing this test I reboot the board and wait until formatting is finished:
FTL reset complete!!!
Turn on the host PC
In order to set up the device, I'm following the following tutorial: "doc/Cosmos+ OpenSSD 2017 Tutorial.pdf". Everything is set up as mentioned in the PDF except my motherboard is "Asus Z87-A". The dev machine is running Windows 8.1 and host machine is running Linux Ubuntu.
After programming the FPGA and running the code, I do not get any logs in the dev machines's UART console and the device is not detected in the host machine. The device is detected by the lspci command on the host machine; however, it is not available in the /dev.
I get the following errors after checking the dmesg:
$ dmesg | grep nvme
[ 0.903068] nvme nvme0: pci function 0000:01:00.0
[ 17.692035] nvme nvme0: Device not ready; aborting initialisation
[ 17.692038] nvme nvme0: Removing after probe failure status: -19
Hello all,
we do have an old Cosmos board with the usual Cosmos flashchips. Currently, we evaluating on upgrading to a cosmos+ Version. Thereby, we were wondering whether the old PCB is sufficient enough to be compatible with the new cosmos+ chips oder there were any changes on the board as well.
Maybe some has already upgraded his board and could share his/her experience.
Thanks,
Tobias
Hi,
i find your update new project 2ch8way-1.0.2 which fixed ecc bug, and i also run this project via vivado2014.4 , the project run successfully in vivado and export hardware to SDK ,but when i run firmware GreedyFTL-2.7.1.c , it fail ,and end in "block erasure start" in function void InitBlockMap(unsigned int badBlockTableAddr) of page_map.c
after my test, i find the firmware can not run at
PushToSubReqQueue(j % CHANNEL_NUM, j / CHANNEL_NUM, V2FCommand_BlockErase, i*PAGE_NUM_PER_BLOCK, NONE, NONE); (belong to page map)
so could you tell me how to solve it?
Thanks
Why I cannot access the latest official website ‘’openssd.dev''?
Is it invalid?
Hi, all.
I'm new to Cosmos+ board, and trying to set up the board as tutorial.
The problem is that development PC couldn't detect the board as USB device.
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
No dmesg is generated when I plug on and off the USB cable, both JTAG and UART.
I've set all SW5 switch on, and placed jumper pins as tutorial.
Is there something I've missed or made mistake?
Thanks
GreedyFTL 2.7 does not support meta flush operation, so all written data will be lost as soon as the board loses its power. Next version of GreedyFTL will support meta flush operation.
Hi all,
I'm getting a PCIe issue (PCIe device does not show up).
I have tried the all PCIe slots on the motherboard, but still can't work.
My motherboard model: ASUS X99-E WS/USB 3.1.
Host OS:Ubuntu 14.04.5 LTS
Host Kernel:4.4.2
Do I have to use the motherboard written in the documentation(Cosmos+ OpenSSD 2017 Tutorial.pdf, page 55 )?
Hello,
I have connected the Cosmos+ board through PCIe Adapter to a host PC and after running the given code the host PC recognizes the device correctly in " lspci" command and it shows:
Non-Volatile memory controller: Xilinix Corporation Device 7028.
However, when checking the /dev directory there is no nvme device.
Are there any solutions?
Thank you so much and regards.
Hi all,
I also put this issue in the regular (Cosmos-OpenSSD issue board)[https://github.com/Cosmos-OpenSSD/Cosmos-OpenSSD/issues/3], because this board seems more active.
The board is compatible between Regular Cosmos-OpenSSD and the Plus version, so I'm assuming the PCIe component is also similar.
The issue I have is that the host system (the one that is attaching to the board via PCIe) does not detect a Xilinx PCIe device.
Once my host boots up and I check the dmesg
logs.
The dmesg
logs do not print any Xilinx PCIe device(0x10ee
).
dmidecode
also doesn't show the device, lspci
also doesn't show the device.
So I'd like to double check if my jumper settings are correctly configured.
If anyone could check their boards to see if my jumpers are correct or not, I'd be grateful
Thanks!
But I successfully resolved this problem thanks to the OpenSSD development team.
The solution is,
I successfully synthesized, implemented, and generated bitstream by using this way.
If there's any problem, please leave a comment.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.