cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
215 Views
Registered: ‎09-10-2019

Case range: Syntax error near "[". Vivado 2019.1

Jump to solution

That code gives Syntax error near "[".

 

 

        case(subcnt)
          0:begin
            states <= AA;
          end
          [1:4]:begin
            states <= CC;
          end
        endcase

 

 

 

https://www.xilinx.com/support/answers/64777.html

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
194 Views
Registered: ‎12-04-2019

Re: Case range: Syntax error near "[". Vivado 2019.1

Jump to solution

Hi @alexis_jp ,

I suspect you are missing inside keyword after the case(subcnt), without inside keyword Vivado shows an error on the line you mentioned.

Try adding inside keyword after the case statement and check if it helps.

 

Regards,

Ansari Hunen

View solution in original post

0 Kudos
1 Reply
Highlighted
Xilinx Employee
Xilinx Employee
195 Views
Registered: ‎12-04-2019

Re: Case range: Syntax error near "[". Vivado 2019.1

Jump to solution

Hi @alexis_jp ,

I suspect you are missing inside keyword after the case(subcnt), without inside keyword Vivado shows an error on the line you mentioned.

Try adding inside keyword after the case statement and check if it helps.

 

Regards,

Ansari Hunen

View solution in original post

0 Kudos