Re: Examples of issues with std_logic_arith

Discussion in 'VHDL' started by Mark McDougall, Mar 27, 2009.

  1. Sean Durkin wrote:

    > But I've never seen actual examples or
    > heard of a problems arising from use of std_logic_arith.


    IIUC, it's the same argument one can use for or against _any_ standard
    programming library.

    Using any non-ratified standard library, you run the risk of everything
    you mentioned. The bottom line - it's less portable. And whilst I can
    envisage plenty of future maintainers of your code converting from a
    non-standard library to a standard library, I can't imagine many (worth
    their salt) converting the other way around (even if they personally
    prefer the non-standard library, they should get their bum well and truly
    kicked for actually changing already-compliant code).

    Having said that, the commercial reality (IMHO) is that your code will be
    used in a handful (if not just one) of projects, same vendor, same tools,
    and if it works for you now, it'll probably continue to do so long after
    your legacy is completely forgotten.

    Regards,

    --
    Mark McDougall, Engineer
    Virtual Logic Pty Ltd, <http://www.vl.com.au>
    21-25 King St, Rockdale, 2216
    Ph: +612-9599-3255 Fax: +612-9599-3266
    Mark McDougall, Mar 27, 2009
    #1
    1. Advertising

  2. Mark McDougall wrote:

    > (even if they personally
    > prefer the non-standard library, they should get their bum well and truly
    > kicked for actually changing already-compliant code).


    Further on this note...

    I come from a software engineering background, and have worked on a whole
    host of systems ranging from embedded micro through PC platform up to even
    mainframe. One thing I've learned "when in Rome..."

    There was a contract I worked on a while back where I was provided with a
    copy of the company's "C coding standards". Trouble was, I was adapting
    existing code (from Microsoft IIRC) for their purpose, and attempting to
    adhere to their standards would've made an absolute mess of the source
    code. I advised them that I was happy to follow their standards for any
    "external code", but any modifications/additions to the Microsoft code
    were going to be consistent with the Microsoft coding style. They agreed
    to that much at least.

    I admit that traditionally I've been using std_logic_arith myself - only
    because I cut my teeth on it before I "knew any better". Lately I've made
    a more concerted effort, and am slowly converting my code base to use
    numeric_std whenever I need to make modifications to a file.

    Regards,

    --
    Mark McDougall, Engineer
    Virtual Logic Pty Ltd, <http://www.vl.com.au>
    21-25 King St, Rockdale, 2216
    Ph: +612-9599-3255 Fax: +612-9599-3266
    Mark McDougall, Mar 27, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin Thompson
    Replies:
    0
    Views:
    532
    Martin Thompson
    Mar 27, 2009
  2. Tricky
    Replies:
    0
    Views:
    408
    Tricky
    Mar 27, 2009
  3. Jacko
    Replies:
    6
    Views:
    708
    Mike Treseler
    Mar 30, 2009
  4. Sean Durkin
    Replies:
    0
    Views:
    422
    Sean Durkin
    Mar 27, 2009
  5. Mike Treseler
    Replies:
    0
    Views:
    433
    Mike Treseler
    Mar 27, 2009
Loading...

Share This Page