EDAToolsCafe
   >> Verilog Discussion Board
Thread views: 12743 View all threadsNext thread*

mrkeyse
(Stranger )
03/22/07 05:42 AM
Re: real numbers multiplier [re: ihabraad]Report this article as Inappropriate to us !!!Login to Reply

A coworker of mine was doing something similar to this and used $realtobits and $bitstoreal to get around the limitation on passing real numbers through the module interface.

$realtobits - Passes bit patterns across module ports; converts from a real number to the 64-bit representation (vector) of that real number.

$bitstoreal - The reverse of $realtobits; converts from the bit pattern to a real number.

Some examples of their use:

module driver (net_r);
output net_r;
real r;
wire [64:1] net_r = $realtobits(r);
endmodule

module receiver (net_r);
input net_r;
wire [64:1] net_r;
real r;
initial assign r =$bitstoreal(net_r);
endmodule

Hope this helps.





Entire thread
SubjectPosted byPosted on
*real numbers multiplier ihabraad   02/28/07 09:20 AM
.*Re: real numbers multiplier mrkeyse   03/22/07 05:42 AM
Jump to

 

DownStream: Solutions for Post Processing PCB Designs
Verific: SystemVerilog & VHDL Parsers



Internet Business Systems © 2016 Internet Business Systems, Inc.
595 Millich Dr., Suite 216, Campbell, CA 95008
+1 (408)-337-6870 — Contact Us, or visit our other sites:
AECCafe - Architectural Design and Engineering TechJobsCafe - Technical Jobs and Resumes GISCafe - Geographical Information Services  MCADCafe - Mechanical Design and Engineering ShareCG - Share Computer Graphic (CG) Animation, 3D Art and 3D Models
  Privacy Policy