Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16858 Discussions

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

AAlam16
Beginner
666 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
597 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.

0 Kudos
KhaiChein_Y_Intel
597 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_list_sys_vlog_d1627e211.htm

 

Thanks.

Best regards,

KhaiY

 

0 Kudos
Reply