module try(input rst, clk, input [7:0] int_n);
reg [7:0] d1, d2, d3, d4, pend_n;
wire [7:0] pend_set;
always @(negedge rst or posedge clk)
begin
if (!rst)
begin
d1 <= 8'b11111111;
d2 <= 8'b11111111;
d3 <= 8'b11111111;
d4 <= 8'b11111111;
end
else
begin
d1 <= int_n;
d2 <= d1;
d3 <= d2;
d3 <= d3;
end
end
genvar i;
generate for (i=0; i<8; i=i+1)
begin: g_generate
assign pend_set = d4 & (~d3) & (~d2);
always @(negedge rst or posedge clk)
begin
if (!rst)
pend_n <= 1'b1;
else
begin
if (pend_set)
pend_n <= 1'b0;
end
end
end
endgenerate
endmodule
seem to compile with modelsim,
I did not complete wrotte your second process.