Skip to content
This repository has been archived by the owner on Aug 19, 2024. It is now read-only.

Rewrite Threading Backend #680

Merged
merged 58 commits into from
Sep 18, 2023
Merged

Rewrite Threading Backend #680

merged 58 commits into from
Sep 18, 2023

Conversation

ekiwi
Copy link
Collaborator

@ekiwi ekiwi commented Sep 8, 2023

This PR contains a complete from-scratch rewrite of the threading support in chiseltest.

  • multi-thread: 2x - 4x speedup on a threading heavy testbench
  • single-thread: single threaded testbenches are as fast as (within 3% of) the old, separate single-threaded backend which required an experimental NoThreadingAnnotation.
  • Read/write and write/write conflict detection is slightly less strict.
  • timescope was removed as a feature
  • multi-clock support went from essentially non-existent to really non-existent
  • we now have a global step method which just steps the single global clock which is all we support

Benchmark

Single Thread GSD

  New Threaded Old Threaded  Old No Thread
Treadle 8.8s 77.2s (8.8x) 8.7s (99%)
Verilator 1.9s 58.7s (30x) 1.9s (100%)

UART Multi-Thread Microbenchmark

  New Threaded New + FSM   Old Threaded   Old No Thread + FSM vs New Threaded vs New + FSM
1000 bytes w/ bitDelay=1 0.70s 0.48s (69%) 3.07s (439%) 0.47s 67% 97%
100 bytes w/ bitDelay=50 2.35s 2.31s (98%) 5.67s (241%) 2.23s 95% 97%

+ FSM: Is a version where I manually ported the threads to a naive FSM and thus we only need a single chiseltest thread.

@ekiwi ekiwi changed the title [wip] prototype Rewrite Threading Backend Sep 15, 2023
@ekiwi ekiwi marked this pull request as ready for review September 15, 2023 16:35
@ekiwi ekiwi merged commit 6457e1a into ucb-bar:main Sep 18, 2023
27 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant