diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/Kconfig b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/Kconfig
new file mode 100644
index 000000000..d36030958
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/Kconfig
@@ -0,0 +1,36 @@
+menu "TableStorage"
+
+ config TABLE_STORAGE
+ bool "Using Table storage system"
+ default n
+
+if TABLE_STORAGE
+
+ config TABLE_STORAGE_BASIC
+ bool "Enable TableStorage Basic"
+ default y
+
+ config TABLE_STORAGE_QUERY
+ bool "[System-level] Enable TableStorage Buffer"
+ default n
+
+ config TABLE_STORAGE_CACHE
+ bool "[System-level] Enable TableStorage Prefetcher"
+ default n
+
+ config TABLE_STORAGE_PREFETCH
+ bool "[Table-level] Enable TableStorage Query Cache"
+ default n
+
+ config TABLE_STORAGE_SECOND_INDEX
+ bool "[Table-level] Enable TableStorage Second Index"
+ default n
+
+ config TABLE_STORAGE_TRANSACTION
+ bool "(Other) Enable TableStorage Transaction"
+ default n
+
+
+endif
+
+endmenu
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/README.md b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/README.md
new file mode 100644
index 000000000..f08c33635
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/README.md
@@ -0,0 +1,153 @@
+## README
+
+TableStorage是一款面向泛在操作系统的轻量级表存储原型系统。TableStorage专注于泛在操作系统场景下结构化数据的存储,与传统的多层堆叠式软件栈(数据库 + 文件系统)不同,TableStorage避免过度分层,从存储全栈角度,进行跨层(数据库的存储引擎 + 文件系统)的设计,主要包含以下三个属性
+
+- 低冗余:去除文件抽象并直接将“表”存储到设备中, 避免功能冗余和不必要的软件开销
+- 兼容性:提供一组通用的API 以支持表级的存取操作,与传统数据库中的读写操作兼容
+- 可集成:支持组件的深度集成,具体来说, 可以集成事务和执行引擎以满足复杂的事务和查询处理需求
+
+
+
+### 开发板
+
+- K210最小系统板(Max bit)
+
+- SD卡配置
+
+ | 引脚 | 作用 | RW007板子 |
+ | :----------------: | :-------: | :-------: |
+ | io 27(印丝标注SCK) | SPI1_SCK | SCK |
+ | io 26(印丝标注SO) | SPI1_MISO | MISO |
+ | io 28(印丝标注SI) | SPI1_MOSI | MOSI |
+ | io 29 | CS/BOOT1 | CS |
+
+
+
+### 编译说明
+
+- 环境搭建
+
+ - 参考https://gitlink.org.cn/xuos/xiuos/tree/prepare_for_master/Ubiquitous%2FXiZi_IIoT%2Fboard%2Fkd233下的**开发环境搭建**小节,搭建好XiUOS的开发环境
+
+ - 参考https://gitlink.org.cn/xuos/xiuos/tree/prepare_for_master/Ubiquitous%2FRT-Thread_Fusion_XiUOS%2Faiit_board%2Fk210搭建好XiUOS-RTThread的开发环境
+
+- 配置XiUOS-RTThread基本环境
+
+ - SD卡的配置:按照上表SD卡引脚说明配置
+
+
+
+ - 其他推荐配置
+
+
+
+ - (可选)如果编译时,出现定时器错误,则可以选择使用软件定时器
+
+
+
+- 配置TableStorage
+
+ ```shell
+ scons --menuconfig
+ ```
+
+ - 若不开启TableStorage组件,则自动在SD卡上使用FATFS
+
+ - 若开启TableStorage组件,则在SD卡上使用TableStorage,默认打开了Enable TableStorage Basic模块(注:当前版本仅支持Basic模块)
+
+
+
+- 执行 scons 编译,若编译正确无误,在当前文件夹下生成rtthread.elf、rtthread.bin。其中rtthread.bin需要烧写到设备中进行运行
+
+- 烧录及运行结果图
+
+ ```shell
+ sudo kflash -t rtthread.bin -p /dev/ttyUSB0
+ ```
+
+ - 烧录并运行无误,则
+
+
+
+
+
+### 调试
+
+- 修改k210/rtconfig.py中的BUILD选项来配置debug模式,并重新编译
+
+- 安装openocd(下载ubuntu版本64位),
+
+ - 下载地址:[Releases · kendryte/openocd-kendryte (github.com)](https://github.com/kendryte/openocd-kendryte/releases),推荐下载地址为:http://101.36.126.201:8011/kendryte-openocd-0.2.3-ubuntu64.tar.gz
+
+ - 安装
+
+ ```shell
+ sudo apt install libusb-dev libftdi-dev libhidapi-dev
+ sudo mv kendryte-openocd-0.2.3-ubuntu64.tar.gz /opt
+ cd /opt
+ sudo tar -zxvf kendryte-openocd-0.2.3-ubuntu64.tar.gz
+ ```
+
+ - 修改配置文件
+
+ sudo vim /opt/kendryte-openocd/tcl/k210.cfg,并复制以下内容
+
+ ```shell
+ # SiPEED USB-JTAG/TTL
+ interface ftdi
+ ftdi_device_desc "Dual RS232"
+ ftdi_vid_pid 0x0403 0x6010
+ ftdi_layout_init 0x0508 0x0f1b
+ ftdi_layout_signal nTRST -data 0x0200 -noe 0x0100
+ ftdi_layout_signal nSRST -data 0x0800 -noe 0x0400
+
+ jtag_rclk 3000
+
+ # server port
+ gdb_port 9999
+ telnet_port 4444
+
+ # add cpu target
+ set _CHIPNAME riscv
+ jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x04e4796b
+
+ set _TARGETNAME $_CHIPNAME.cpu
+ target create $_TARGETNAME riscv -chain-position $_TARGETNAME
+
+ # command
+ init
+ if {[ info exists pulse_srst]} {
+ ftdi_set_signal nSRST 0
+ ftdi_set_signal nSRST 1
+ ftdi_set_signal nSRST z
+ }
+ halt
+ ```
+
+- 调试器和Max bit开发板的硬件连线
+
+
+
+- 启动调试器
+
+ ```shell
+ sudo /opt/kendryte-openocd/bin/openocd -f /opt/kendryte-openocd/tcl/k210.cfg
+ ```
+
+
+
+- 在Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210目录下,连接调试器
+
+ ```shell
+ /opt/xpack-riscv-none-embed-gcc-10.2.0-1.2/bin/riscv-none-embed-gdb rtthread.elf --eval-command="target remote 127.0.0.1:9999"
+ ```
+
+ - gdb终端调试
+
+
+
+
+
+- vscode调试
+
+
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/SConscript b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/SConscript
new file mode 100644
index 000000000..f4118ef8b
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/SConscript
@@ -0,0 +1,26 @@
+from building import *
+
+# get current directory
+cwd = GetCurrentDir()
+
+# the set of source files associated with this SConscript file.
+src = Glob('src/common/*.cc')
+src += Glob('src/execution/*.cc')
+src += Glob('src/storage/*.cc')
+
+# compile optional modules
+if GetDepend(['TABLE_STORAGE_CACHE']):
+ src += ['src/modules/prefetcher.cc']
+if GetDepend(['TABLE_STORAGE_CACHE']):
+ src += ['src/modules/queryCache.cc']
+if GetDepend(['TABLE_STORAGE_CACHE']):
+ src += ['src/modules/buffer.cc']
+if GetDepend(['TABLE_STORAGE_CACHE']):
+ src += ['src/modules/secondIndex.cc']
+
+# include path
+path = [cwd + '/include']
+
+group = DefineGroup('TableStorage', src, depend = ['TABLE_STORAGE'], CPPPATH = path)
+
+Return('group')
\ No newline at end of file
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/BufferItem.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/BufferItem.h
new file mode 100644
index 000000000..7ab6aa5dd
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/BufferItem.h
@@ -0,0 +1,35 @@
+/**
+ * @file BufferItem.h
+ * @brief BufferItem
+ * @version 0.1
+ * @author SYS Lab
+ * @date 2022.11.01
+ */
+
+#ifndef BUFFERITEM_H
+#define BUFFERITEM_H
+
+#include
+
+#include "Common.h"
+
+namespace LightTable {
+
+class BufferItem {
+ public:
+ BufferItem(uint64_t tableID);
+
+ virtual ~BufferItem();
+
+ // virtual void flush() const = 0;
+
+ uint64_t getTableID() { return tableID; }
+
+ protected:
+ uint64_t tableID;
+ DISALLOW_COPY_AND_ASSIGN(BufferItem);
+};
+
+} // namespace LightTable
+
+#endif // BUFFERITEM_H
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Common.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Common.h
new file mode 100644
index 000000000..a23b31a74
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Common.h
@@ -0,0 +1,144 @@
+/**
+ * @file Common.h
+ * @brief parameter configuration
+ * @version 0.1
+ * @author SYS Lab
+ * @date 2022.11.01
+ */
+#ifndef COMMON_H
+#define COMMON_H
+
+#include
+#include
+
+#include
+#include
+
+namespace LightTable {
+
+#define YCSB_TEST
+
+extern int cacheReadNum;
+extern int cacheWriteNum;
+
+extern std::chrono::steady_clock::time_point start_time;
+extern std::chrono::steady_clock::time_point end_time;
+extern double diff_sdcard_read;
+extern double diff_sdcard_write;
+
+#define SYSTEM_MAX_CORES 0
+#define SYSTEM_MAX_IO_QUEUES 8
+
+#ifndef YCSB_TEST
+#define NETWORK_MESSAGE_DATA_MAX_SIZE 4088
+#define NETWORK_TRANSMIT_MAX_SIZE 4096
+#else
+#define NETWORK_MESSAGE_DATA_MAX_SIZE 51192
+#define NETWORK_TRANSMIT_MAX_SIZE 51200
+#endif
+
+#define SDCARD_TEST_WRITE_BLOCKID 200
+#define SDCARD_TEST_READ_BLOCKID 1000
+#define SDCARD_TEST_NUM 10000
+
+#define HASH_BUCKET_SIZE 50
+#define CACHE_SIZE 500
+
+#define SEGMENT_TYPE_SMALL_BITMAP_SIZE 32768
+#define SEGMENT_TYPE_MEDIUM_BITMAP_SIZE 4096
+#ifndef YCSB_TEST
+#define SEGMENT_TYPE_BIG_BITMAP_SIZE 512
+#else
+#define SEGMENT_TYPE_BIG_BITMAP_SIZE 512
+#endif
+
+#define SEGMENT_TYPE_SMALL_START 64
+#define SEGMENT_TYPE_MEDIUM_START 2097216
+#define SEGMENT_TYPE_BIG_START 6291528
+
+#define SEGMENT_TYPE_SMALL_CELL_SIZE 4096
+#define SEGMENT_TYPE_MEDIUM_CELL_SIZE 65536
+#ifndef YCSB_TEST
+#define SEGMENT_TYPE_BIG_CELL_SIZE 2097152
+#else
+#define SEGMENT_TYPE_BIG_CELL_SIZE 65536000
+#endif
+
+#define PREFETCH_BLOCK_SERIALIZED_LENGTH 33
+
+#define MAX_BRANCH_COUNT 4
+
+#define PRELOAD_BLOCK_COUNT 10
+#define PRELOAD_CHECK_INTERVAL_US 50
+
+#define BLOCK_SIZE 512
+
+#ifndef YCSB_TEST
+#define BUFFER_SIZE 200
+#else
+#define BUFFER_SIZE 300000
+#endif
+
+#define CACHED_PAGE_COUNT 100
+
+#define ROOTTABLE_TUPLE_SIZE sizeof(RootTable::TableTuple)
+
+#define TABLE_ID_SIZE sizeof(uint64_t)
+
+#define SYSTEM_TABLE_COUNT 1
+#define ROOTTABLE_TABLE_ID 1
+#define ROOTTABLE_SEGMENT_ID 1
+#define ROOTTABLE_FIRST_BLOCK_ID 14680164
+
+#define TABLE1_META_BLOCKID 1000
+#define TABLE1_META_LOG_BLOCKID 10000
+#define TABLE1_INDEX_BLOCKID 2000
+#define TABLE1_INDEX_LOG_BLOCKID 20000
+#define TABLE1_DATA_LOG_BLOCKID 30000
+#define META_ENTRY_NUM 8
+#define META_ENTRY_SIZE 64
+#define BUFFER_MAX 4096
+#define COMMON_TABLE_START_ID 101
+#define YCSB_TABLE_ID 100
+#define TABLE_NAME_LENGTH 32
+#define PRIMARY_KEY_LENGTH 128
+#define FILE_PATH_LENGTH 1024
+#define FILE_NAME_LENGTH 128
+#define USER_NAME_LENGTH 32
+#define COLUMN_NAME_LENGTH 128
+#define COLUMN_TYPE_NAME_LENGTH 32
+
+#define PREFETCH_BLOCK_SERIALIZED_LENGTH 33
+#define ROWMAP_SERIALIZED_LENGTH 42
+#define SCHEMA_ENTRY_SERIALIZED_LENGTH 181
+
+#define MAX_META_LENGTH 2048
+
+#define MAX_PATH_LENGTH 128
+const char METAPATH[MAX_PATH_LENGTH] = "../../data";
+
+struct timespec diff(struct timespec start, struct timespec end);
+
+class Queue {
+ public:
+#ifdef IO_PROFILING
+ static struct timespec accumulate_io_times();
+ static struct timespec accumulate_io_submit_times();
+#endif
+
+#ifdef IO_PROFILING
+ static std::queue io_times;
+ static std::queue io_submit_times;
+#endif
+};
+
+// A macro to disallow the copy constructor and operator= functions
+#ifndef DISALLOW_COPY_AND_ASSIGN
+#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
+ TypeName(const TypeName &) = delete; \
+ TypeName &operator=(const TypeName &) = delete;
+#endif
+
+} // namespace LightTable
+
+#endif // COMMON_H
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/CommonTable.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/CommonTable.h
new file mode 100644
index 000000000..bfc111259
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/CommonTable.h
@@ -0,0 +1,35 @@
+/**
+ * @file CommonTable.h
+ * @brief CommonTable
+ * @version 0.1
+ * @author SYS Lab
+ * @date 2022.11.01
+ */
+
+#ifndef COMMONTABLE_H
+#define COMMONTABLE_H
+
+#include "Table.h"
+
+namespace LightTable {
+
+class CommonTable : public Table {
+ public:
+ CommonTable(uint64_t tableID, const char *tableName, uint64_t firstBlockID,
+ uint64_t segmentID, SegmentType segmentType,
+ std::vector schemaEntrys,
+ bool usePrimaryKeyIndex = false);
+
+ CommonTable(uint64_t tableID, const char *tableName, uint64_t firstBlockID,
+ uint64_t segmentID, SegmentType segmentType,
+ bool usePrimaryKeyIndex = false);
+
+ friend class MetaHandle;
+
+ protected:
+ DISALLOW_COPY_AND_ASSIGN(CommonTable);
+};
+
+} // namespace LightTable
+
+#endif // COMMONTABLE_H
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Driver.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Driver.h
new file mode 100644
index 000000000..03d1f2945
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Driver.h
@@ -0,0 +1,61 @@
+/**
+ * @file Driver.h
+ * @brief driver
+ * @version 0.1
+ * @author SYS Lab
+ * @date 2022.11.01
+ */
+#ifndef DRIVER_H
+#define DRIVER_H
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include "Common.h"
+#include "Error.h"
+
+// #include
+// #include
+// #include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+uint32_t MakeTableStorage(const char *device_name);
+#ifdef __cplusplus
+}
+#endif
+
+namespace LightTable {
+
+class Driver {
+ public:
+ static uint32_t driver_init(const char *device_name);
+
+ static void driver_cleanup(const char *device_name);
+
+ static uint32_t driver_read(uint8_t *buf, uint64_t blockID);
+
+ static uint32_t driver_write(uint8_t *buf, uint64_t blockID);
+
+ static uint32_t read(uint8_t *buf, uint64_t blockID);
+
+ static uint32_t write(uint8_t *buf, uint64_t blockID);
+
+ Driver(){};
+
+#ifdef TABLE_STORAGE_CACHE
+ static BlockCache *blkCache;
+#endif
+};
+
+} // namespace LightTable
+
+#endif // DRIVER_H
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Error.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Error.h
new file mode 100644
index 000000000..14fceb967
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/Error.h
@@ -0,0 +1,62 @@
+/**
+ * @file Error.h
+ * @brief error number
+ * @version 0.1
+ * @author SYS Lab
+ * @date 2022.11.01
+ */
+
+#ifndef ERROR_H
+#define ERROR_H
+
+namespace LightTable {
+
+enum ErrorCode {
+ SUCCESS = 0,
+ ERROR_TABLE = 1,
+ SEGMENT_TYPE_ERROR = 2,
+ SEGMENT_STATUS_ERROR = 3,
+ SEGMENT_IS_EXHAUSTED = 4,
+ BUCKET_ITEM_NOT_FOUND = 5,
+ ADD_BUCKET_ITEM_ERROR = 6,
+ PREFETCH_BLOCK_NOT_FOUND = 7,
+ GET_AVAILABLE_BLOCK_ERROR = 8,
+ BLOCK_OCCUPIED = 9,
+ ADD_ROW_MAP_ENTRY_ERROR = 10,
+ ROW_MAP_ENTRY_NOT_FOUND = 11,
+ ADD_SCHEMA_ENTRY_ERROR = 12,
+ SCHEMA_ENTRY_NOT_FOUND = 13,
+ COLUMN_ITEM_NOT_FOUND = 14,
+ COLUMN_ID_NOT_CONTINUOUS = 15,
+ DELETE_PARIMARY_KEY_COLUMN = 16,
+ TABLE_NOT_FOUND = 17,
+ TABLE_TUPLE_NOT_FOUND = 18,
+ ADD_TABLE_TUPLE_ERROR = 19,
+ BUFFER_EMPTY = 20,
+ TYPE_INVALID = 21,
+ ROWLOCATION_INVALID = 22,
+ CREATE_SOCKET_ERROR = 23,
+ INET_PTON_ERROR = 24,
+ BIND_SOCKET_ERROR = 25,
+ LISTEN_SOCKET_ERROR = 26,
+ ACCEPT_SOCKET_ERROR = 27,
+ CONNECT_SOCKET_ERROR = 28,
+ SEND_MESSAGE_ERROR = 29,
+ EVENT_TYPE_NOT_DEFINED = 30,
+ SCHEMA_NOT_EXIST = 31,
+ OPEN_META_FILE_ERROR = 32,
+ INVALID_META_FILE = 33,
+ INVALID_MEMORY_BLOCK_ID = 34,
+ UPDATE_TUPLE_ERROR = 35,
+ INVALID_PAGE_ID = 36,
+ ADD_QUERY_CACHE_ERROR = 37,
+ TRIE_LEAF_EXIST = 38,
+ TRIE_LEAF_NOT_EXIST = 39,
+ TRIE_LEAF_NOT_FOUND = 40,
+ INVALID_SCAN_RANGE = 41,
+ INVALID_PRELOAD_TASK = 42,
+};
+
+} // namespace LightTable
+
+#endif // ERROR_H
diff --git a/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/HashBucket.h b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/HashBucket.h
new file mode 100644
index 000000000..620da30f2
--- /dev/null
+++ b/Ubiquitous/RT-Thread_Fusion_XiUOS/aiit_board/k210/tablestorage/include/HashBucket.h
@@ -0,0 +1,59 @@
+/**
+ * @file HashBucket.h
+ * @brief HashBucket
+ * @version 0.1
+ * @author SYS Lab
+ * @date 2022.11.01
+ */
+
+#ifndef HASHBUCKET_H
+#define HASHBUCKET_H
+
+#include
+// #include
+
+#include
+#include