Home > Community > Forums > Logic Design > RC - read_hdl

Email

* Required Fields

Recipients email * (separate multiple addresses with commas)

Your name *

Your email *

Message *

Contact Us

* Required Fields
First Name *

Last Name *

Email *

Company / Institution *

Comments: *

 RC - read_hdl  

Last post Wed, Jul 31 2013 10:19 AM by Yemelya. 2 replies.
Started by Yemelya 31 Jul 2013 07:52 AM. Topic has 2 replies and 3982 views
Page 1 of 1 (3 items)
Sort Posts:
  • Wed, Jul 31 2013 7:52 AM

    • Yemelya
    • Top 150 Contributor
    • Joined on Wed, Feb 17 2010
    • Posts 60
    • Points 870
    RC - read_hdl Reply

    Hi Everyone,

    When reading verilog (read_hdl -sv), first file is common variable definitions (like `define and localparam). There is no problem loading this file, however when loading the actual RTL design it cannot recognize the mentioned above variables (Error - undeclared).

    If the same  variable definitions file added to RTL as `include it works, but there are too many RTL files and I have no permission to modify them.

    Any idea what could the issue with loading it by (read_hdl -sv)?

    Thanks a lot!

    Boris



    Filed under: , ,
    • Post Points: 20
  • Wed, Jul 31 2013 8:14 AM

    • grasshopper
    • Top 25 Contributor
    • Joined on Fri, Jul 18 2008
    • Chelmsford, MA
    • Posts 242
    • Points 3,205
    Re: RC - read_hdl Reply

     Hi Yemelya,

     silly question but are you sure you are honoring Verilog scoping rules? Also, note that 

     read_hdl { a.v b.v include.v }

    read_hdl c.v

    is different from

    read_hdl  { a.v b.v c.v include.v }

    since every read_hdl has its own scope hence c.v would not see the `defines of the other files and vice-versa

    Let us know what you discover.

    gh-

    • Post Points: 20
  • Wed, Jul 31 2013 10:19 AM

    • Yemelya
    • Top 150 Contributor
    • Joined on Wed, Feb 17 2010
    • Posts 60
    • Points 870
    Re: RC - read_hdl Reply

    Hi Grasshopper,

    Thanks a lot for your help. Actually script was reading all the files line by line with read_hdl for each one. I believed that if we define library it will resolve the scope visibility issue, but it didn't. 

    It works now, after I fixed it as you advised:

    read_hdl  { include.v a.v }
    read_hdl  { include.v b.v }
    read_hdl  { include.v c.v }

    Again, thank you very much for such a quick and useful response!

    -Yemelya



    • Post Points: 5
Page 1 of 1 (3 items)
Sort Posts:
Started by Yemelya at 31 Jul 2013 07:52 AM. Topic has 2 replies.