Hello guys I just wanted to ask how to debug this one in line 46 in says "Can not simplify operator DIV." in Verilog Module (Xilinx). Thank you in advance for the tip and help :))
Here's the code of my 8bit ALU
module alu_8fctn (a, b, opcode, rslt, rslt_mul);
input [3:0] a, b;
input [2:0] opcode;
output [3:0] rslt;
output [7:0] rslt_mul;
wire [3:0] a, b; //inputs are wire
wire [2:0] opcode;
reg [3:0] rslt; //outputs are reg
reg [7:0] rslt_mul;
//define operation codes
parameter add_op = 3'b000,
sub_op = 3'b001,
mul_op = 3'b010,
div_op = 3'b011,
and_op = 3'b100,
or_op = 3'b101,
xor_op = 3'b110,
xnor_op = 3'b111;
//perform the operations
always @(a or b or opcode)
begin
case (opcode)
add_op : rslt = a + b;
sub_op : rslt = a - b;
mul_op : rslt_mul = a * b;
div_op : rslt = a / b;
and_op : rslt = a & b;
or_op : rslt = a | b;
xor_op : rslt = a ^ b;
xnor_op: rslt = a ^~ b;
default: rslt = 8'b0000_0000;
endcase
end
endmodule