Write behavioral Verilog code for a module called “Sort2” (pictured below) with three inputs s, a, b and two outputs x, y. The module’s function is also described below; in the function table, a “–” represents a don’t care. Also the function table has s, a as inputs, but the outputs x, y are expressed in terms of the third input b. In words, the “function table” to the left translates to the following: When s = 0, the smallest value among a and b goes to x and the other value goes to y. When s = 1, the largest value among a and b goes to x and the other value goes to y.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

If you have trouble reading the picture please let me know.

8. (a) Write behavioral Verilog code for a module called “Sort2” (pictured below) with three inputs s, a, b and two outputs x, y. The module’s function is also described below; in the function table, a “–” represents a don’t care. Also the function table has s, a as inputs, but the outputs x, y are expressed in terms of the third input b.

In words, the “function table” to the left translates to the following: When s = 0, the smallest value among a and b goes to x and the other value goes to y. When s = 1, the largest value among a and b goes to x and the other value goes to y.

(b) Structurally connect copies (or instantiations) of the module Sort2 to construct the module Bitonic with four inputs a0,a1,a2,a3 and four outputs z0,z1,z2,z3 shown below; each box in the figure below represents an instantiation of Sort2. Further, the inputs and outputs of the instantiations are located as in the figure above; namely, input to the top of the box is s, top input to the side is a, bottom output is y and so on.

(c) Try out the following values for input ha0,a1,a2,a3i on the module Bitonic. Determine the outputs and try to guess what module Bitonic does. Values of A to try out: <1,0,1,0> , <0,1,0,0> , <1,1,0,1> , <1,1,1,0>

8. (a) Write behavioral Verilog code for a module called "Sort2" (pictured below) with
three inputs s, a,b and two outputs z, y. The module's function is also described
below, in the function table, a "" represents a don't care. Also the function table
has s, a as inputs, but the outputs z,y are expressed in terms of the third input
b
I
Sort2
#1
comment
000-min(a, b), y-max(a, b)
min(a, b), y = max(a, b)
max(a, b), y min(a, b)
11-max(a, b), y = min(a, b)
0 161
1060
1
In words, the "function table to the left translates to the following:
Whens = 0, the smallest value among a and 6 goes to ar and the other value goes
to y. When s-1, the largest value among a and & goes to x and the other value
goes to y.
8 ay
(b) Structurally connect copies (or instantiations) of the module Sort2 to construct
the module Bitonic with four inputs as, 41, 42, and four outputs 20, 21, 22, 23
shown below; each box in the figure below represents an instantiation of Sort2.
Further, the inputs and outputs of the instantiations are located as in the figure
above, namely, input to the top of the box is s, top input to the side is a, bottom
output is y and so on.
Po
P₂
(c) Try out the following values for imput (₁, ₂.s) on the module Bitonic.
Determine the outputs and try to guess what module Bitonic does.
Values of A to try out: (1,0,1,0), (0,1,0,0), (1,1,0,1), (1,1,1,0)
Transcribed Image Text:8. (a) Write behavioral Verilog code for a module called "Sort2" (pictured below) with three inputs s, a,b and two outputs z, y. The module's function is also described below, in the function table, a "" represents a don't care. Also the function table has s, a as inputs, but the outputs z,y are expressed in terms of the third input b I Sort2 #1 comment 000-min(a, b), y-max(a, b) min(a, b), y = max(a, b) max(a, b), y min(a, b) 11-max(a, b), y = min(a, b) 0 161 1060 1 In words, the "function table to the left translates to the following: Whens = 0, the smallest value among a and 6 goes to ar and the other value goes to y. When s-1, the largest value among a and & goes to x and the other value goes to y. 8 ay (b) Structurally connect copies (or instantiations) of the module Sort2 to construct the module Bitonic with four inputs as, 41, 42, and four outputs 20, 21, 22, 23 shown below; each box in the figure below represents an instantiation of Sort2. Further, the inputs and outputs of the instantiations are located as in the figure above, namely, input to the top of the box is s, top input to the side is a, bottom output is y and so on. Po P₂ (c) Try out the following values for imput (₁, ₂.s) on the module Bitonic. Determine the outputs and try to guess what module Bitonic does. Values of A to try out: (1,0,1,0), (0,1,0,0), (1,1,0,1), (1,1,1,0)
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Where is part c?

Solution
Bartleby Expert
SEE SOLUTION
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY