• 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 Shared Code
  3. Support floating point in e

Stats

  • Locked Locked
  • Replies 4
  • Subscribers 39
  • Views 16247
  • 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

Support floating point in e

archive
archive over 19 years ago


This package include basic floating point support for e.  It consists of an e wrapper for c floating point library that needs to be compiled into Specman order to be used.  A makefile is provided to accomplish that.  This is useful for people who want to do operations with real numbers in e.


Originally posted in cdnusers.org by stellfox@cadence.com
vrst_snfp.zip
  • Cancel
  • archive
    archive over 18 years ago


    I'm getting segmentation faults when I try to use this package on a 64 bit platform (64 bit SUSE linux on x86-64). Have you observed this? It's pretty easy to create the seg fault case, here's some example code:

    <'
    import vrst_snfp;
    extend sys {
    run() is also {
    var fpfn : snfp_floating_point_function_s = new;
    fpfn.op1.set("0.0");
    fpfn.op2.set("0.1");
    fpfn.its_type= FADD;
    fpfn.do_fp();
    outf("%s",fpfn.res.to_str());
    };
    };
    '>

    The seg fault occurs on the outf, when Specman attempts to access the .res field of fpfn. Any help would be much appreciated!


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

    This package was created in 2002 when 64-bit machines were not available. It is a shareware, so you can not get R&D support for it. However in Specman 6.1 there is support for floating point numbers (new data type real). The release is scheduled for mid-April, but if you are interested you can try out the beta release. For details, please get directly in touch with me (hannes@cadence.com)

    Regards,
    -hannes


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

    However in Specman 6.1 there is support for floating point numbers (new data type real). The release is scheduled for mid-April, but if you are interested you can try out the beta release. For details, please get directly in touch with me (hannes@cadence.com)



    I'm running 6.1.1, the manuals don't support [b]real [/b] but I tested it and it works!

    <'
    extend sys{

    foo : int;
    keep foo == 10101;
    bar : int;
    keep bar == 99;

    !foobar : real;

    run() is also {
    outf("foo %d/bar %d = %f\n", foo, bar, foo/bar);
    foobar = foo/bar;
    outf("foo %d/bar %d = %f\n", foo, bar, foobar);
    };
    };

    '>


    Running the test ...
    foo 10101/bar 99 = 102.000000
    foo 10101/bar 99 = 102.030303


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

    I've written a small macro which implements coverage for the real data type. You can look at the example and have a look in the doc directory for details. Note that coverage of real type will be supported natively in SPMN6.2, however it does not support cross and transition coverage, which is supported by this macro.

    -hannes


    Originally posted in cdnusers.org by hannes
    cdn_snams_util.tar.gz
    • 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