• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Functional Verification
  3. case () inside gives errors with ncvlog

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 66
  • Views 19546
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

case () inside gives errors with ncvlog

mkamal
mkamal over 11 years ago

Hi,
The following code gives an error with ncverilog. Can any one figure out why ? (version 12.2)

case (ratio) inside
	     [990 : 1010] :  mon_txn.bit_rate_captured  = 3'b000;
	     [390 :410]   :  mon_txn.bit_rate_captured  = 3'b001;
	     [190 :210]   :  mon_txn.bit_rate_captured  = 3'b010;
	     [90 : 110]   :  mon_txn.bit_rate_captured  = 3'b011;
	     [35 : 45]    :  mon_txn.bit_rate_captured  = 3'b100;
	     [16 : 24]    :  mon_txn.bit_rate_captured  = 3'b101;
	     [8 : 12]     :  mon_txn.bit_rate_captured  = 3'b110;	     
endcase
 

(1)case (ratio) inside
ncvlog: *E,ILLPRI: illegal expression primary [4.2(IEEE)]
(2) [990 : 1010] : mon_txn.bit_rate_captured = 3'b000;
|
ncvlog: *E,NOTSTT : expecting a statement [9(IEEE)]
(3) [390 :410] : mon_txn.bit_rate_captured = 3'b001;
|
ncvlog: *E,ILLPRI : illegal expression primary [4.2(IEEE)].
(4) [390 :410] : mon_txn.bit_rate_captured = 3'b001;
|
ncvlog: *E,NOTSTT : expecting a statement [9(IEEE)].
and so on  
  • Cancel
  • Tudor Timi
    Tudor Timi over 11 years ago
    Seems that 'case (...) inside' is a SystemVerilog 2012 construct (I don't have an SV 2009 standard to compare). It's working starting with version 13.10. If you can't migrate, you'll have to rewrite your code.
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • Shalom B
    Shalom B over 11 years ago

    It is in SV-2009 also.

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information