Shuffle X07222


Statement
 

pdf   zip   verilog

html

Design a shuffle circuit. It has two inputs (in1 and in2), two outputs (out1 and out2) and one control signal (swap). When swap=0, the inputs must be transferred to the outputs in the same order, i.e., out1=in1 and out2=in2. When swap=1, the inputs must be swapped, i.e., out1=in2 and out2=in1.

Specification

module shuffle(in1, in2, swap, out1, out2); input in1, in2, swap; output out1, out2;

Input

  • in1 and in2 are the inputs of the shuffle.
  • swap is the control signal.

Output

  • out1 and out2 are the outputs of the shuffle.
Information
Author
Jordi Cortadella
Language
English
Official solutions
Unknown.
User solutions
Verilog