jbush001 / NyuziProcessor

GPGPU microprocessor architecture
Apache License 2.0
1.96k stars 348 forks source link

Enable new multithreading support in Verilator 4 #169

Open jbush001 opened 5 years ago

jbush001 commented 5 years ago

Use --threads flag, need to test for correct operation, produce profile results to characterize speedup.

jbush001 commented 5 years ago

Could use the ProcessorCount cmake module to automatically determine number of threads: https://cmake.org/cmake/help/latest/module/ProcessorCount.html

jbush001 commented 5 years ago

The CMakeLists.txt file in hardware would also need be modified to update the minimum supported version to one with multithreading support.

jbush001 commented 5 years ago

Need to do some performance measurements and regression tests before enabling by default.

jbush001 commented 5 years ago

Running a randomized cosimulation test (3.1 GHz Intel Core i7, 2 cores, 4 threads)

1 thread - 18s 2 threads - 16s 4 threads - 27s

jbush001 commented 5 years ago

ProcessorCount returns 4 on my machine, even though system info reports two cores. This is presumably the number of threads. Using this value is slower than 1 thread.