TinyMicro ALU X67117


Statement
 

pdf   zip   verilog

html

Design the ALU of the TinyMicro. The ALU has two operands, a and b, and one result c. The operation of the ALU is determined by the 2-bit control signals Op as follows:

  • Op=00, c=a+b.
  • Op=01, c=ab.
  • Op=10, c=ba.
  • Op=11, c=a.

Design a parametrized N-bit ALU with a default value of N=8.

Specification

module ALU(a, b, Op, c); parameter N=8; input [N-1:0] a, b; input [1:0] Op; output [N-1:0] c;

Input

  • a and b are the two input operands.
  • Op indicates the type of operation.

Output

  • c is the result of the operation.
Information
Author
Jordi Cortadella
Language
English
Official solutions
Unknown.
User solutions
Verilog