Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
15481 Discussions

how can I write a code with an input or an output of type double or float??

AAlam16
Beginner
180 Views

I am using Quartus II software, Cyclone II, FBGA.. EP2C35F672C6... And using Verilog language (Verilog HDL)

0 Kudos
2 Replies
ak6dn
Valued Contributor III
111 Views

Verilog language does not support such datatypes for synthesis. Use need to use a 16, 24, 32, 64 bit wire / register as a port that you pass the encoded floating value thru.

 

If you are just writing verilog (like for a testbench) you can use the real datatype which will pass floating point numbers thru ports. No synthesis, however.

KhaiChein_Y_Intel
111 Views

Hi,

 

You cannot use float in Verilog, you may define x number of bits for the supported data types. There are 2 data types in Verilog - net and variable data types.

The nets represent the physical connection between structural entities and do not store any value on its own. The variables are used in procedural blocks which can hold value. You may refer to Data Types support list in https://www.intel.com/content/www/us/en/programmable/quartushelp/current/index.htm#hdl/vlog/vlog_lis...

 

Thanks.

Best regards,

KhaiY

 

Reply