Jump to content

Search the Community

Showing results for tags 'fixedpoint'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Accellera Systems Initiative
    • Information
    • Announcements
    • In the News
  • SystemC
    • SystemC Language
    • SystemC AMS (Analog/Mixed-Signal)
    • SystemC TLM (Transaction-level Modeling)
    • SystemC Verification (UVM-SystemC, SCV, CRAVE, FC4SC)
    • SystemC CCI (Configuration, Control & Inspection)
    • SystemC Datatypes
  • UVM (Universal Verification Methodology)
    • UVM (IEEE 1800.2) - Methodology and BCL Forum
    • UVM SystemVerilog Discussions
    • UVM Simulator Specific Issues
    • UVM Commercial Announcements
    • UVM (Pre-IEEE) Methodology and BCL Forum
  • Portable Stimulus
    • Portable Stimulus Discussion
    • Portable Stimulus 2.0 Public Review Feedback
  • IP Security
    • SA-EDI Standard Discussion
    • IP Security Assurance Whitepaper Discussion
  • IP-XACT
    • IP-XACT Discussion
  • SystemRDL
    • SystemRDL Discussion
  • IEEE 1735/IP Encryption
    • IEEE 1735/IP Encryption Discussion
  • Commercial Announcements
    • Announcements

Categories

  • SystemC
  • UVM
  • UCIS
  • IEEE 1735/IP Encryption

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation


Company

Found 2 results

  1. I receive an integer from an external API, that is actually a fixed point real value, disguised as int for transport compatibility. I need to convert the integer back into it's fixed point representation. I presume I can convert the int to sc_bv. Then, I would expect sc_fixed to have a constructor accepting a sc_bv, and specify the decimal point place through sc_fixed template. Looking through the source, It seem though that sc_fixed cannot be constructed from a sc_bv. The closest thing I see is the char* constructor (pass bits using sc_bv.to_string() ), but I'm pretty sure that converts a decimal string, not a binary string. In short, is there a simple enough way to convert the bits of an integer (in the form of sc_bv) into a real number (say, float) by specifying the fixed point location in the bit vector?
  2. Hi all, I am working with sc_fixed point types in systemc and i tried a small code with the usage of fixedpoint types. #define SC_INCLUDE_FX #include "systemc.h" #include <stdlib.h> //for srand() and rand() SC_MODULE(rand){ sc_out<sc_ufixed<8,8,SC_TRN,SC_SAT> > output; sc_ufixed<8,8,SC_TRN,SC_SAT> A; void process(){ while(true) { wait(19, SC_NS); A=rand() % 254 ; // range 0 to 253 output.write(A); } } SC_CTOR(rand) { SC_THREAD(process); } }; The above code is just a source module which provides the rand numbers in the fixed point format to the next module. But when i compile i am getting the syntax error as "sc_ufixed symbols could not be resolved" Even i defined locally the SC_INCLUDE_FX macro to work with the fixed point types. But i cant figure out what is the syntax problems while working with fixed point types. when i work the same with the integers, it works fine. Note: i am working in ubuntu 12.04 OS in eclipse C++ software. please help me to proceed with a solution
×
×
  • Create New...