Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gergoerdi/clash-bounce-bench
Benchmark for various methods of simulating Clash
https://github.com/gergoerdi/clash-bounce-bench
benchmark c clash haskell sdl2 simulation verilator verilog
Last synced: 5 days ago
JSON representation
Benchmark for various methods of simulating Clash
- Host: GitHub
- URL: https://github.com/gergoerdi/clash-bounce-bench
- Owner: gergoerdi
- Created: 2020-02-22T02:20:13.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-10T09:59:14.000Z (over 3 years ago)
- Last Synced: 2024-11-16T18:32:08.018Z (2 months ago)
- Topics: benchmark, c, clash, haskell, sdl2, simulation, verilator, verilog
- Language: Haskell
- Homepage:
- Size: 69.3 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
1. Run the hand-translated C benchmark:
```
$ cd csim
$ make
$ ../_build/csim/Bounce
Hand-translated C, from C: 4192001 cycles, 61 ms
```2. Run the Verilator C++ benchmark:
```
$ cd verilator
$ make
$ ../_build/verilator/SimMain
Verilator, from C: 4192001 cycles, 125 ms
```3. 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
```4. 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
```