• 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. Custom IC Design
  3. converting analog bit to signed decimal

Stats

  • Locked Locked
  • Replies 1
  • Subscribers 125
  • Views 10905
  • 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

converting analog bit to signed decimal

abdurrahman0234
abdurrahman0234 over 4 years ago

Hı, I have 3 bit analog bits. I want to convert it to sıgned decimal output except 3'b100. because I want to get 3'b100 as a 0100(convert '-4' to '4'). Can u help me verilogA code for converting, please

  • Cancel
  • Andrew Beckett
    Andrew Beckett over 4 years ago

    I would start by taking dac_8bit_ideal from ahdlLib, which you can add in your cds.lib by adding:

    DEFINE ahdlLib $(inst_root_with:tools/dfII/bin/virtuoso)/tools/dfII/samples/artist/ahdlLib

    You can simplify this down to 3 bits, and then have out_scaled being the unsigned value (I probably would make out_scaled being an integer rather than real). It is then a bit of simple maths to convert the values above 4 to be negative - for example:

    if(out_scaled>4) begin
      out_scaled=8-out_scaled
    end

    Andrew

    • 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