Design of memory efficient FIFO-based merge sorter

Similar documents
Efficient VLSI Huffman encoder implementation and its application in high rate serial data encoding

Real-time processing for intelligent-surveillance applications

Power-Mode-Aware Buffer Synthesis for Low-Power Clock Skew Minimization

A Lost Cycles Analysis for Performance Prediction using High-Level Synthesis

P2FS: supporting atomic writes for reliable file system design in PCM storage

ISSN Vol.05,Issue.09, September-2017, Pages:

Sorting Units for FPGA-Based Embedded Systems

Scanline-based rendering of 2D vector graphics

DESIGN AND IMPLEMENTATION OF SDR SDRAM CONTROLLER IN VHDL. Shruti Hathwalia* 1, Meenakshi Yadav 2

High Speed Special Function Unit for Graphics Processing Unit

A 3-D CPU-FPGA-DRAM Hybrid Architecture for Low-Power Computation

Copyright 2011 Society of Photo-Optical Instrumentation Engineers. This paper was published in Proceedings of SPIE (Proc. SPIE Vol.

International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering

Parallel graph traversal for FPGA

The Study of Genetic Algorithm-based Task Scheduling for Cloud Computing

Parallelized Radix-4 Scalable Montgomery Multipliers

CHAPTER 6 FPGA IMPLEMENTATION OF ARBITERS ALGORITHM FOR NETWORK-ON-CHIP

Efficient Implementation of Single Error Correction and Double Error Detection Code with Check Bit Precomputation

ARITHMETIC operations based on residue number systems

CAD Technology of the SX-9

High Performance and Area Efficient DSP Architecture using Dadda Multiplier

High Speed Pipelined Architecture for Adaptive Median Filter

A Low Power Asynchronous FPGA with Autonomous Fine Grain Power Gating and LEDR Encoding

FPGA IMPLEMENTATION FOR REAL TIME SOBEL EDGE DETECTOR BLOCK USING 3-LINE BUFFERS

CHAPTER 3 METHODOLOGY. 3.1 Analysis of the Conventional High Speed 8-bits x 8-bits Wallace Tree Multiplier

Single error correction, double error detection and double adjacent error correction with no mis-correction code

CPU-GPU hybrid computing for feature extraction from video stream

SQL-to-MapReduce Translation for Efficient OLAP Query Processing

RECENTLY, researches on gigabit wireless personal area

A SIMULINK-TO-FPGA MULTI-RATE HIERARCHICAL FIR FILTER DESIGN

Evaluation of FPGA Resources for Built-In Self-Test of Programmable Logic Blocks

Re-configurable VLIW processor for streaming data

Built-In Self-Test for Programmable I/O Buffers in FPGAs and SoCs

Design and Implementation of CVNS Based Low Power 64-Bit Adder

X(1) X. X(k) DFF PI1 FF PI2 PI3 PI1 FF PI2 PI3

A flexible memory shuffling unit for image processing accelerators

Multi-level Design Methodology using SystemC and VHDL for JPEG Encoder

CHAPTER 4 BLOOM FILTER

Implementing Logic in FPGA Memory Arrays: Heterogeneous Memory Architectures

System Verification of Hardware Optimization Based on Edge Detection

FPGA IMPLEMENTATION OF FLOATING POINT ADDER AND MULTIPLIER UNDER ROUND TO NEAREST

Analysis on the application of on-chip redundancy in the safety-critical system

Pipelined Quadratic Equation based Novel Multiplication Method for Cryptographic Applications

High-Performance VLSI Architecture of H.264/AVC CAVLD by Parallel Run_before Estimation Algorithm *

Available online at ScienceDirect. Procedia Technology 24 (2016 )

Sorting Networks. March 2, How much time does it take to compute the value of this circuit?

Scalable and Dynamically Updatable Lookup Engine for Decision-trees on FPGA

FPGA. Logic Block. Plessey FPGA: basic building block here is 2-input NAND gate which is connected to each other to implement desired function.

ESE532: System-on-a-Chip Architecture. Today. Message. Graph Cycles. Preclass 1. Reminder

Page Mapping Scheme to Support Secure File Deletion for NANDbased Block Devices

Synthesis of VHDL Code for FPGA Design Flow Using Xilinx PlanAhead Tool

INTRODUCTION TO FPGA ARCHITECTURE

FPGASort: A High Performance Sorting Architecture Exploiting Run-time Reconfiguration on FPGAs for Large Problem Sorting

A VLSI Architecture for H.264/AVC Variable Block Size Motion Estimation

An Efficient Implementation of Floating Point Multiplier

Data Filtering Using Reverse Dominance Relation in Reverse Skyline Query

A Hybrid Approach to CAM-Based Longest Prefix Matching for IP Route Lookup

Design and Implementation of 3-D DWT for Video Processing Applications

Word-Level Equivalence Checking in Bit-Level Accuracy by Synthesizing Designs onto Identical Datapath

Advanced FPGA Design Methodologies with Xilinx Vivado

PERFORMANCE ANALYSIS OF HIGH EFFICIENCY LOW DENSITY PARITY-CHECK CODE DECODER FOR LOW POWER APPLICATIONS

An Area-Efficient BIRA With 1-D Spare Segments

Test Resource Reused Debug Scheme to Reduce the Post-Silicon Debug Cost

Assertion Checker Synthesis for FPGA Emulation

An Efficient Carry Select Adder with Less Delay and Reduced Area Application

Implementation of Ripple Carry and Carry Skip Adders with Speed and Area Efficient

Faster Interleaved Modular Multiplier Based on Sign Detection

Altera FLEX 8000 Block Diagram

FPGA Implementation of Rate Control for JPEG2000

Tradeoff Analysis and Architecture Design of a Hybrid Hardware/Software Sorter

Chip Design for Turbo Encoder Module for In-Vehicle System

A hardware operating system kernel for multi-processor systems

INTERNATIONAL JOURNAL OF PROFESSIONAL ENGINEERING STUDIES Volume VII /Issue 2 / OCT 2016

Chapter 19. Sorting Networks Model of Computation. By Sariel Har-Peled, December 17,

FPGA architecture and design technology

Evolutionary On-line Synthesis of Hardware Accelerators for Software Modules in Reconfigurable Embedded Systems

Basic Processing Unit: Some Fundamental Concepts, Execution of a. Complete Instruction, Multiple Bus Organization, Hard-wired Control,

Efficient Self-Reconfigurable Implementations Using On-Chip Memory

Frequency-based NCQ-aware disk cache algorithm

A SIMPLE 1-BYTE 1-CLOCK RC4 DESIGN AND ITS EFFICIENT IMPLEMENTATION IN FPGA COPROCESSOR FOR SECURED ETHERNET COMMUNICATION

Low Power and Memory Efficient FFT Architecture Using Modified CORDIC Algorithm

Linköping University Post Print. Analysis of Twiddle Factor Memory Complexity of Radix-2^i Pipelined FFTs

Scalable Packet Classification on FPGA

A True Random Number Generator Based On Meta-stable State Lingyan Fan 1, Yongping Long 1, Jianjun Luo 1a), Liangliang Zhu 1 Hailuan Liu 2

On Designs of Radix Converters Using Arithmetic Decompositions

A Reconfigurable Crossbar Switch with Adaptive Bandwidth Control for Networks-on

A Library of Parameterized Floating-point Modules and Their Use

A Personal Information Retrieval System in a Web Environment

Energy Aware Optimized Resource Allocation Using Buffer Based Data Flow In MPSOC Architecture

Design & Analysis of 16 bit RISC Processor Using low Power Pipelining

A SXGA 3D Display Processor with Reduced Rendering Data and Enhanced Precision

Hybrid Adaptive Clock Management for FPGA Processor Acceleration

PSON: A Parallelized SON Algorithm with MapReduce for Mining Frequent Sets

The Impact of Pipelining on Energy per Operation in Field-Programmable Gate Arrays

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

High Speed Fault Injection Tool (FITO) Implemented With VHDL on FPGA For Testing Fault Tolerant Designs

Design and Implementation of Gabor Type Filters on FPGA

The Sorting Processor Project

FPGA BASED ADAPTIVE RESOURCE EFFICIENT ERROR CONTROL METHODOLOGY FOR NETWORK ON CHIP

Generell Topologi. Richard Williamson. May 6, 2013

Transcription:

LETTER IEICE Electronics Express, Vol.15, No.5, 1 11 Design of memory efficient FIFO-based merge sorter Youngil Kim a), Seungdo Choi, and Yong Ho Song Department of Electronics and Computer Engineering, Hangyang University, Wangsimini-ro, Seongdong-gu, Seoul 133 791, Korea a) yikim@enc.hanyang.ac.kr Abstract: Sorting is an important operation used in various applications including image processing and databases. It represents a large portion of the total execution time of these applications. To improve the performance of sort operations, a dedicated hardware sorter can be used. When implemented in hardware, a FIFO-based merge sorters often shows excellent hardware resource utilization efficiency but requires high buffer memory usage. In this paper, we presents a cost-effective hardware architecture of a FIFO-based merge sorter. Our proposed architecture minimizes buffer memory requirement. We evaluate the design by implementing the architecture on an FPGA platform. FPGA synthesis results show that the proposed approach reduces the average flip-flop and LUT-RAM by 5% and 14%, respectively. Keywords: sorting, accelerator architectures, FPGAs Classification: Integrated circuits References IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 [1] G. Graefe: Implementing sorting in database systems, ACM Comput. Surv. 38 (006) 10 (DOI: 10.1145/113960.113964). [] D. Taniar and J. Wenny Rahayu: Parallel database sorting, Inf. Sci. 146 (00) 171 (DOI: 10.1016/S000-055(0)00196-). [3] J. Dean and S. Ghemawat: Mapreduce: Simplified data processing on large clusters, Commun. ACM 51 (008) 107 (DOI: 10.1145/13745.13749). [4] C. Jin and R. Buyya: Mapreduce programming model for net-based cloud computing, European Conference on Parallel Processing (009) 417 (DOI: 10. 1007/978-3-64-03869-3_41). [5] D. Koch and J. Torresen: Fpgasort: A high performance sorting architecture exploiting run-time reconfiguration on fpgas for large problem sorting, Proc. 19th ACM/SIGDA International Symposium on Field Programmable Gate Arrays (011) 45 (DOI: 10.1145/1950413.195047). [6] R. Marcelino, et al.: Sorting units for fpga-based embedded systems, Distributed Embedded Systems: Design, Middleware and Resources (008) 11. [7] R. Marcelino, et al.: Unbalanced fifo sorting for fpga-based systems, 16th IEEE International Conference on Electronics, Circuits, and Systems, ICECS (009) 431 (DOI: 10.1109/ICECS.009.5410898). [8] N. Matsumoto, et al.: Optimal parallel hardware k-sorter and top k-sorter, with fpga implementations, 14th International Symposium on Parallel and Distributed Computing (ISPDC) (015) 138 (DOI: 10.1109/ISPDC.015.3). [9] Y. Zhang and S. Q. Zheng: An efficient parallel vlsi sorting architecture, VLSI Des. 11 (000) 137 (DOI: 10.1155/000/14617). [10] M. Bednara, et al.: Tradeoff analysis and architecture design of a hybrid 1

hardware/software sorter, Proc. IEEE International Conference on Application-Specific Systems, Architectures, and Processors (000) 99 (DOI: 10. 1109/ASAP.000.86400). [11] L. Ha, et al.: Fast four-way parallel radix sorting on gpus, Computer Graphics Forum 8 (009) 368 (DOI: 10.1111/j.1467-8659.009.0154.x). [1] R. Marcelino, et al.: A comparison of three representative hardware sorting units, 35th Annual Conference of IEEE Industrial Electronics, IECON 09 (009) (DOI: 10.1109/IECON.009.5415409). 1 Introduction IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 Many applications use various sort operations to reorder a set of data based on a specific rule. Some popular examples include database and big data systems. Database systems sort data to process during many data manipulation operations [1, ]. And MapReduce, which is also used as a parallel programming model, heavily relies on sort operations to organize intermediate data [3]. In a data management system, the performance of the entire system depends on the performance of the sort algorithm [1]. In the case of MapReduce, the sort phase constitutes a large portion of the overall execution time in addition to the map and partition phases [3]. In [4], it is revealed that the sort phase can account for more than 90% of the total execution time depending on the application. Therefore, it is very important to enhance the performance of sort operations for these types of applications. Many studies have been conducted on improve the performance of sort operation using hardware accelerators [5, 6, 7, 8, 9, 10, 11]. The accelerator implements software sort algorithms in hardware so that it can sort data independently of the processor. The parallelized deployment of accelerators improve the performance of sort operations even more. There are various types of hardware sort accelerators, depending on target algorithms and implementation methodology. There have been the accelerators aiming to enhance the FIFO-based merge sort operation as well [5, 7, 8]. They usually achieve higher hardware resource utilization compared to other types of sorters in implementing algorithm logic [1]. However, the use of FIFO buffers requires a lot of memory space. As reported in [6] and [1], a large portion of total hardware resources consumed by FIFO-based merge sorter is memory resource. In addition, there is also additional requirement that the data in FIFO should be sorted before being merged. To meet this requirement, a smaller FIFO is placed to provide sorted data to each FIFO, which further increases the memory requirement. Moreover, previous studies assume the data count to be k for a FIFO-based merge sorter [5, 8], not considering the case where the number of maximum input data to be sorted is not a power of two. In this paper, we propose a hardware sort accelerator for a FIFO-based merge sorter that considers the above case. The proposed technique optimizes the structure of the sorter to minimize memory requirement. To evaluate the effectiveness of the proposed technique, we design a sorter capable of sorting multiple data by cascading several FIFO-based merge sorters and apply a memory minimization technique to it. In addition, this study demonstrates

the validity of the proposed technique using mathematical induction. The operation of the sorter is verified through the FPGA platform and the memory resource usage on the FPGA is measured using the same platform. Experimental results show that the sorter with the memory minimization technique consumes an average of 5% fewer flip-flops and 14% fewer LUT-RAMs than the sorter without the proposed technique. This paper is organized as follows. Section briefly describes the structure of a FIFO-based merge sorter and cascading FIFO-based merge sorter. The architecture of the baseline sorter and the problem with this architecture is detailed in Section 3. Section 4 presents a memory optimized sorter architecture based on the analysis of the cascading FIFO-based merge sorter. Section 5 shows the experimental results. Section 6 concludes this work. Sorting unit architectures.1 FIFO-based merge sorter A FIFO-based merge sorter (FMS) merges ordered data sets into a single ordered one. Fig. 1 illustrates an organization of FMS which consists of two input FIFOs, one output FIFO, a comparator, and a multiplexer. The input FIFOs store two groups of sorted data. The comparator determines which FIFO the next data should be fetched from. Depending on the comparison results, either a larger or a smaller value is selected and passed through the multiplexer all the way to the output FIFO. Basically one data element is passed to the output FIFO every clock cycle. As aforementioned, the data stored in the input FIFOs must be sorted in ascending or descending order before getting merged. That is, each data group is an output of a sort operation. Many sorting methods can be used for pre-sorting input data. For example, one can use a software sorting method or use hardware sorting methods such as an insertion sorting module or a sorting network [1]. IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018. Cascading FIFO-based merge sorter The cascading FIFO-based merge sorter (CFMS) meets the pre-sorting requirement mentioned above using serial instances of the FMS. Fig. shows the organization of CFMS. This sorter is composed of several FMS s, each connected to a demultiplexer. The combination of one FMS and its demultiplexer is defined as a merge stage. The FMS of each merge stage feeds output data to the input FIFOs of the next stage. The CFMS can sort the entire input data set regardless of the alignment of the input data. The data to be sorted is stored in the first-stage input FIFOs. The data processed at each stage is passed to the input FIFOs of the next stage. When the first input FIFO is full, each FMS can start sort operations immediately after the first input value of the second FIFO is stored. In this manner, the sort operation of each stage can be pipelined [5]. At each step, N comparison operations must be repeated to sort N data. As the FMS consists of one comparator and one multiplexer, the hardware cost required for hardware logic is low. However, the main hardware component of the FMS is the FIFO, which consists of memory. For this reason, a large amount of 3

Fig. 1. FIFO-based merge sorter Fig.. Cascading FIFO-based merge sorter memory resources is required to implement CFMS, which is a combination of multiple FMS s. Therefore, the amount of memory used by this sorter should be minimized. 3 Motivation and problem definition 3.1 Baseline cascading FIFO-based merge sorter A baseline FMS, called B_FMS [6], has two input FIFOs of the same size and one output FIFO of twice the size of an input FIFO. Several studies have presented CFMS using the B_FMS [5, 8]. The feature of this type of CFMS is that the input FIFO at each stage is twice the size of an input FIFO in the previous stage. In this paper, CFMS with this structure will be denoted as a baseline CFMS, or B_CFMS. This baseline sorter takes two groups of k 1 data in the k-th stage and generates k sorted data to be transferred to the next stage. Therefore, the baseline sorter with n stages will eventually generate n sorted data. Fig. 3 illustrates the structure of B_CFMS and the data flow at each stage. IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 3. Problem of baseline cascading FIFO-based merge sorter CFMS is used in various applications under different conditions. In fact, the number of data belonging to the data groups merged by the sorter is not always n. For the baseline sorter, when the maximum number of data to be sorted is not a power of two, the sorter must use more memory than is needed to sort the data. For 4

Fig. 3. Baseline cascading FIFO-based merge sorter and its data flow example, assume that N data enter the sorter and N is greater than 56 but less than 51. To sort the N data, the sorter must be designed to generate a maximum of 51 sorted data with at least 9 stages. The ninth stage has two input FIFOs with 56 entries, respectively. The first input FIFO of the ninth stage stores 56 data sorted in the previous stage. However, only the remaining (N-56) sorted data are stored in the second FIFO. In the ninth stage, one group of 56 data and one group of (N-56) data are merged to finally generate N sorted data. In this case, the second input FIFO uses only (N-56) entries out of 56 entries, which is a waste of memory resources. For this reason, it is appropriate to re-design CFMS to minimize memory consumption when the number of input data is not a power of. That is, the sorter needs to have n stages to sort up to n data. However, it is not necessary that the input FIFO size of the k-th stage be k 1 or that the two input FIFOs have the same number of entries. 4 Proposed method IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 4.1 Analysis of cascading FIFO-based merge sorter To discuss memory minimization of CFMS, the sort operation should be analyzed first. It is assumed that the sorter to be analyzed consists of n stages and that each input FIFO of the first stage has one entry and finally produces S sorted data. With this assumption, we observe the following things. First, to sort K data at a stage, the total number of entry FIFOs belonging to that stage should be equal to or larger than K. This is because for the FMS to generate K sorted data, where the number of data belonging to two data groups to be merged is K, the size of an input FIFO must be at least the same size as the data group to be stored. Second, when any input FIFOs have M and N entries respectively, the sum of the entries of the two input FIFOs belonging to the previous stage is greater than the larger of M and N. The reason for this is that when the input of any stage is M and N, the previous stage must be able to generate M and N sorted data and transmit it to the next stage. Finally, regardless of the number of stages of the CFMS, the total entry sum of the input FIFOs in the last stage is S or more. 5

Fig. 4. Cascading FIFO-based merge sorter Fig. 4 depicts the data flow in the last three stages of the CFMS. Each letter represents the depth of the input FIFOs of each stage (e.g., in alphabetical order), and + indicates a sorting operation. According to the analysis, each variable has the following relationship. N þ M maxðo; PÞ O þ P maxðq; RÞ Q þ R S As the purpose of this study is to minimize the size of the FIFO, we exclude the case where the size of the input FIFO storing the data group is larger than the size of the data group. 4. Memory minimization We assume that the CFMS is the same as the sorter presented earlier in the CFMS analysis. The depths of the input FIFOs in the k-th stage are defined as a k and b k, respectively. For convenience, we assume a k b k. Also assume that a nþ1 is the entry of the final output FIFO of the sorter. The assumptions and analysis of the previous section can then be summarized as follows. a 1 ¼ 1; b 1 ¼ 1 ð1þ a k ¼ a k 1 þ b k 1 ðþ S ¼ a n þ b n ¼ a nþ1 ð3þ a k b k ð4þ a k N; b k N ð5þ The goal is to minimize the total number of entries in the FIFO that make up the CFMS. The total number of FIFO entries in the CFMS consists of n stages as follows. n k¼1 ða k þ b k Þ Using the above assumptions, we can derive the following equations. S ¼ a n þ b n IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 a n ¼ a n 1 þ b n 1 S ¼ a n 1 þ b n 1 þ b n... 6

¼ a 1 þ b 1 þ b þþb n ¼ a 1 þ n k¼1 b k Therefore, the total sum of FIFO entries is as follows. n k¼1 ða k þ b k Þ ð6þ ¼ n k¼1 a k þ n k¼1 b k ¼ n k¼1 a k þ S a 1 ð7þ (6) and (7) imply that the total sum of a k should be minimized to minimize the total sum of FIFO entries. In conclusion, the condition of a k to minimize n k¼1 ða k þ b k Þ is as follows. Variable t denotes the exponent value of the power of two that is greater than S and closest to S. It changes according to the maximum number of data that the sorter can handle. Theorem 1. For t N, interval (1, inf) can be covered with the non-overlapping half-closed interval ð t 1 <S t Š. Therefore, there exists a t such that ð t 1 < S t Š. Let k N and 1 k<n.ifa k ¼d S e for t such that ð t 1 <S t Š, tþ1 k then n k¼1 a k is minimized. First, let us prove that n k¼1 a k is minimized when a k 1 ¼d a k e. Lemma 1. For all k N, ifa k satisfies a k 1 ¼d a k e, then n k¼1 a k is minimized. It is assumed that there is another sequence a 0 k satisfying the above five conditions. To demonstrate the above lemma, we show that the sequence a 0 k is always equal to or greater than the sequence a k. Therefore, the proposition to prove is as follows. Proposition 1. If a k 1 ¼d a k e for all k N, then a k a 0 k. This proposition is denoted as P(k). We will prove this proposition using mathematical induction. Let us first define the relationship between a kþ1 and a k, which will be universally used. a kþ1 ¼ a k þ b k ð ðþþ a k b k ð ð4þþ a kþ1 a k ð8þ Proof. First, we prove that if the number of terms in a k and a 0 k is the same, then proposition 1 is established. First, let us prove that P(k) is satisfied when k is n. Then (8) is also true for the sequence a 0 n. The proof is as follows. a 0 n 1 a0 nþ1ð ð8þþ () a 0 n S ð a0 nþ1 ¼ a0 n þ b0 n ¼ SÞ () a 0 n S ð ð5þþ ð9þ IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 Therefore, the minimum value of a 0 n is ds e.asa n is d S e, a n a 0 n. Next, we prove that P(i-1) holds when P(i) is satisfied for a natural number i less than n and greater than 1. 7

1 a0 i a0 i 1ð ð8þþ () a0 i a 0 i 1ð ð4þþ l () a m i a 0 i 1 ð a i a 0 i Þ l () a i 1 a 0 i 1 a i 1 ¼ a m i Assume that k N, 1 k n and a k 1 ¼d a k e. Then a k a 0 k, which implies that n k¼1 a k n k¼1 a0 k. Therefore, proposition 1 is established when the number of terms in the sequence a k and the sequence a 0 k are the same. Next, let us prove that proposition 1 is established when the number of terms in the sequence a k and the sequence a 0 k are different. Assume that the number of terms in the sequence a 0 k is n+n for N N, N 1 and 1 k n, which means a 0 nþn ¼ S. Using mathematical induction, we can prove in the same way that a k a 0 kþn and n k¼1 a k nþn k¼1 a0 k. Therefore, we can see that n k¼1 a k is minimized if a k 1 ¼d a k e. Assume that the number of terms in the sequence a 0 k is n-n for N N and N n. Using the mathematical induction method, we also can prove that a n a 0 n N. Then, we have a 1þN a 0 1.Asa0 1 is 1 based on the condition (1), a 1þN should be less than or equal to 1. However, a 1 <a 1þN because of condition (1) and (). Therefore, there is no sequence a 0 n that satisfies a n a 0 n N and whose number of terms is less than n. In conclusion, if k satisfies a k 1 ¼d a k e for 1 k n, then n k¼1 a k is the minimum. Proposition 1 is established through the proof above. Furthermore, lemma 1 is established. The proof that a k 1 ¼d a k e and a k ¼d S e represent the same tþ k sequence is as follows. Proof. a n ¼ a n 1 ¼ l a m nþ1 ¼ S l a m n ¼ 6 3 ¼ S 7 S... S a k ¼ nþ1 k The first term of a k is as follows. ð10þ IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 8

a 1 ¼ S n ¼ 1ð ð1þþ () 0 < S n 1 () 0 <S n ð11þ Therefore, when the range of S is limited to ð t 1 <S t Š, a k is as follows. S a k ¼ tþ1 k ð1þ Therefore, if lemma 1 is established, theorem 1 is also established. 5 Experimental results We evaluated the proposed technique in terms of memory resource consumption. We implemented two versions of the sorter to verify the proposed technique. The RM_CFMS is a CFMS that implements the proposed memory minimization technique. We designed 3 different types of RM_CFMS and B_CFMS in the FPGA with different maximum numbers of data that the sorter can handle. The FIFOs that make up each sorter consist of FPGA registers. We synthesized sorters using Xilinx Vivado. The target FPGA is xcku05-ffva1156-1-i. Table I. Average memory resource requirements Flip-flops LUT-RAMs B_CFMS 718 980 RM_CFMS 684 843 IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 Table I represents the amount of FPGA resources consumed by each sorter. RM_CFMS consumes an average of 5% fewer flip-flops than B_BFMS. In addition, the LUT-RAMs consumption of RM_CFMS is 14% less than B_CFMS on average. As shown in the experimental results, the proposed technique reduces the amount of memory resources consumed in implementing the CFMS. Fig. 5(a) and Fig. 5(b) show the consumption of flip-flops and LUT-RAMs in the FPGA, respectively, as the maximum number of data (denoted as #Value) increases that B_CFMS and RM_CFMS can handle. Let us divide each experimental sample into three ranges: 6 < #Value 7, 7 < #Value 8 and 8 < #Value 9. For each range, the flip-flop usages of RM_CFMS are 4.1%, 4.4% and 5% less than B_CFMS on average. Furthermore, RM_CFMS consumes an average of 1%, 11.5% and 15% less LUT-RAMs than B_CFMS in each range. Let n be a natural number. As shown in the two graphs, B_CFMS consumes the same amount of memory resources in the interval where the maximum number of the sorter can handle is more than n 1 and n or less. This is because the sorter designed according to the baseline design must use a sorter that can handle up to n for sorting data more than n 1 and n or less. On the other hand, in the case of RM_CFMS, the amount of memory resource consumption changes according to the maximum number of data that the sorter can handle. This is because RM_CFMS 9

(a) Flip-flop consumption of B CFMS and RM CFMS (b) LUT-RAM consumption of B CFMS and RM CFMS Fig. 5. The amount of hardware resources consumed by B_CFMS and RM_CFMS IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 uses only the minimum amount of memory resources required for the number of data to be sorted. Therefore, when processing data that is not a power of two, RM_CFMS consumes fewer memory resources than B_CFMS. Note that B_CFMS and RM_CFMS consume the same amount of memory resources when the maximum number of data that the sorter can handle is a power of two. This is because RM_CFMS is designed to have the same structure as B_CFMS when the maximum number of data that it can process is a power of two. 10

6 Conclusion This paper introduces a memory minimization technique for CFMS. Previous studies have shown that CFMSs consume more memory than they actually need to sort data that is not a power of two. The proposed memory minimization technique minimizes the memory consumption of the CFMS structure according to the maximum number of data that the sorter is designed to handle based on FPGA simulations. Experimental results indicate that a memory minimization technique-based sorter consumes 5% fewer flip-flops and 14% less LUT-RAM on average than a sorter without the proposed technique. Acknowledgments This work was supported by the National Research Foundation of Korea (NRF) grant funded by the Korea government (MSIT) (NO. NRF-015R1A A1A0100716). IEICE 018 DOI: 10.1587/elex.15.01717 Received December 6, 017 Accepted February 8, 018 Publicized February, 018 Copyedited March 10, 018 11