Home > Community > Forums > Functional Verification Shared Code > Support floating point in e

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: *

 Support floating point in e 

Last post Tue, Oct 30 2007 6:12 AM by archive. 4 replies.
Started by archive 28 Apr 2006 03:00 PM. Topic has 4 replies and 6681 views
Page 1 of 1 (5 items)
Sort Posts:
  • Fri, Apr 28 2006 3:00 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    Support floating point in e Reply


    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
    • Post Points: 5
  • Fri, Mar 2 2007 10:45 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Support floating point in e Reply


    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
    • Post Points: 0
  • Fri, Mar 9 2007 4:55 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Support floating point in e Reply

    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
    • Post Points: 0
  • Thu, Sep 20 2007 2:21 PM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Support floating point in e Reply

    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
    • Post Points: 0
  • Tue, Oct 30 2007 6:12 AM

    • archive
    • Top 75 Contributor
    • Joined on Fri, Jul 4 2008
    • Posts 88
    • Points 4,930
    RE: Support floating point in e Reply

    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
    • Post Points: 5
Page 1 of 1 (5 items)
Sort Posts:
Started by archive at 28 Apr 2006 03:00 PM. Topic has 4 replies.