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

How to Design a Coprocessor #2518

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

Conversation

joncapltd
Copy link

This adds a tutorial on how to customise the example coprocessor with your own instructions and test them.

Copy link
Contributor

✔️ successful run, report available here.

@JeanRochCoulon
Copy link
Contributor

Great contribution ! Very useful for newcomers. To become contributor, you have to sign the Eclipse agreement, can you ?

Copy link
Contributor

@Gchauvon Gchauvon left a comment

Choose a reason for hiding this comment

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

Those instructions to implement a simple coprocessor are good.
Some complementary information about forbidden combinational path between issue and result interface would be great.

Comment on lines 245 to 292
// 1 RISCV instruction class for our Coprocessor
parameter int unsigned NbInstr = 1;
parameter copro_issue_resp_t CoproInstr[NbInstr] = '{
'{
instr: 32'b0000000_00000_00000_000_00000_0101011, // custom1 opcode
mask: 32'b1111111_00000_00000_110_00000_1111111, // bits that must match
resp : '{
accept : 1'b1, // We will process this instruction
writeback : 1'b1, // We will write a general-purpose register
dualwrite : 1'b0,
dualread : 1'b0,
loadstore : 1'b0, // No memory operation (Not supported in pipeline)
exc : 1'b0 // Cannot throw exception
}
}
};
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks based on a deprecated version of the cvxif_instr_pkg.sv

Copy link
Author

@joncapltd joncapltd Oct 2, 2024

Choose a reason for hiding this comment

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

I must have been working from the latest tagged release. (v5.1.0 also reportedly doesn't build, sadly, due to a problem with dual-issue parameterisation which was fixed soon after.). I'll update the example to be based on master.

@joncapltd
Copy link
Author

Great contribution ! Very useful for newcomers. To become contributor, you have to sign the Eclipse agreement, can you ?

@JeanRochCoulon Apologies, this took us a bit to digest. I believe I have now signed the Eclipse agreement.

@jquevremont
Copy link
Contributor

@JeanRochCoulon Apologies, this took us a bit to digest. I believe I have now signed the Eclipse agreement.

@JeanRochCoulon, can you provide guidance to relaunch this PR as the ECA is now signed? A new commit?

@joncapltd, a prerequisite to make the connection on the ECA is to have the same email address in GitHub and the Eclipse account.

@JeanRochCoulon
Copy link
Contributor

JeanRochCoulon commented Oct 2, 2024

I relaunched the CI, but ECA always fails. Can you double check the email address as suggested by @jquevremont

Can you rebase your PR please ?

@jquevremont
Copy link
Contributor

Hi joncapltd, any update on this?

@JeanRochCoulon
Copy link
Contributor

Hi @joncapltd Any news ?

@joncapltd
Copy link
Author

I've found time to update the example to align with the current master and test. Apologies for the delay!

I now need to figure out what's going with email addresses and ECA...

Copy link
Contributor

✔️ successful run, report available here.

1 similar comment
Copy link
Contributor

✔️ successful run, report available here.

@jquevremont
Copy link
Contributor

When looking at https://api.eclipse.org/git/eca/status/gh/openhwgroup/cva6/2518, I think early commits have been "polluted" and do not pass the ECA. I would recommend to start with a new PR.

@joncapltd
Copy link
Author

@jquevremont Thank you for the pointer to the report; I was uncertain whether I had any commits that passed, and was worried that the check was case-sensitive, as the ECA did not allow capital letters, but my github email has capitals. I'll see what I can do to maybe flatten the commits.

@jquevremont
Copy link
Contributor

Take this with a pinch of salt. I am not a specialist of the GitHub / ECA integration. I also see some recommendation on the report.

Add a tutorial for creating a custom coprocessor and testing it.

Add an introduction to the tutorial section.

Spelling fixes.

Update example to reflect the current master branch example coprocessor.
@joncapltd
Copy link
Author

I think I might be passing the ECA agreement now, after help with flattening the commits and force-pushing as the new user. Thanks to Samuel Stark here at the lab for the Git handling.

Copy link
Contributor

✔️ successful run, report available here.

Copy link
Contributor

✔️ successful run, report available here.

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.

4 participants