Beispiel #1
0
void FTL_INIT()
{
	int n;
	if(g_init == 0){
        	printf("[%s] start\n",__FUNCTION__);

		INIT_SSD_CONFIG();

		INIT_MAPPING_TABLE();
		INIT_INVERSE_PAGE_MAPPING();
		INIT_INVERSE_BLOCK_MAPPING();
		INIT_VALID_ARRAY();
		INIT_EMPTY_BLOCK_LIST();
		INIT_VICTIM_BLOCK_LIST();
		//INIT_PERF_CHECKER();
		
		for(n=0; n<BIN_COUNT; n++){ 
			init_bin(&bins[n]);
		}

		for(n=0; n<MAX_COMPRESSED_LPN_PER_PPN*BIN_COUNT; n++){ 
			init_bpn(&bpns[n]);
		}


		g_init = 1;

		SSD_IO_INIT();
		printf("[%s] complete\n",__FUNCTION__);
	}
}
Beispiel #2
0
void FTL_INIT(void)
{
	if(g_init == 0){
        	printf("[FTL_INIT] Start\n");

		INIT_SSD_CONFIG();	

		INIT_DATA_BLOCK_MAPPING();
		INIT_INVERSE_BLOCK_MAPPING();
		INIT_VALID_ARRAY();

		INIT_EMPTY_BLOCK_LIST();

		INIT_SEQ_BLOCK_MAPPING(INIT);
		INIT_RAN_COLD_BLOCK_MAPPING(INIT);
		INIT_RAN_HOT_BLOCK_MAPPING(INIT);
		INIT_LOG_BLOCK_INDEX();

		INIT_HOT_PAGE_LIST();

		INIT_SEQ_LOG_MAPPING(INIT);
		INIT_RAN_COLD_LOG_MAPPING(INIT);
		INIT_RAN_HOT_LOG_MAPPING(INIT);

		INIT_PERF_CHECKER();

#ifdef FIRM_IO_BUFFER
		INIT_IO_BUFFER();
#endif
#ifdef MONITOR_ON
		INIT_LOG_MANAGER();
#endif
		g_init = 1;

#ifdef DEBUG_MODE3
		fp_dbg3_ran = fopen("./data/l_dbg3_ran.txt","a");
		fp_dbg3_1_ran = fopen("./data/l_dbg3_1_ran.txt","a");
#endif
#ifdef DEBUG_MODE4
		fp_dbg4_seq = fopen("./data/l_dbg4_seq.txt","a");
		fp_dbg4_ran = fopen("./data/l_dbg4_ran.txt","a");
#endif
#ifdef DEBUG_MODE5
		fp_dbg5_seq = fopen("./data/l_dbg5_seq.txt","a");
		fp_dbg5_ran = fopen("./data/l_dbg5_ran.txt","a");
#endif
#ifdef DEBUG_MODE6
		fp_dbg6_seq = fopen("./data/l_dbg6_seq.txt","a");
		fp_dbg6_ran = fopen("./data/l_dbg6_ran.txt","a");
#endif
#ifdef DEBUG_MODE8
		fp_dbg8_seq = fopen("./data/l_dbg8_seq.txt","a");
		fp_dbg8_ran = fopen("./data/l_dbg8_ran.txt","a");
#endif
		SSD_IO_INIT();
		printf("[FTL_INIT] Complete\n");
	}
}
Beispiel #3
0
void FTL_INIT(void)
{
	if(g_init == 0){
        	printf("[%s] start\n",__FUNCTION__);

		INIT_SSD_CONFIG();

		INIT_MAPPING_TABLE();
		INIT_INVERSE_PAGE_MAPPING();
		INIT_INVERSE_BLOCK_MAPPING();
		INIT_VALID_ARRAY();
		INIT_EMPTY_BLOCK_LIST();
		INIT_VICTIM_BLOCK_LIST();
		INIT_PERF_CHECKER();
		
		g_init = 1;

		SSD_IO_INIT();
		printf("[%s] complete\n",__FUNCTION__);
	}
}