Write a "first draft" of the verilog module

500 pts ended

Include your Verilog le for the eight-bit wide 2-to-1 multiplexer in your project. Use switch SW17 on the DE2 board as the s input, switches SW7??0 as the X input and SW15??8 as the Y input. Connect the SW switches to the red lights LEDR and connect the output M to the green lights LEDG7??0.

Figure 1a shows a sum-of-products circuit that implements a 2-to-1 multiplexer with a

select input s. If s = 0 the multiplexers output m is equal to the input x, and if s = 1 the

output is equal to y. Part b of the gure gives a truth table for this multiplexer, and part

c shows its circuit symbol.

The multiplexer can be described by the following Verilog statement:

as s ign m = (~ s & x ) j ( s & y ) ; }


one shown above to describe the circuit given in Figure 2a. This circuit has two eight-bit

inputs, X and Y , and produces the eight-bit output M. If s = 0 then M = X, while if

s = 1 then M = Y . We refer to this circuit as an eight-bit wide 2-to-1 multiplexer. It has

the circuit symbol shown in Figure 2b, in which X, Y , and M are depicted as eight-bit

wires. Perform the steps shown below.

Answers (1)

  • SakshiSharma007
    Rating:4 stars

    View this solution... try Chegg Study


    Start Your Free Trial