GithubHelp home page GithubHelp logo

cosmos-openssd / cosmos-plus-openssd Goto Github PK

View Code? Open in Web Editor NEW
188.0 188.0 96.0 97.75 MB

Cosmos OpenSSD + Hardware and Software source distribution

License: GNU General Public License v3.0

C 0.48% Verilog 2.96% SystemVerilog 0.02% Tcl 0.04% VHDL 95.72% HTML 0.78% CSS 0.01% Perl 0.01%

cosmos-plus-openssd's Introduction

Cosmos-OpenSSD

cosmos-plus-openssd's People

Contributors

cosmos-openssd avatar sangjin-lee avatar timtot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cosmos-plus-openssd's Issues

PCI device probing failure

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 )?

New 2CH8WAY-1.0.2Project can't run successfully due to firmware

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

Compatibility of old Cosmos PCB with new flashchips

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

[Cosmos+] USB device not detected

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

Writing more than 28 GiB leads to failures.

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

A read operation doesn't work after an erase or a program operation

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)

Bit errors may occur frequently in case of writing and reading MSB pages

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.

PCI device probing failure

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.

Cosmos+ might hang sometimes.

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.

Syntax error when synthesizing OpenSSD Vivado Project

When I tried to synthesize OpenSSD Vivado project, I met error messages as shown below.

ERROR: [Synth 8-2715] syntax error near ? [d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/SDPRAM_9A16x9B16/blk_mem_gen_v8_2/hdl/blk_mem_gen_v8_2.vhd:387]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/c_reg_fd_v12_0/hdl/c_reg_fd_v12_0_vh_rfs.vhd:531]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/c_reg_fd_v12_0/hdl/c_reg_fd_v12_0.vhd:167]
ERROR: [Synth 8-2715] syntax error near � [d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/xbip_dsp48_wrapper_v3_0/hdl/xbip_dsp48_wrapper_v3_0_vh_rfs.vhd:2715]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/xbip_pipe_v3_0/hdl/xbip_pipe_v3_0_vh_rfs.vhd:437]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/xbip_pipe_v3_0/hdl/xbip_pipe_v3_0.vhd:156]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/xbip_dsp48_addsub_v3_0/hdl/xbip_dsp48_addsub_v3_0_vh_rfs.vhd:1301]
ERROR: [Synth 8-2139] illegal identifier : _ [d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/xbip_dsp48_addsub_v3_0/hdl/xbip_dsp48_addsub_v3_0_vh_rfs.vhd:1301]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/xbip_dsp48_addsub_v3_0/hdl/xbip_dsp48_addsub_v3_0.vhd:179]
ERROR: [Synth 8-2715] syntax error near ? [d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/bd/OpenSSD2/ip/OpenSSD2_V2NFC100DDR_0_0/src/c_sub/c_addsub_v12_0/hdl/c_addsub_v12_0.vhd:197]
ERROR: [Synth 8-2715] syntax error near ?[d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/ipshared/xilinx.com/fifo_generator_v12_0/255f4893/hdl/fifo_generator_v12_0_vhsyn_rfs.vhd:35436]
ERROR: [Synth 8-2715] syntax error near � [d:/Git/openssd_error_replay/Cosmos-plus-OpenSSD/project/Predefined/2Ch8Way-1.0.0/OpenSSD2_2Ch8Way-1.0.0/OpenSSD2.srcs/sources_1/ipshared/xilinx.com/fifo_generator_v12_0/255f4893/hdl/fifo_generator_v12_0.vhd:1105]

But I successfully resolved this problem thanks to the OpenSSD development team.
The solution is,

  1. Click "Project Settings" button in "Flow Navigator".
  2. Click "IP" on left pane of the pop-up window.
  3. Click "Add Repository..." button and choose appropriate path to IP repository. In my case, the path was "Cosmos-plus-OpenSSD\project\Predefined\2Ch8Way-1.0.0\IPRepo-1.0.0". (By default, IP repository points wrong path like ".......\IPRepo".)
    k-005
  4. And then, click "OK" button to apply repository path.
  5. Right click on "Design Sources -> OpenSSD2 (OpenSSD2.bd)" in hierarchy of "Sources" tap (located at left-top side of "Project Manager" pane) and choose "Reset Output Products..." in the menu.
    k-003
  6. And then, right click on "OpenSSD2 (OpenSSD2.bd)" again and choose "Generate Output Products..." in the menu.
    k-001
  7. After all, re-run the synthesize (by using "Run Synthesis" button in the "Flow Navigator").

I successfully synthesized, implemented, and generated bitstream by using this way.
If there's any problem, please leave a comment.

page read failure due to ECC module bug

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.

XPAR_FABRIC_NVMEHOSTCONTROLLER_0_DEV_IRQ_ASSERT_INTR is not declared

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.

Error while creating a new partition and mounting it

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.

Some SSD IP core not found

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 !

data is not retained and/or corrupted

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

Cosmos+ not detected by host machine

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

DMA data transfer with set_direct_rx_dma() has some problem

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

  • Cosmos+ OpenSSD board with two 1TB NAND modules
  • Hardware part: .hdf file in project/PreBuild/8Ch8Way-3.0.0
  • Software part: modified project/PreBuild/8Ch8Way-3.0.0/GreetyFTL-2.7.0.d
  • PC connected by external PCI: Intel i5-3570K + ASRock B75M-GL + Ubuntu 16.04.3 64bit + Kernel 4.13.10

Problems

  • The Cosmos+ board can be connected to the PC. (but, it is not 100%) And the board is normally recognized as an NVMe SSD when the connection is successful.
  • We wanted to read 128bytes data from the host DRAM using DMA functions that are already implemented in the software parts. (i.e. set_direct_rx_dma() and check_direct_rx_dma_done())
  • However, it failed.
    1.Data about 16~32bytes before and after was rarely read.
    2.The remaining intermediate data was mixed.
  • And, the DMA related codes in the host's kernel do not seem to be a problem. This problem did not occur in other environments.
  • As a result, I think some FPGA codes have problems. Can you confirm this issue?

Sincerely,
Kyusik Kim.

Cosmos+ will lose data when it loses its power

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.

Cosmos board not detected

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.

  • J35 is not connected
  • J36 is connected
  • J184 both are connected
  • J185 jumper at triangle
  • J186 jumper at pins above triangle
  • J187 jumper at triangle
  • J188 jumper at triangle.

or as the attached photo
20181018_115604

If anyone could check their boards to see if my jumpers are correct or not, I'd be grateful

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.