riscv-admin / dev-partners

This repo is for tracking of RISC-V Development Partners Activities
3 stars 0 forks source link

Debug ACT for Native Triggers #7

Open jjscheel opened 1 year ago

jjscheel commented 1 year ago

Technical Group

Debug TG

ratification-pkg

Debug

Technical Liaison

Tim Newsome

Task Category

Arch Tests

Task Sub Category

Ratification Target

3Q2023

Statement of Work (SOW)

SOW link

SOW Signoffs: (delete those not needed)

Waiver

Pull Request Details

  1. Test PR: riscv-non-isa:riscv-arch-tests #487 - open
jjscheel commented 1 year ago

Per 4/11 email from Prasanna:

Debug : sangee status at where we were last, nothing progressed from our last meeting

ptprasanna commented 1 year ago

Was busy on other items, same status as previous.

jjscheel commented 1 year ago

Will keep this on the Agenda for discussion as we work to find a way to offload this effort based on Zfinx, Zfh running long and new work in Zdinx and Zhinx.

I've started a discussion with @timsifive and @pdonahue-ventana to explore contingencies.

jjscheel commented 1 year ago

Because this work has stalled, setting to "Blocked".

ptprasanna commented 1 year ago

Have Dusted off the debug ACT Matrix to finish the work at some quantifiable milestone. Shall send it for Tim's review before next meeting. This to complete the tasks which was started earlier, rather leave it in the middle.

jjscheel commented 1 year ago

We discussed this today in the Debug TG call without any takers. So, we shall see. Tim and Paul understand that without a volunteer, this may take us some time to get to.

jjscheel commented 1 year ago

@timsifive, @pdonahue-ventana, any volunteers to help here yet?

timsifive commented 1 year ago

I haven't heard from anyone.

jjscheel commented 1 year ago

Comment from most recent ARC minutes (July 10) - link

  • Debug 1.0: Review has started of the latest submitted spec, but just review of all the changes since the last Debug 1.0 draft spec was submitted, reviewed, and approved. Review of this has started, with initial discussion of one of the more notable backward-incompatible changes (between v1.0 and the ratified v0.13). This relates with abstract commands and the data registers to support more efficient FPGA implementations. After further discussion in next week's ARC meeting, John will be providing ARC feedback and guidance to the Debug TG. Likely other items of feedback that arise will also be provided.
  • Review of the latest Debug and Pointer Masking specs (along with the S*deleg extensions) are expected to continue next week.

Also note, this remains on the list of future DevPartners activities. It will be addressed AFTER Pointer Masking and the Floating Point gap work work (Zdinx, Zhinx).

jjscheel commented 1 year ago

Assigning back to IITM now that Zfinx/Zfh/Zdinx/Zhinx are wrapping up.

@ptprasanna, please dust off the coverage matrix and begin working on tests using Spike or QEMU. Technical questions can be directed to @timsifive.

jjscheel commented 1 year ago

@ptprasanna, this item is getting close to Freeze. As such, I'd like to understand the progress we've made in our next meeting. Please either attend or post status at your earliest convenience.

ptprasanna commented 1 year ago

@jjscheel - Here are the updates from IITM

anuani21 commented 1 year ago

Debugger existing test logs are placed in the below links:

https://gitlab.com/ptprasanna/actreports/-/tree/main/debugger/spike%2032?ref_type=heads in spike32. https://gitlab.com/ptprasanna/actreports/-/tree/main/debugger/spike%2064?ref_type=heads in spike64.

jjscheel commented 1 year ago

This is good news, @ptprasanna and @anuani21!

@timsifive, note the progress.

timsifive commented 1 year ago

Note that all tests in riscv-tests/debug test debugging through an external debugger. None of them test native trigger behavior, where a trigger is set and when it is hit the hart takes a debug exception.

jjscheel commented 12 months ago

@ptprasanna, I would like an update in the issue, by the next meeting on December 12, 2023, please.

anuani21 commented 11 months ago

@jjscheel, Based on the coverage matrix, I have started writing tests for native trigger behavior.I will able to share the draft by next meeting.

jjscheel commented 10 months ago

@anuani21, may I please get an update here?

anuani21 commented 10 months ago

@timsifive ,Can you please guide me, how to run the tests in native trigger behaviour?

anuani21 commented 10 months ago

@jjscheel ,I have generated the test for instruction count trigger(type 3) based on the coverage matrix.

@timsifive, Can you please guide me, how to run the tests in native trigger behaviour in spike?

pdonahue-ventana commented 10 months ago

timsifive is now @rtwfroody

anuani21 commented 10 months ago

@rtwfroody , Can you please guide me, how to run the tests in native trigger behaviour in spike?

jjscheel commented 10 months ago

@anuani21, I've sent an email to Tim and cc'd you.

rtwfroody commented 10 months ago

There's a README that describes how to run the tests: https://github.com/riscv-software-src/riscv-tests/blob/master/debug/README.md

If that's not clear, let me know.

jjscheel commented 9 months ago

@anuani21, please provide a status update when we have a moment. As I mentioned in the meeting, this work will gate ratification of the specification if not complete in the next 2-3 months.

anuani21 commented 8 months ago

@jjscheel, I will complete the work within the end of April month.

Here are the updates from IITM,

Based on the coverage matrix I am generating the test cases for trigger type 2 (match control) and type 3(instruction count) with different set of arguments.

I will share the draft to @rtwfroody for review shortly.

pdonahue-ventana commented 8 months ago

Based on the coverage matrix I am generating the test cases for trigger type 2 (match control) and type 3(instruction count) with different set of arguments.

We should focus on type 6 rather than type 2. Type 2 says: "This trigger type is deprecated. It is included for backward compatibility with version 0.13." Type 6 says: "This replaces mcontrol in newer implementations and serves to provide additional functionality."

jjscheel commented 8 months ago

Thanks, @anuani21 and @pdonahue-ventana!

anuani21 commented 8 months ago

@paul, we need to write the test cases for trigger type 6 and trigger type 3 alone.

On Mon, 18 Mar, 2024, 9:00 pm Paul Donahue, @.***> wrote:

Based on the coverage matrix I am generating the test cases for trigger type 2 (match control) and type 3(instruction count) with different set of arguments.

We should focus on type 6 rather than type 2. Type 2 says: "This trigger type is deprecated. It is included for backward compatibility with version 0.13." Type 6 says: "This replaces mcontrol in newer implementations and serves to provide additional functionality."

— Reply to this email directly, view it on GitHub https://github.com/riscv-admin/dev-partners/issues/7#issuecomment-2004224317, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3G6FF6BVA3SUF3MJM4I2O3YY4CCTAVCNFSM6AAAAAAV5WU24GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBUGIZDIMZRG4 . You are receiving this because you were mentioned.Message ID: @.***>

anuani21 commented 8 months ago

@jjscheel, Based on the coverage matrix I am generating the test cases for trigger type 6 (match control6) and type 3(instruction count) with different set of arguments.

anuani21 commented 7 months ago

@jjscheel,

Updates from IITM,

I will share the above tests and logs to @rtwfroody for review shortly.

In trigger type 6, the following tests are pending

I will complete the pending tests before the next meeting.

jjscheel commented 7 months ago

@anuani21, this is great progress. Am I correct in understanding that work remains on trigger type = 3?

anuani21 commented 7 months ago

Yes, that is correct. Type 3 test is pending.

On Tue, 2 Apr, 2024, 6:11 pm Jeff Scheel, @.***> wrote:

@anuani21 https://github.com/anuani21, this is great progress. Am I correct in understanding that work remains on trigger type = 3?

— Reply to this email directly, view it on GitHub https://github.com/riscv-admin/dev-partners/issues/7#issuecomment-2031939590, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3G6FF7LMO47M3BXMD6IWMDY3KRPVAVCNFSM6AAAAAAV5WU24GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZRHEZTSNJZGA . You are receiving this because you were mentioned.Message ID: @.***>

rtwfroody commented 7 months ago

I will share the above tests and logs to @rtwfroody for review shortly.

I never saw this. Did I miss an email somewhere?

anuani21 commented 7 months ago

Hi,

I had completed the test cases for store and execute with different match values ranges from 0 to 5 in trigger type 6.

In load operation, I am facing some issues, once it complete I will share the entire trigger type 6 test cases for review.

On Mon, 15 Apr, 2024, 10:47 pm Tim Newsome, @.***> wrote:

I will share the above tests and logs to @rtwfroody https://github.com/rtwfroody for review shortly.

I never saw this. Did I miss an email somewhere?

— Reply to this email directly, view it on GitHub https://github.com/riscv-admin/dev-partners/issues/7#issuecomment-2057432194, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3G6FFZABTCDL7RTHXSMQSTY5QDSHAVCNFSM6AAAAAAV5WU24GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJXGQZTEMJZGQ . You are receiving this because you were mentioned.Message ID: @.***>

anuani21 commented 7 months ago

@jjscheel,

Updates from IITM,

The pending test cases are,

when the above issue fixed in type 6 trigger, i will share the entire trigger 6 test cases and logs for review to @rtwfroody.

anuani21 commented 7 months ago

@jjscheel, Updates from IITM ,

-Paul suggested checking tinfo.version bit upon checking tinfo.version == 0 which means it is running in older version ( 0.13 ) , but the debug spec says to run in newer version ( 1.0 ) in which tinfo.version = 1 .

-After updating both spike and openocd to the latest commit , raised the same issue in openocd (https://github.com/riscv-collab/riscv-openocd/issues/1053) to which got the response stating this could be a spike issue.

-Raised the same issue in spike ( https://github.com/riscv-software-src/riscv-isa-sim/issues/1651#issuecomment-2084430295) . This issue seems not yet to be addressed in the spike development forum .

Can we get additional help regarding this issue ?

jjscheel commented 7 months ago

@pdonahue-ventana, @rtwfroody, please see the past post and advice @anuani21 on how to work past the issue.

rtwfroody commented 7 months ago

I'll update the spike trigger implementation to implement hit0/hit1 instead of the timing bit for mcontrol6. Should be done by May 15.

Have sent the test case and logs for trigger 6 (with load store and execute operations ) in older version for review to @rtwfroody.

How did you send these? I haven't seen them.

anuani21 commented 7 months ago

Tims, can you please send your mail address so that i can send it once again.

On Wed, 1 May, 2024, 9:45 pm Tim Newsome, @.***> wrote:

I'll update the spike trigger implementation to implement hit0/hit1 instead of the timing bit for mcontrol6. Should be done by May 15.

Have sent the test case and logs for trigger 6 (with load store and execute operations ) in older version for review to @rtwfroody https://github.com/rtwfroody.

How did you send these? I haven't seen them.

— Reply to this email directly, view it on GitHub https://github.com/riscv-admin/dev-partners/issues/7#issuecomment-2088701706, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3G6FF2NWFSFN5BMAG2ODDLZAEILHAVCNFSM6AAAAAAV5WU24GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOBYG4YDCNZQGY . You are receiving this because you were mentioned.Message ID: @.***>

rtwfroody commented 6 months ago

My email address is tim@casualhacker.net.

anuani21 commented 6 months ago

@jjscheel,

Updates from IITM ,

Following the review done by @rtwfroody ,by ongoing work in debug task

1) We are waiting for the fix in spike for mcontrol6. Tims informed me this fix will be done by this week. 2) Parallelly we are going to revisit the written tests and follow a new flow. 3) I am writing the test cases for type 3 trigger. Once the fix is in place we will resume to run the tests

rtwfroody commented 6 months ago

I have a spike branch that updates the mcontrol6 to version 1.0. @anuani21, can you use this branch for your mcontrol6 tests? It should be correct, but since there are no tests there may be bugs. If it's behaving strangely, please send me the test you're working on and I'll look into it.

The pull request (which I won't pursue further until I get confirmation that this code passes the new tests) is at https://github.com/riscv-software-src/riscv-isa-sim/pull/1667.

anuani21 commented 6 months ago

@rtwfroody, Fix for mcontrol6 in spike which updatesthe version to 1.0 is working fine. @rtwfroody and @jjscheel, I have started revisit the written test for mconrol6 type trigger and other trigger types.

YenHaoChen commented 6 months ago

Hello there,

I provided the source code of trigger type 3~6 to Spike last year (based on type 2 originally provided by @rtwfroody).

Sorry that I overlooked the tinfo.version. Since you are using the trigger module in Spike. I want to say hi to you, and let you know that I am willing to provide additional commits for bugs in my code.

rtwfroody commented 6 months ago

@YenHaoChen's mcontrol6.hit{0,1} changes merged into spike mainline through https://github.com/riscv-software-src/riscv-isa-sim/pull/1257.

@anuani21, please use the latest version of spike for your testing. Since his implementation is different from mine, it might not act the same.

jjscheel commented 6 months ago

@anuani21, what is the latest status here? When do you project having PRs to submit?

anuani21 commented 6 months ago

Hi Jeff,

Due to some emergency situation, I am not available last week. From yesterday I am started the work again.

I will make progress on this issue and update you.

On Tue, 28 May, 2024, 11:28 pm Jeff Scheel, @.***> wrote:

@anuani21 https://github.com/anuani21, what is the latest status here? When do you project having PRs to submit?

— Reply to this email directly, view it on GitHub https://github.com/riscv-admin/dev-partners/issues/7#issuecomment-2135823744, or unsubscribe https://github.com/notifications/unsubscribe-auth/A3G6FF5WA2LNQ7QHDEXTTBLZETATVAVCNFSM6AAAAAAV5WU24GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMZVHAZDGNZUGQ . You are receiving this because you were mentioned.Message ID: @.***>

jjscheel commented 6 months ago

No worries, @anuani21. Hope all is well. Thanks for the update.

anuani21 commented 5 months ago

@jjscheel,

Updates from IITM ,

1)Implemented mcontrol6 trigger with the latest spike version , raised a few issues with Tim . Tim has informed that the issues will be fixed by june 24th . We can move forward only after the fix.

Noted few more issue , hoping to receive some fix / clarification

a) In the log generated , it is showing tcontrol could fetch register 'tcontrol' . While implementing trigger passing ebreak statement manually , mcause value 2 which is mapped to illegal instruction operation .

b) In the log dcsr value is 0x4000b083 this results in the dcsr.ebreakm bit set to 1 , which is mapped to debug mode . dcsr.ebreakm bit should be 0 , only then it will raised breakpoint exception

2)Parallel till then will work on Code Size Reduction , will pick up from the last update.