Skip to content

(WIP) Wishbone manager example#202

Draft
ngernest wants to merge 5 commits intomainfrom
wishbone_manager
Draft

(WIP) Wishbone manager example#202
ngernest wants to merge 5 commits intomainfrom
wishbone_manager

Conversation

@ngernest
Copy link
Contributor

@ngernest ngernest commented Feb 26, 2026

(WIP) Follow-up to #193, which was just for the subordinate.

The Verilog DUT is taken from a blogpost explaining the manager-side of Wishbone B4:

(I'm currently reading through the blogpost, will add a manager-side .prot file soon)

reset();

// Set the bus address to 0x10 (absolute, auto-increment enabled)
set_address(30'h10);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why is there a separate set_address protocol?
I would expect the address to be an input argument of the read and write protocols.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh this is mostly to align with how the Verilog DUT supports a set_address command that is different from the read / write commands. (The DUT takes in a 34-bit word where the top 2 bits are the "opcode" representing the command, and the "opcode" for set_address is different from read / write.)

From the comments in the Verilog:

Basic bus commands are:

2'b00	Read
2'b01	Write (lower 32-bits are the value to be written)
2'b10	Set address
		Next 30 bits are the address
		bit[1] is an address difference bit
		bit[0] is an increment bit
2'b11	Special command (e.g. reset)

However, if you want, I can make address be part of read and write, and get rid of set_address! I think faithfully modeling the set_address behavior in our DSL may be tricky since they need to increment the address (whereas our language doesn't have addition currently), and making the address an input parameter to read / write allows us to circumvent the issue (since we can specify the new address as the input parameter directly).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Interesting. How does this correlate with the official wishbone spec? Does the spec also separate these two operations?

Copy link
Contributor Author

@ngernest ngernest Feb 27, 2026

Choose a reason for hiding this comment

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

I checked the spec and it looks like set_address is mostly a convenience operation that this particular DUT defines, since this DUT is meant to be part of a bigger UART to Wishbone converter), i.e. the set_address command is mostly used for communication with the upstream user of the DUT (a UART), as opposed to communicating w the Wishbone subordinate.

I think for now, we can get rid of set_address for now and only focus on the Wishbone subset of this DUT (I picked this DUT because the accompanying blogpost explains Wishbone very well and I found it pedagogically useful).

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