Syntax error verilog defining module iverilog

I’m getting a syntax error at 11 line Full adder using xor and mux2x1 module xormux(x1, x2, x3, y1, y2); input x1, x2, x3; output y1, y2; wire w1, w2; xor gate1(w1, x1, x2); xor gate2(y1, w1, x3); mux2x1 gate3(y2, w1, x3, x2); endmodule module xor(output o, input i1, i2); assign o = i1 ^… Read More Syntax error verilog defining module iverilog

main.v:22: error: genvar is missing for generate "loop" variable 'j'

I have the following Verilog code for a multiplier using a carry look ahead adder. When I run that code, I get two errors. My code: `timescale 1ns/1ps `define DELAY 10 module cpu_wb_cla_multiplier (multicand, multiplier, product); parameter MULTICAND_WID = 32; parameter MULTIPLIER_WID = 32; input [MULTICAND_WID-1:0] multicand; input [MULTIPLIER_WID-1:0] multiplier; output [(MULTICAND_WID + MULTIPLIER_WID -… Read More main.v:22: error: genvar is missing for generate "loop" variable 'j'

I can't fill with 0 a reg array in verilog with a for loop in an always block

The error I get for the code below is: Procedural assignment to a non-register j is not permitted, left-hand side should be reg/integer/time/genvar. When I do W_E[0] = 0, W_E[1] = 0 etc, I don’t get any error. genvar j; reg W_E [31:0]; always @(*)begin // Wrting Data to a specific register for (j =… Read More I can't fill with 0 a reg array in verilog with a for loop in an always block