//
//
//
//-------------------------------------------------------------------------------
// FILENAME : alu.v
// DESCRIPTION : Component was generated by Alatek HDL Wizard
// Details :
// Arithmetic Logic Unit
// Width: 8
// Unit type - arith.
// All outputs are registered by CLK signal
// Clock (CLK ) signal is edge sensitive
// Clear (CLR ) is active : high
// Clear signal is asynchronous
// Clock enable (CE ) is active: high
// Carry in (CI ) active: high
// Carry out (CO ) active: high
// Overrflow (OV ) active: high
//
// CREATED : 2006-1-13, 14:24:8
// VERSION : 2.0
//-------------------------------------------------------------------------------
module alu (A ,B ,S ,CI ,CLK ,CLR ,CE ,CO ,OV ,Q );
input [7:0] A ;
input [7:0] B ;
input [2:0] S ;
input CI ;
input CLK ;
input CLR ;
input CE ;
output CO ;
output OV ;
output [7:0] Q ;
reg CO ;
reg OV ;
reg [7:0] Q ;
reg [7:0] RESULT2;
reg CO_OUT ;
reg OV_OUT ;
always @(posedge CLK or posedge CLR )
begin
if (CLR == 1'b1) begin
CO = 1'b0;
OV = 1'b0;
Q = 8'b00000000;
end else if (CE == 1'b1) begin
Q = RESULT2;
CO = CO_OUT ;
OV = OV_OUT ;
end
end