GithubHelp home page GithubHelp logo

gergoerdi / clash-bounce-bench Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 0.0 71 KB

Benchmark for various methods of simulating Clash

C 32.87% C++ 5.98% Haskell 53.34% Makefile 7.81%
clash verilog simulation benchmark c verilator haskell sdl2

clash-bounce-bench's Introduction

  1. Run the hand-translated C benchmark:
$ cd csim
$ make
$ ../_build/csim/Bounce
Hand-translated C, from C: 4192001 cycles, 61 ms
  1. Run the Verilator C++ benchmark:
$ cd verilator
$ make
$ ../_build/verilator/SimMain
Verilator, from C: 4192001 cycles, 125 ms
  1. Run the Haskell benchmarks
$ stack build
$ stack run sim-hs
Clash: 4192001 cycles, 12799 ms

$ stack run sim-ffi
Hand-translated C, from Haskell: 4192001 cycles, 241 ms

$ stack run sim-verilator
Verilator, from Haskell: 4192000 cycles, 365 ms
  1. Marvel at the Haskell SDL frontend with VGA signal interpreter
$ stack run sim-ffi-sdl
60 frames in 1820 ms, 33.0 fps
60 frames in 1745 ms, 34.4 fps
60 frames in 1885 ms, 31.8 fps
60 frames in 1961 ms, 30.6 fps
60 frames in 1779 ms, 33.7 fps

$ stack run sim-verilator-sdl
60 frames in 2948 ms, 20.4 fps
60 frames in 2609 ms, 23.0 fps
60 frames in 2524 ms, 23.8 fps
60 frames in 2593 ms, 23.1 fps

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.