박성수
박성수

Reputation: 11

In RISCV, is Each thread has a own PC value in multithreading Program?

Im currently working on a Hard ware for Data Race detect

So I track each instructions and made history table for race detect.

I made C program for Intended data race and Track instructions by PC value

but regardless of data race I cant track multi thread.

So my question is "Is Each thread has a own PC value in multithreading Program?"

for eg

if thread A and B attempt to use

**"108ac: 8141a783 lw a5,-2028(gp) # 1209c / " ** at the same time

is PC value is different?

l mean

A's PC=108ac

B's PC =108ab

like this

Disassembling the test program to check the PC value and create and debug the hardware history table based on it, but each thread is executed sequentially and no specific command is sandwiched between the threads (even though a data race has occurred)

Upvotes: 1

Views: 60

Answers (1)

user26747389
user26747389

Reputation: 11

Yes, each thread has its own Program Counter (PC) value in a multithreading program. Each thread can execute independently and maintain its own PC value, which allows it to keep track of its execution state separately from other threads.

Upvotes: 1

Related Questions