Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 Discussions

10.1 breaks NIOS II floating point hardware custom instruction when using VHDL

Altera_Forum
Honored Contributor II
1,640 Views

When I compiled my existing VHDL-based system (which compiled fine in 10.0sp1 and which has a NIOS2 CPU with floating point custom instructions added) with Quartus 10.1, I got the following error: 

 

Error (10258): Verilog HDL error at fpoint_wrapper.v(27): unsupported type for verilog parameter useDivider 

 

The fpoint_wrapper.v (in \altera\10.1\ip\altera\nios2_ip\altera_nios_custom_instr_floating_point_qsys) defines useDivider as: 

parameter useDivider = 0; 

 

In fpoint_cpu_0.vhd (which is generated by SOPC) the component is declated as: 

component fpoint_wrapper is 

generic ( 

useDivider : boolean := false 

); 

 

Help (F1) for error 10258 shows a case exactly like this, where a boolean type is incorrectly given to a verilog module as a parameter. And the recommended action is "Do not pass unsupported value types to Verilog." 

 

The problem is probably coming from fpoint_qsys_hw.tcl, which declares the useDivider parameter's type as BOOLEAN, so SOPC will generate the correct VHDL code for fpoint_wrapper. But Quartus does not seem to be able to pass that boolean parameter to Verilog module ... 

 

Altera recommended to switch to Verilog or wait for a patch! 

 

Since switching to Verilog is obviously not an option to me, I tried making my own fix ... 

 

I changed the following two lines in fpoint_qsys_hw.tcl (in \altera\10.1\ip\altera\nios2_ip\altera_nios_custom_instr_floating_point_qsys) 

 

add_parameter useDivider BOOLEAN false "" 

... 

set_parameter_property useDivider TYPE BOOLEAN 

 

to 

 

add_parameter useDivider INTEGER 0 "" 

... 

set_parameter_property useDivider TYPE INTEGER 

 

Now the system compiles. 

 

So if you use floating point hardware custom instruction in your NIOS II CPU and you use VHDL as you system language, you might need to try my fix ... 

 

Waiting for 10.1sp1 ... :mad: 

 

Jari
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
796 Views

Thanks for the heads up,and work-around...

0 Kudos
Altera_Forum
Honored Contributor II
796 Views

Thank you, for the work-around, because switching to verilog is not an option for me too.

0 Kudos
Altera_Forum
Honored Contributor II
796 Views

This bug has been fixed in 10.1sp1 (which already seems to be available in the Altera's Download area).

0 Kudos
Reply