SV12 — don’t write through a channel, write into a channel

A channel class could implement a pair of interfaces classes, such as to connect a server and a client, using a pair of mailboxes (or queues). The client interface’s methods would write to one mailbox and read from the other, and the server interface’s methods would do the converse, yielding two parallel streams joined together into a virtual circuit of messages.

At the clock edge, a module with a reference to one of the interfaces could use the methods to read/write messages from/into the channel, but it couldn’t use them to directly cause an effect in its counterpart, such as writing a variable, because the transactions may take arbitrarily many clock cycles, depending on what else is going on.

In practice, additional protocols could be layered on top of something as basic as described above. It would be nice to have a standard suite of such protocols.

Advertisements

Tell me (anonymous OK)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s