on-internet
← Community

Illegal operand for constant expression

Stack Overflow ·

I'm trying to build a task, which must delve into some hierarchy, that can concisely compare different pins on a particular instance. In particular, I'd like to do something like the following: task check_expected; input integer pin; input [9:0] expected; integer i, j; reg [9:0] check; begin j = 0; for (i = 0; i < 20; i = i + 1) begin case (pin) 0: begin check[0] = test.inst[i].lane_0.PIN_FIRST; check[1] = test.inst[i].lane_1.PIN_FIRST; ... check[9] = test.inst[i].lane_9.PIN_FIRST; end 1: begin check[0] = test.inst[i].lane_0.PIN_SECOND; check[1] = test.inst[i].lane_1.PIN_SECOND; ... check[9] =

Comments

Sign in or sign up to comment and upvote.

No comments yet.