Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AAlam16
Beginner
124 Views

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

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

0 Kudos
2 Replies
ak6dn
Valued Contributor II
54 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.

54 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