Real-Time Lossless Compression of Soc Trace Data

Total Page:16

File Type:pdf, Size:1020Kb

Real-Time Lossless Compression of Soc Trace Data Jing Zhang Real-Time Lossless Compression of SoC Trace Data Trace SoC of Compression Lossless Real-Time Master’s Thesis Real-Time Lossless Compression of SoC Trace Data Jing Zhang Series of Master’s theses Department of Electrical and Information Technology LU/LTH-EIT 2015-478 Department of Electrical and Information Technology, http://www.eit.lth.se Faculty of Engineering, LTH, Lund University, December 2015. Master’s Thesis Real-Time Lossless Compression of SoC Trace Data Jing Zhang Department of Electrical and Information Technology Faculty of Engineering, LTH, Lund University SE-221 00 Lund, Sweden December 2015 1 Abstract Nowadays, with the increasing complexity of System-on-Chip (SoC), traditional debugging approaches are not enough in multi-core architecture systems. Hardware tracing becomes necessary for performance analysis in these systems. The problem is that the size of collected trace data through hardware- based tracing techniques is usually extremely large due to the increasing complexity of System-on-Chips. Hence on-chip trace compression performed in hardware is needed to reduce the amount of transferred or stored data. In this dissertation, the feasibility of different types of lossless data compression algorithms in hardware implementation are investigated and examined. A lossless data compression algorithm LZ77 is selected, analyzed, and optimized to Nexus traces data. In order to meet the hardware cost and compression performances requirements for the real-time compression, an optimized LZ77 compression algorithm is proposed based on the characteristics of Nexus trace data. This thesis presents a hardware implementation of LZ77 encoder described in Very High Speed Integrated Circuit Hardware Description Language (VHDL). Test results demonstrate that the compression speed can achieve16 bits/clock cycle and the average compression ratio is 1.35 for the minimal hardware cost case, which is a suitable trade-off between the hardware cost and the compression performances effectively. 2 Acknowledgments If we meet someone who owes us thanks, we right away remember that. But how often do we meet someone to whom we owe thanks without remembering that? — JOHANN WOLFGANG VON GOETHE Ottilie’s Diary (1809) The completion of this thesis gets a lot of help from my supervisor and colleagues in Ericsson, my supervisors in Lund University, and my lovely friends. Here, I want to thank all of them. Firstly, I would like to express my deepest gratitude to my supervisor Lars Johan Fritz, who encouraged and motivated me all the time. I am grateful for his support, guidance, and constructive advices on my work. In addition, I also thank Pierre Rohdin G and Mats Fredriksson for their help and encouragement in this period. Secondly, I am grateful to the supervisor Erik Larsson and Liang Liu for their trust and help on my thesis. I should to thank for their suggesting many ways in how to improve my thesis work. The same acknowledgement should also go to Professor Peter Nilsson who acts as my examiner. Thirdly, I would like to thank my friends, Zhou Ruoxing and Liu Dan. Their friendly advices and supportive attitude are of great help for me. In particular, I am thankful to Yuan Mengze for his patiently instructions. Lastly but not least, a special thank goes to my family, this thesis might not exist without their support and understanding. Many more peoples participated in various ways to ensure my research succeeded and I am thankful to them all. Jing Zhang 3 Contents Abstract ......................................................................................................... 2 Acknowledgments ......................................................................................... 3 1. Introduction ........................................................................................... 6 1.1. Nexus Trace Data .......................................................................... 6 1.2. Thesis Motivations ........................................................................ 8 1.3. Thesis Objectives .......................................................................... 9 1.4. Thesis Organization ....................................................................... 9 2. Background of Compression Algorithms ............................................ 11 2.1. General-Purpose Compression Algorithms ................................. 11 2.1.1. Lossy Compression ................................................................. 11 2.1.2. Lossless Compression ............................................................. 12 2.2. Special-Purpose Compression Algorithms .................................. 21 3. Compression Algorithm Selection ...................................................... 22 3.1. Algorithm Selection .................................................................... 22 3.1.1. General Algorithm vs. Special Algorithm ........................... 22 3.1.2. Dictionary-Based vs. Statistical vs. Combinational ............ 23 3.1.3. LZ77 vs. LZ78 ..................................................................... 28 3.2. LZ77 Algorithm .......................................................................... 30 3.3. LZ77 Algorithm Simulation ........................................................ 33 3.3.1. Parameters Analysis ............................................................ 33 3.3.2. Simulation Results ............................................................... 35 4. LZ77 Hardware Implementation ......................................................... 41 4.1. Optimized LZ77Algorithm .......................................................... 41 4.2. Hardware System Structure ......................................................... 44 4.2.1. Hardware Approaches ......................................................... 44 4.2.2. Architecture Overview ........................................................ 45 4 4.2.3. Operating Principle .............................................................. 45 4.3. Block Descriptions ...................................................................... 46 4.3.1. Storage Blocks ..................................................................... 46 4.3.2. Controller Block .................................................................. 47 4.3.3. Format Block ....................................................................... 50 4.4. Tests and Results ......................................................................... 51 4.4.1. Evaluation Method .............................................................. 52 4.4.2. Test Results ......................................................................... 52 5. Conclusion and Future Work .............................................................. 56 5.1. Conclusion ................................................................................... 56 5.2. Future Work ................................................................................ 57 References ................................................................................................... 58 5 CHAPTER 1 1. Introduction Collecting execution traces of programs is an important task for embedded system verification and debugging. With the increasing complexity of System-on-Chip, the size of collected trace data through hardware-based tracing techniques is usually extremely large. For example, monitoring a 32 bits bus in an RISC microprocessor clocked at 1 GHz generates a trace of 4G bytes per second. Storing such huge data or transferring the data out of the chip in real time brings a high hardware cost [1]. Therefore, the key problem with hardware-based tracing techniques is to reduce the size of collected trace data. Trace data size reduction techniques include three types – filtering, sampling, and compression. Filtering discards all references. Sampling stores relatively short references at regular intervals, discarding the intervening references. Only trace compression technique can retain all of the trace data information [2]. Compression techniques are divided into lossy compression technique and lossless compression technique. This master thesis focuses on implementing the lossless compression optimized based on the trace data from Ericsson’s ASIC platform. 1.1. Nexus Trace Data In this thesis, the trace data adopts the Nexus IEEE-ISTO5001-2012 standard. Nexus 5001 is a standard for global embedded processor debug interface, which is published by IEEE´s Industry Standard and Technology Organization. The Nexus standard defines trace and debug interface, including associated protocols and infrastructure that can serve tracing and controlling of multiple cores on a chip from the software debugger [3]. The original standard is the 1999 version, which was aimed to define a general-purpose specification that addressed the rigorous challenges for debug interfaces, and the need for efficient use of embedded processors that requires software and hardware development tools to access critical processor functionality [4]. Trace data can be read out through a JTAG port. As a modern System-on-Chip has entered into multicore era, a large number of logics have been integrated on the embedded processor. 6 Increased hardware complexity enables growing software complexity. The traditional debugging and testing approach through a JTAG port is obtrusive and time-consuming, which is not suitable for the advanced real-time embedded system. The newest standard is the 2012 version, which support a minimum pin interface (IEEE 1149.7)
Recommended publications
  • Information and Compression Introduction Summary of Course
    Information and compression Introduction ■ We will be looking at what information is Information and Compression ■ Methods of measuring it ■ The idea of compression ■ 2 distinct ways of compressing images Paul Cockshott Faraday partnership Summary of Course Agenda ■ At the end of this lecture you should have ■ Encoding systems an idea what information is, its relation to ■ BCD versus decimal order, and why data compression is possible ■ Information efficiency ■ Shannons Measure ■ Chaitin, Kolmogorov Complexity Theory ■ Relation to Goedels theorem Overview Connections ■ Data coms channels bounded ■ Simple encoding example shows different ■ Images take great deal of information in raw densities possible form ■ Shannons information theory deals with ■ Efficient transmission requires denser transmission encoding ■ Chaitin relates this to Turing machines and ■ This requires that we understand what computability information actually is ■ Goedels theorem limits what we know about compression paul 1 Information and compression Vocabulary What is information ■ information, ■ Information measured in bits ■ entropy, ■ Bit equivalent to binary digit ■ compression, ■ Why use binary system not decimal? ■ redundancy, ■ Decimal would seem more natural ■ lossless encoding, ■ Alternatively why not use e, base of natural ■ lossy encoding logarithms instead of 2 or 10 ? Voltage encoding Noise Immunity Binary voltage ■ ■ ■ 5v Digital information BINARY DECIMAL encoded as ranges of ■ 2 values 0,1 ■ 10 values 0..9 continuous variables 1 ■ 1 isolation band ■
    [Show full text]
  • An Improved Fast Fractal Image Compression Coding Method
    Rev. Téc. Ing. Univ. Zulia. Vol. 39, Nº 9, 241 - 247, 2016 doi:10.21311/001.39.9.32 An Improved Fast Fractal Image Compression Coding Method Haibo Gao, Wenjuan Zeng, Jifeng Chen, Cheng Zhang College of Information Science and Engineering, Hunan International Economics University, Changsha 410205, Hunan, China Abstract The main purpose of image compression is to use as many bits as possible to represent the source image by eliminating the image redundancy with acceptable restoration. Fractal image compression coding has achieved good results in the field of image compression due to its high compression ratio, fast decoding speed as well as independency between decoding image and resolution. However, there is a big problem in this method, i.e. long coding time because there are considerable searches of fractal blocks in the coding. Based on the theoretical foundation of fractal coding and fractal compression algorithm, this paper researches every step of this compression method, including block partition, block search and the representation of affine transformation coefficient, in order to come up with optimization and improvement strategies. The simulation result shows that the algorithm of this paper can achieve excellent effects in coding time and compression ratio while ensuring better image quality. The work on fractal coding in this paper has made certain contributions to the research of fractal coding. Key words: Image Compression, Fractal Theory, Coding and Decoding. 1. INTRODUCTION Image compression is aimed to use as many bytes as possible to represent and transmit the original big image and to have a better quality in the restored image.
    [Show full text]
  • Melinda's Marks Merit Main Mantle SYDNEY STRIDERS
    SYDNEY STRIDERS ROAD RUNNERS’ CLUB AUSTRALIA EDITION No 108 MAY - AUGUST 2009 Melinda’s marks merit main mantle This is proving a “best-so- she attained through far” year for Melinda. To swimming conflicted with date she has the fastest her transition to running. time in Australia over 3000m. With a smart 2nd Like all top runners she at the State Open 5000m does well over 100k a champs, followed by a week in training, win at the State Open 10k consisting of a variety of Road Champs, another sessions: steady pace, win at the Herald Half medium pace, long slow which doubles as the runs, track work, fartlek, State Half Champs and a hills, gym work and win at the State Cross swimming! country Champs, our Melinda is looking like Springs under her shoes give hot property. Melinda extra lift Melinda began her sports Continued Page 3 career as a swimmer. By 9 years of age she was representing her club at State level. She held numerous records for INSIDE BLISTER 108 Breaststroke and Lisa facing racing pacing Butterfly. Her switch to running came after the McKinney makes most of death of her favourite marvellous mud moment Coach and because she Weather woe means Mo wasn’t growing as big as can’t crow though not slow! her fellow competitors. She managed some pretty fast times at inter-schools Brent takes tumble at Trevi champs and Cross Country before making an impression in the Open category where she has Champion Charles cheered steadily improved. by chance & chase challenge N’Lotsa Uthastuff Melinda credits her swimming background for endurance
    [Show full text]
  • Word-Based Text Compression
    WORD-BASED TEXT COMPRESSION Jan Platoš, Jiří Dvorský Department of Computer Science VŠB – Technical University of Ostrava, Czech Republic {jan.platos.fei, jiri.dvorsky}@vsb.cz ABSTRACT Today there are many universal compression algorithms, but in most cases is for specific data better using specific algorithm - JPEG for images, MPEG for movies, etc. For textual documents there are special methods based on PPM algorithm or methods with non-character access, e.g. word-based compression. In the past, several papers describing variants of word- based compression using Huffman encoding or LZW method were published. The subject of this paper is the description of a word-based compression variant based on the LZ77 algorithm. The LZ77 algorithm and its modifications are described in this paper. Moreover, various ways of sliding window implementation and various possibilities of output encoding are described, as well. This paper also includes the implementation of an experimental application, testing of its efficiency and finding the best combination of all parts of the LZ77 coder. This is done to achieve the best compression ratio. In conclusion there is comparison of this implemented application with other word-based compression programs and with other commonly used compression programs. Key Words: LZ77, word-based compression, text compression 1. Introduction Data compression is used more and more the text compression. In the past, word- in these days, because larger amount of based compression methods based on data require to be transferred or backed-up Huffman encoding, LZW or BWT were and capacity of media or speed of network tested. This paper describes word-based lines increase slowly.
    [Show full text]
  • The Basic Principles of Data Compression
    The Basic Principles of Data Compression Author: Conrad Chung, 2BrightSparks Introduction Internet users who download or upload files from/to the web, or use email to send or receive attachments will most likely have encountered files in compressed format. In this topic we will cover how compression works, the advantages and disadvantages of compression, as well as types of compression. What is Compression? Compression is the process of encoding data more efficiently to achieve a reduction in file size. One type of compression available is referred to as lossless compression. This means the compressed file will be restored exactly to its original state with no loss of data during the decompression process. This is essential to data compression as the file would be corrupted and unusable should data be lost. Another compression category which will not be covered in this article is “lossy” compression often used in multimedia files for music and images and where data is discarded. Lossless compression algorithms use statistic modeling techniques to reduce repetitive information in a file. Some of the methods may include removal of spacing characters, representing a string of repeated characters with a single character or replacing recurring characters with smaller bit sequences. Advantages/Disadvantages of Compression Compression of files offer many advantages. When compressed, the quantity of bits used to store the information is reduced. Files that are smaller in size will result in shorter transmission times when they are transferred on the Internet. Compressed files also take up less storage space. File compression can zip up several small files into a single file for more convenient email transmission.
    [Show full text]
  • Metadefender Core V4.12.2
    MetaDefender Core v4.12.2 © 2018 OPSWAT, Inc. All rights reserved. OPSWAT®, MetadefenderTM and the OPSWAT logo are trademarks of OPSWAT, Inc. All other trademarks, trade names, service marks, service names, and images mentioned and/or used herein belong to their respective owners. Table of Contents About This Guide 13 Key Features of Metadefender Core 14 1. Quick Start with Metadefender Core 15 1.1. Installation 15 Operating system invariant initial steps 15 Basic setup 16 1.1.1. Configuration wizard 16 1.2. License Activation 21 1.3. Scan Files with Metadefender Core 21 2. Installing or Upgrading Metadefender Core 22 2.1. Recommended System Requirements 22 System Requirements For Server 22 Browser Requirements for the Metadefender Core Management Console 24 2.2. Installing Metadefender 25 Installation 25 Installation notes 25 2.2.1. Installing Metadefender Core using command line 26 2.2.2. Installing Metadefender Core using the Install Wizard 27 2.3. Upgrading MetaDefender Core 27 Upgrading from MetaDefender Core 3.x 27 Upgrading from MetaDefender Core 4.x 28 2.4. Metadefender Core Licensing 28 2.4.1. Activating Metadefender Licenses 28 2.4.2. Checking Your Metadefender Core License 35 2.5. Performance and Load Estimation 36 What to know before reading the results: Some factors that affect performance 36 How test results are calculated 37 Test Reports 37 Performance Report - Multi-Scanning On Linux 37 Performance Report - Multi-Scanning On Windows 41 2.6. Special installation options 46 Use RAMDISK for the tempdirectory 46 3. Configuring Metadefender Core 50 3.1. Management Console 50 3.2.
    [Show full text]
  • Data Compression for Remote Laboratories
    Paper—Data Compression for Remote Laboratories Data Compression for Remote Laboratories https://doi.org/10.3991/ijim.v11i4.6743 Olawale B. Akinwale Obafemi Awolowo University, Ile-Ife, Nigeria [email protected] Lawrence O. Kehinde Obafemi Awolowo University, Ile-Ife, Nigeria [email protected] Abstract—Remote laboratories on mobile phones have been around for a few years now. This has greatly improved accessibility of these remote labs to students who cannot afford computers but have mobile phones. When money is a factor however (as is often the case with those who can’t afford a computer), the cost of use of these remote laboratories should be minimized. This work ad- dressed this issue of minimizing the cost of use of the remote lab by making use of data compression for data sent between the user and remote lab. Keywords—Data compression; Lempel-Ziv-Welch; remote laboratory; Web- Sockets 1 Introduction The mobile phone is now the de facto computational device of choice. They are quite powerful, connected devices which are almost always with us. This is so much so that about every important online service has a mobile version or at least a version compatible with mobile phones and tablets (for this paper we would adopt the phrase mobile device to represent mobile phones and tablets). This has caused online labora- tory developers to develop online laboratory solutions which are mobile device- friendly [1, 2, 3, 4, 5, 6, 7, 8]. One of the main benefits of online laboratories is the possibility of using fewer re- sources to serve more people i.e.
    [Show full text]
  • CALIFORNIA STATE UNIVERSITY, NORTHRIDGE LOSSLESS COMPRESSION of SATELLITE TELEMETRY DATA for a NARROW-BAND DOWNLINK a Graduate P
    CALIFORNIA STATE UNIVERSITY, NORTHRIDGE LOSSLESS COMPRESSION OF SATELLITE TELEMETRY DATA FOR A NARROW-BAND DOWNLINK A graduate project submitted in partial fulfillment of the requirements For the degree of Master of Science in Electrical Engineering By Gor Beglaryan May 2014 Copyright Copyright (c) 2014, Gor Beglaryan Permission to use, copy, modify, and/or distribute the software developed for this project for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. Copyright by Gor Beglaryan ii Signature Page The graduate project of Gor Beglaryan is approved: __________________________________________ __________________ Prof. James A Flynn Date __________________________________________ __________________ Dr. Deborah K Van Alphen Date __________________________________________ __________________ Dr. Sharlene Katz, Chair Date California State University, Northridge iii Contents Copyright .......................................................................................................................................... ii Signature Page ...............................................................................................................................
    [Show full text]
  • Hardware Architecture for Elliptic Curve Cryptography and Lossless Data Compression
    Hardware architecture for elliptic curve cryptography and lossless data compression by Miguel Morales-Sandoval A thesis presented to the National Institute for Astrophysics, Optics and Electronics in partial ful¯lment of the requirement for the degree of Master of Computer Science Thesis Advisor: PhD. Claudia Feregrino-Uribe Computer Science Department National Institute for Astrophysics, Optics and Electronics Tonantzintla, Puebla M¶exico December 2004 Abstract Data compression and cryptography play an important role when transmitting data across a public computer network. While compression reduces the amount of data to be transferred or stored, cryptography ensures that data is transmitted with reliability and integrity. Compression and encryption have to be applied in the correct way: data are compressed before they are encrypted. If it were the opposite case the result of the cryptographic operation would be illegible data and no patterns or redundancy would be present, leading to very poor or no compression. In this research work, a hardware architecture that joins lossless compression and public-key cryptography for secure data transmission applications is discussed. The architecture consists of a dictionary-based lossless data compressor to compress the incoming data, and an elliptic curve crypto- graphic module that performs two EC (elliptic curve) cryptographic schemes: encryp- tion and digital signature. For lossless data compression, the dictionary-based LZ77 algorithm is implemented using a systolic array aproach. The elliptic curve cryptosys- tem is de¯ned over the binary ¯eld F2m , using polynomial basis, a±ne coordinates and the binary method to compute an scalar multiplication. While the model of the complete system was implemented in software, the hardware architecture was described in the Very High Speed Integrated Circuit Hardware Description Language (VHDL).
    [Show full text]
  • A Review of Data Compression Technique
    International Journal of Computer Science Trends and Technology (IJCST) – Volume 2 Issue 4, Jul-Aug 2014 RESEARCH ARTICLE OPEN ACCESS A Review of Data Compression Technique Ritu1, Puneet Sharma2 Department of Computer Science and Engineering, Hindu College of Engineering, Sonipat Deenbandhu Chhotu Ram University, Murthal Haryana-India ABSTRACT With the growth of technology and the entrance into the Digital Age, the world has found itself amid a vast amount of information. Dealing with such enormous amount of information can often present difficulties. Digital information must be stored and retrieved in an efficient manner, in order for it to be put to practical use. Compression is one way to deal with this problem. Images require substantial storage and transmission resources, thus image compression is advantageous to reduce these requirements. Image compression is a key technology in transmission and storage of digital images because of vast data associated with them. This paper addresses about various image compression techniques. There are two types of image compression: lossless and lossy. Keywords:- Image Compression, JPEG, Discrete wavelet Transform. I. INTRODUCTION redundancies. An inverse process called decompression Image compression is important for many applications (decoding) is applied to the compressed data to get the that involve huge data storage, transmission and retrieval reconstructed image. The objective of compression is to such as for multimedia, documents, videoconferencing, and reduce the number of bits as much as possible, while medical imaging. Uncompressed images require keeping the resolution and the visual quality of the considerable storage capacity and transmission bandwidth. reconstructed image as close to the original image as The objective of image compression technique is to reduce possible.
    [Show full text]
  • Modification of Adaptive Huffman Coding for Use in Encoding Large Alphabets
    ITM Web of Conferences 15, 01004 (2017) DOI: 10.1051/itmconf/20171501004 CMES’17 Modification of Adaptive Huffman Coding for use in encoding large alphabets Mikhail Tokovarov1,* 1Lublin University of Technology, Electrical Engineering and Computer Science Faculty, Institute of Computer Science, Nadbystrzycka 36B, 20-618 Lublin, Poland Abstract. The paper presents the modification of Adaptive Huffman Coding method – lossless data compression technique used in data transmission. The modification was related to the process of adding a new character to the coding tree, namely, the author proposes to introduce two special nodes instead of single NYT (not yet transmitted) node as in the classic method. One of the nodes is responsible for indicating the place in the tree a new node is attached to. The other node is used for sending the signal indicating the appearance of a character which is not presented in the tree. The modified method was compared with existing methods of coding in terms of overall data compression ratio and performance. The proposed method may be used for large alphabets i.e. for encoding the whole words instead of separate characters, when new elements are added to the tree comparatively frequently. Huffman coding is frequently chosen for implementing open source projects [3]. The present paper contains the 1 Introduction description of the modification that may help to improve Efficiency and speed – the two issues that the current the algorithm of adaptive Huffman coding in terms of world of technology is centred at. Information data savings. technology (IT) is no exception in this matter. Such an area of IT as social media has become extremely popular 2 Study of related works and widely used, so that high transmission speed has gained a great importance.
    [Show full text]
  • Greedy Algorithm Implementation in Huffman Coding Theory
    iJournals: International Journal of Software & Hardware Research in Engineering (IJSHRE) ISSN-2347-4890 Volume 8 Issue 9 September 2020 Greedy Algorithm Implementation in Huffman Coding Theory Author: Sunmin Lee Affiliation: Seoul International School E-mail: [email protected] <DOI:10.26821/IJSHRE.8.9.2020.8905 > ABSTRACT In the late 1900s and early 2000s, creating the code All aspects of modern society depend heavily on data itself was a major challenge. However, now that the collection and transmission. As society grows more basic platform has been established, efficiency that can dependent on data, the ability to store and transmit it be achieved through data compression has become the efficiently has become more important than ever most valuable quality current technology deeply before. The Huffman coding theory has been one of desires to attain. Data compression, which is used to the best coding methods for data compression without efficiently store, transmit and process big data such as loss of information. It relies heavily on a technique satellite imagery, medical data, wireless telephony and called a greedy algorithm, a process that “greedily” database design, is a method of encoding any tries to find an optimal solution global solution by information (image, text, video etc.) into a format that solving for each optimal local choice for each step of a consumes fewer bits than the original data. [8] Data problem. Although there is a disadvantage that it fails compression can be of either of the two types i.e. lossy to consider the problem as a whole, it is definitely or lossless compressions.
    [Show full text]