Define input and output variables


The following figure shows the logic symbol of ALU.
Operand A, operand B and result Y are 8-bit buses.
Control signal CB selects the operation of ALU.
The signal has at least 3-bit bus so that the ALU has 8 operations.

There are 4 types of flag, sign S, zero Z, overflow V and carry C. These flags are corded as 4-bit bus F.


Describe this part of Verilog code.


`timescale 1ns/1ps

module alu ( inputs and outputs variables  );
  input  ...
    ...
  output ...
    ...

endmodule


Next, define operation code .


| Back | CAD Home |