Code Monkey home page Code Monkey logo

svfplayer's Introduction

libsvfplayer

libsvfplayer is a JTAG .svf parser and player library in C++, designed to be generic and easy to use, consisting of these classes:

  • svfParser - lexer and parser for the SVF language
  • svfPlayer - takes svf commands (can be from a svfParser) and generates a JTAG waveform that can be replayed (e.g. by bit-banging or dma gpio)

Example applications:

  • Programming an FPGA without a xilinx or altera programmer (using e.g. a orange pi or any SBC with gpio)
  • Automated programmers for production use

Example usage:

svfParser parser;
svfPlayer player;

parser.reset();
player.reset();
while(true) {
  char* line=READ A LINE FROM SVF FILE;
  parser.processLine(line,strlen(line));
  svfCommand cmd;
  while(parser.nextCommand(cmd))
    player.processCommand(cmd);
  
  // player.outBuffer now contains a fragment of a JTAG waveform; you can store it or play it on your hardware
  // outBuffer contains one byte per clock cycle; format of each byte (bit 0 means LSB):
  //	bit 0: value to put on tms
  //	bit 1: value to put on tdi
  //	bit 2: value expected on tdo
  //	bit 3: 0 if tdi is don't care, 1 otherwise
  //	bit 4: 0 if tdo is don't care, 1 otherwise
  
  free(line);
}
  

svfplayer.C contains an example command line tool to play .svf files on some in-house custom hardware. It isn't useful as a tool but can be a reference for how to use the libsvfplayer API.

svfplayer's People

Contributors

xaxaxa avatar xaxaxa-dev-0 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.