Skip to content

Coprocessor interface#101

Merged
samsoniuk merged 2 commits intodarklife:masterfrom
MrJake222:feat/cpr
Jun 22, 2025
Merged

Coprocessor interface#101
samsoniuk merged 2 commits intodarklife:masterfrom
MrJake222:feat/cpr

Conversation

@MrJake222
Copy link
Contributor

Hi,

I added a simple coprocessor interface to add my custom instruction. Thought you'd like to have a look.
(I hope you like my "beautifully obfuscated verilog" style)

Maybe MAC16x16 would be nice as a coprocessor, let me know, I could implement that.
I just don't know where to put it. Darkbridge?

@samsoniuk
Copy link
Member

wow! that is really very nice! :)

your implementation perfectly matches with my concept of attach external accelerators in the form of coprocessors, because that was the way on the old 68k! also, your suggestion to move MAC16x16 is perfect as proof of concept!

although it can be implemented in the darkbridge, maybe the good way is create a new file "darkdsp.v", so people creating coprocessors can use it as reference for new coprocessors. feel free to create the way you like, just do not forget add your copyright disclaimer on the file header! case you like the BSD license (highly recommended!), you can put the file directly on the rtl directory, otherwise we typically put on the lib, in a separate directory, with a separate license.

thank you for this contribution, it is really very important! :)

@samsoniuk samsoniuk merged commit 4a277c5 into darklife:master Jun 22, 2025
1 check passed
@samsoniuk
Copy link
Member

possible future steps:

just like I mentioned before, that copro concept is pretty like the old 68k and, on that processors, the way to access copros was via the undefined F-line instruction, which works pretty like our custom-0 instruction:

cpGEN = 1111 XXX 000 MMM RRR

which:
XXX = copro ID
MMM = address mode
RRR = register

the MMM and RRR fields are the way the 68k access registers and memory but that is not relevant for our case... the interesting thing is that the copro-ID enables add up to 8 different coprocessors!

so, maybe is possible use FCT3 in this case to select different coprocessors on darkbridge, so it is possible pack up to 8 coprocessors working in parallel.

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.

2 participants