Skip to content

FEMU Code Structure

Huaicheng Li edited this page Dec 12, 2020 · 1 revision

FEMU code under hw/block/femu

File structure:

├── femu.c
├── ftl
│   ├── Makefile.objs
│   ├── ftl.c
│   └── ftl.h
├── include
│   ├── pqueue.h
│   ├── rte_atomic_x86.h
│   ├── rte_branch_prediction.h
│   ├── rte_ring.h
│   └── rte_ring_generic.h
├── lib
│   ├── Makefile.objs
│   ├── pqueue.c
│   └── rte_ring.c
├── mem-backend.c
├── mem-backend.h
├── nvme-core.c
├── nvme-util.c
├── nvme.h
└── ocssd
    ├── Makefile.objs
    └── femu-oc12.c

  • femu.c and nvme-xxx.c are for NVMe protocol emulation, including the functionalities for NVMe Queue Pair (QP) processing (polling based), delay emulation.

  • ftl/ includes the FTL code for blackbox mode.

  • ocssd/ includes the logics for whitebox (OCSSD) mode.

  • mem-backend.[ch] implements the FEMU SSD backend operations, i.e, read/write to/from a large array.

Contents

Clone this wiki locally