hi i am getting a Cannot determine language of C:/Modeltech_pe_edu_10.3c/examples error when i try to compile this verilog code. It seems pretty simplistic to me. Am doing something wrong? Any suggestions would be helpful. I don't like Modelsim but were forced to use it. I'm curious if there is an issue with the settings or something.
This implements a basic ALU design using a case statement. Please help. I will try on Xilinx a little later to see if i can run it. Thank you!
`timescale 1ns / 1ps
module alu(result,operand0,operand1,control)
(
input [31:0] operand0,
input [31:0] operand1,
input [3:0] control,
output [31:0] result,
reg [31:0] result;
always @(control, operand0, operand1)
begin
case(control)
4'b0000: result = operand0 && operand1;
4'b0001: result = operand0 || operand1;
4'b0010: result = operand0 ^ operand1;
4'b0011: result = operand0 ~| operand1;
4'b0100: result = operand0 + operand1;
4'b0110: result = operand0 - operand1;
4'b1000: result = operand0 < operand1;
4'b1001: result = operand0 << operand1;
4'b1010: result = operand0 >> operand1;
4'b1011: result = operand0 >>> operand1;
endcase
end
endmodule