0

First of all, there is another question with the same title here. However, it did not help me. I tried every solution but still I'm getting the same error.

Here is my module :

module RGB( input logic clk,
            output logic OE, 
            output logic SH_CP,
            output logic ST_CP,
            output logic reset,
            output logic DS,
            output logic KATOT );

Here is my logics :

logic [23:0]message;
logic [7:0] red;
logic [7:0] green;
logic [7:0] blue;

assign red = message[23:16];
assign green = message[15:8];
assign blue = message[7:0];

logic f;
logic e;

logic [7:0]counter;
int i = 1;
int a = 0;
int d = 0;

Last but not least, here is the part where I'm getting this error:

always@(*)
begin
    if( i > 3 & i < 28)
    begin
        DS <= message[i-3:i-3];  // Here is the error line 81
    end
    else
    begin
        DS <= 1'b0;
    end
end

Thanks a lot guys, have a nice day

Community
  • 1
  • 1
Ahmet Batu Orhan
  • 118
  • 2
  • 14

1 Answers1

1

The problem is the range in this expression

    DS <= message[i-3:i-3];

I think you meant

    DS <= message[i-3];

BTW, always show the exact error message and the exact line that is referring to.

dave_59
  • 39,096
  • 3
  • 24
  • 63