Programmable Devices
CPLDs, FPGAs, SoC FPGAs, Configuration, and Transceivers
21323 Discussions

Wire assignment in verilog

Altera_Forum
Honored Contributor II
1,577 Views

Hi All, 

When going through a reference design i encountered a particular type of wire assignment as follows. 

 

data[92-:8]=a; 

 

what does this part[92-:8] mean? is it actually 92:84 ie 92:(92-8)? 

 

Thanks in advance
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
874 Views

You have it mostly correct, but it would actually be equivalent to data[92:85]. It means to include 8 bits total starting from data[92] and counting down. [92:84] would be 9 bits instead.

0 Kudos
Altera_Forum
Honored Contributor II
874 Views

 

--- Quote Start ---  

You have it mostly correct, but it would actually be equivalent to data[92:85]. It means to include 8 bits total starting from data[92] and counting down. [92:84] would be 9 bits instead. 

--- Quote End ---  

 

Thanks for confirming and making it clear
0 Kudos
Reply