• 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. Logic Design
  3. Passing Defines during read_hdl

Stats

  • Locked Locked
  • Replies 2
  • Subscribers 61
  • Views 14738
  • 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

Passing Defines during read_hdl

archive
archive over 18 years ago

I'm looking to see how to pass defines during the read_hdl RC command.  Below is an example.  I've tried many variations but just can't seem to get it working.

read_hdl -sv -define {tpd} -top genmemory_mp {../../common/rtl/csco_routines.v   ../rtl/genmemory_mp.v}


Originally posted in cdnusers.org by bryan
  • Cancel
  • archive
    archive over 18 years ago

    Hi Bryan,

    tried something similar and it worked as expected. I wonder if it is something in the RTL or maybe try without the -top option. I did a man on read_hdl and it seems to indicate that -top is related with structural netlists. Since you have an `ifdef I am assuming it is not structural although not necessarily the case. I usually read_hdl everything and specify the top on the elaborate command but RC seems to do a pretty good job figuring it out by itself anyhow. Here is my short example if you find it useful:


    module define_hdl (
    input wire in, clk,
    output wire out
    );

    reg pipe0;

    `ifdef use_neg_edge
    always @(negedge clk) begin
    pipe0 <= in;
    end // always @ (negedge clk)
    `else
    always @(posedge clk) begin
    pipe0 <= in;
    end // always @ (posedge clk)
    `endif

    assign out = pipe0;

    endmodule // define_hdl

    good luck,
    gh-


    Originally posted in cdnusers.org by grasshopper
    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
  • archive
    archive over 18 years ago

    Well, I tried the exact same command today and it works. Not sure what was going on but none the less, problem resolved.


    Originally posted in cdnusers.org by bryan
    • 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