Giter Site home page Giter Site logo

opt-seq's Introduction

Optimized Sequence

Optimized Sequence (Opt-Seq) is an algorithm for merging instruction sequences generated by Opt-VP in order to increase their execution coverage and, for example, save costs for building hardware accelerators.

🎯 Features

  • Support of Opt-VP's modes for providing a variety of sequences
  • Merging of RISC-V instructions

🚀 Getting Started

First, the steps to install Opt-Seq are described. Second, it is explained how Opt-Seq can be used to merge instruction sequences.

🔧 Installation

Since the sequences are generated in JSON, nlohmann is a prerequisite for parsing them. This library can be installed, for example, by the command brew install nlohmann-json depending on the operating system.

In order to compile Opt-Seq just type this command in your terminal:

$ g++ -std=c++2a -Wall -Wextra -pedantic -Os -DNDEBUG -o optseq optseq.cpp

Alternatively, the following command can be executed for debugging purposes:

$ g++ -std=c++2a -Wall -Wextra -pedantic -g -o optseq optseq.cpp

To uninstall Opt-Seq, simply remove the executable optseq and intermediate files if any exist.

💻 Usage

The command line interface of Opt-Seq can be used according to the following scheme:

$ ./optseq <file> <mode>
  • <file>: file path to sequences in JSON
  • <mode>: 0 = default, 1 = subsequence, 2 = variant, 3 = full

Again, sequences can be generated with Opt-VP by activating a respective mode. While the default mode is described here, the other modes are explained in this paper.

✅ Tests

Now, the sequences (SUB, ADD, XOR, DIV, OR), (ADD, XOR, XOR, DIV, SUB, DIV), and (OR, SUB, SUB) are optimized into one sequence by mapping instructions if possible. The sequences to be merged are encoded in the test application called test.json.

Assuming that these sequences were generated using the default mode, the merged sequence is created by the following command:

$ ./optseq test.json 0
optseq> SUB->ADD->XOR/NOP->DIV/NOP->XOR->SUB/NOP->DIV->OR

Depending on how Opt-Seq was compiled, the overall output may differ.

⚠️ License

Opt-Seq is licensed under the terms of the MIT license.

opt-seq's People

Contributors

runekrauss avatar zielasko avatar

Stargazers

 avatar  avatar

Watchers

Hoang M. Le avatar  avatar Jannis Stoppe avatar Pascal avatar Oliver Keszöcze avatar Daniel Große avatar  avatar Niklas Bruns avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.