8-to-1 Multiplexer
beginner · combinational · 50 XP
Sign in to write your solution, run it in the simulator and submit it for grading.
Sign in or create a free account →Problem
8-to-1 Multiplexer
8 data inputs `d[7:0]` (1-bit each), 3-bit select `s[2:0]`, 1-bit output `y`.
The select picks which input passes to the output — the same pattern as 4:1 MUX, extended to a 3-bit select.
| s | y |
|-----|------|
| 000 | d[0] |
| 001 | d[1] |
| 010 | d[2] |
| 011 | d[3] |
| 100 | d[4] |
| 101 | d[5] |
| 110 | d[6] |
| 111 | d[7] |
Use `case(s)` inside `always @(*)` with a `default` branch.
Constraints
- Use case inside always @(*) with 8 arms + default.
- Declare y as output reg.
Examples
Input: d=8'b10110100, s=3'b010
Output: y=1 (d[2])
Input: d=8'b10110100, s=3'b000
Output: y=0 (d[0])
Common questions
- What does the 8-to-1 Multiplexer problem ask you to build?
- 8-to-1 Multiplexer 8 data inputs `d[7:0]` (1-bit each), 3-bit select `s[2:0]`, 1-bit output `y`. The select picks which input passes to the output — the same pattern as 4:1 MUX, extended to a 3-bit select.
- What constraints does 8-to-1 Multiplexer have?
- Use case inside always @(*) with 8 arms + default.; Declare y as output reg.
- What is an example input and output for 8-to-1 Multiplexer?
- Input d=8'b10110100, s=3'b010 gives output y=1 (d[2]).
- Which Verilog concepts does 8-to-1 Multiplexer practise?
- combinational, case, mux, always.