Forum Discussion
AAlam16
New Contributor
6 years agohow 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)
ak6dn
Regular Contributor
6 years agoVerilog 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.