Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PerfCCT frame, record inst lifetime #88

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tastynoob
Copy link

[WIP]
One general performance framework
Record large structure by c++ layer
And easy to expand and maintain

@tastynoob tastynoob force-pushed the PerfCounter-CommitTrace branch from c6c1640 to e5012cb Compare November 28, 2024 10:44
@tastynoob
Copy link
Author

Use this framework need to implement "global simulation tick" and "riscv disasm" two function in verilator c++ layer,
I learned that there is a function called GTimer, but it looks cumbersome
I have one ideal like this
image
(difftest/src/test/csrc/common/main.cpp)
Increment when call emu->tick()

@tastynoob tastynoob force-pushed the PerfCounter-CommitTrace branch 7 times, most recently from c93260b to ed5f190 Compare December 5, 2024 10:12
@tastynoob tastynoob force-pushed the PerfCounter-CommitTrace branch from ed5f190 to 72e4a53 Compare December 9, 2024 08:28
@tastynoob tastynoob requested a review from Tang-Haojin December 9, 2024 08:55
@tastynoob tastynoob force-pushed the PerfCounter-CommitTrace branch 3 times, most recently from 64bef64 to d37205f Compare December 10, 2024 06:57
@tastynoob tastynoob force-pushed the PerfCounter-CommitTrace branch 2 times, most recently from 41316c0 to b636bbe Compare December 12, 2024 10:06
@tastynoob tastynoob force-pushed the PerfCounter-CommitTrace branch from b636bbe to 2b4f0bf Compare December 30, 2024 02:39
}


override def desiredName: String = moduleName
}

trait HasDPICAssign extends BlackBox with HasBlackBoxInline {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why here need one new trait

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse trait HasDPIC?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For createInstMeta, we need to get sn in the current clock, not on the next clock posedge. We should use combinational logic to implement it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the formats are different, they should not be reused.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean use parameterization, make HasDPICAssign merge to HasDPICUnit

    pc is unsigned, but sqlite3 only supports signed integer [-2^63, 2^63-1], if real pc > 2^63-1, it will be stored as negative number, (negtive pc = real pc - 2^64), when read a negtive pc, real pc = negtive pc + 2^64.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants