How will a synthesis tool respond to illegal port width declaration?

Status
Not open for further replies.

majestic.eda

Newbie level 6
Joined
Apr 15, 2010
Messages
12
Helped
2
Reputation
4
Reaction score
2
Trophy points
1,283
Location
India
Activity points
1,365
Hi all,

I have coded a parameterized module in verilog. In this module, one particular parameter configuration leads to an illegal port width which looks like this: reg [-1:0] my_data; and I was surprised to find that VCS didn't flag any error or warning for this. :shock: Functionally, the design is still working fine because in this particular configuration, signal my_data is left unconnected (is not connected anywhere in the module).

I doubt whether it will synthesize!! Any comment/help is welcome.. :smile:
 

It will synthesize since there is nothing wrong with the code. The port width is 2 bits.
Negative indexes are allowed and the ":" assumes nothing about the range direction, so the width will always be at least 1.
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…