ext_21139 ([identity profile] spamsink.livejournal.com) wrote in [personal profile] vak 2016-08-26 10:18 pm (UTC)

Как тебе вот это?
module MUTEX(input bit [1:0] in, output bit [1:0] out);
always @* casez ({int'(in), int'(out)})
{0, 'z}: out = 0;
{1, 'z}: out = 1;
{2, 'z}: out = 2;
{3, 1}: out = 1;
{3, 2}: out = 2;
{3, 0}: out = 1; // in[0] wins
{3, 3}: out = 1; // in[0] wins, I said!
endcase
endmodule

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org