This repository has been archived by the owner on Aug 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Confusing Fork-Join Usage #627
Comments
Can you post the error message / stack trace? Overlapping pokes probably means two threads tried to poke the same line |
Sure. If I only keep the B part and comment out A and C like this // ... Line 36
fork{
d.io.enq1.enqueueSeq(Seq(10.U, 11.U, 12.U))
}.fork{
// --- A ---
// d.clock.step(10)
// d.io.deq1.expectDequeueSeq(Seq(10.U, 11.U, 12.U)) // This works fine, of course.
// --- B ---
// What should I do if I have to avoid using `expectXXX()` methods? ( since I cannot know the exact output in some complex modules other than Queue )
// This will give me a timeout error. `deq1.ready` keeps false in waveform.
d.clock.step(10)
d.io.deq1.ready.poke(true.B)
// --- C ---
// This pokes `deq1.ready` for only 1 cycle
// d.clock.step(10)
// fork{
// d.io.deq1.ready.poke(true.B)
// d.clock.step(1)
// }.join
}.join
// Line 54 ... Then I get:
And |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am often confused about how to use fork and join in chiseltest.
Are there any good advice(or examples) about understanding how they work?
Here's an example showing my problem:
https://gist.github.com/liuxd17thu/c2bf5880cf605545e1835908ce60c46e
Besides, how do I know what causes "overlapping pokes" from the error message?
The text was updated successfully, but these errors were encountered: