async in wishbone template


greg samsa

Recommended Posts

Hi All,

I've been getting back into some Papilio development again lately and have been very happy to see all the improvements to the SoC ecosystem.  I've been able to reproduce the pwn tutorial (very helpful!) and now want to add a toy 'adder' (add two registers and store the result in a third) component.

 

I'm struggling to understand the behavior of async vs sync from the perspective of software running on zpuino.  With an async result do you poll for a ready bit, vs having the cpu block on sync?  Are there software examples of the two, or best practices to follow?

 

The default template is async, and the vhdl code makes sense, I'm just wondering… for the adder component described above, should I be using sync?  (I've seen the examples of that in another thread).

 

Thanks in advance,

-Greg

Link to comment
Share on other sites

Success!

Very simple example, but was still fun to get it working.  I attached the adder to wishbone slot 9 after editing the schematic symbol, and followed the template Arduino code to set two registers, and read the result from the third.

For being a toy example, it helped clear up a *great* deal on how the software interacts with the hardware for me.

 

Here's a gist of the arduino and vhdl code - https://gist.github.com/gregor-samsa/36d32adbaec8330c2663 .

 

Thanks for the help again,

-Greg

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.