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++

Hardware divide

Altera_Forum
Honored Contributor II
1,252 Views

Hei, 

 

I am using an nios2, Cyclone 2 developmentboard. I also used the reference design \niosII_cycloneII_2c35\full_featured. I Added hardware divide to that design in sopc. When I try to use hardware divide in nios2 ide when I am debugging on the developmentboard the divu instuktion doesn't work. Is that because the system is running to fast for the hardware divide? (85Mhz). 

 

Is there any possibility to turn on software divide in nios2 ide, so I don't ned to resynthese the hole system. ?
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
410 Views

 

--- Quote Start ---  

originally posted by doofus64@Apr 11 2006, 10:58 AM 

hei, 

 

i am using an nios2, cyclone 2 developmentboard. i also used the reference design \niosii_cycloneii_2c35\full_featured. i added hardware divide to that design in sopc. when i try to use hardware divide in nios2 ide when i am debugging on the developmentboard the divu instuktion doesn't work. is that because the system is running to fast for the hardware divide? (85mhz). 

 

is there any possibility to turn on software divide in nios2 ide, so i don't ned to resynthese the hole system. ? 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=14254) 

--- quote end ---  

 

--- Quote End ---  

 

 

Whether or not one design has speed issue can be confirmed by reading Timing Analyzer Tool. 

 

Turning on software divide in CPU configuration, basically any change ever done to SOPC system, recompilation is necessary.
0 Kudos
Altera_Forum
Honored Contributor II
410 Views

If you&#39;ve found a big in the DIVU instruction implementation in hardware, I&#39;d like to hear about it so I can fix it. Note that we haven&#39;t had any reports of 

this kind of failure and we do extensive directed and random testing of this instruction. 

 

If you really want to use software divide, there is no option in Nios II IDE to force software divide. What you need to do is somehow change the compiler options passed to gcc to say -mno-hw-div instead of -mhw-div. You can accomplish this by editing one of the generated makefiles in the system library directory but that can get overwritten. 

 

A safer method is just to use SOPC Builder to edit your PTF, turn off hardware divide in the Nios II wizard, but don&#39;t regenerate in SOPC Builder. Now the IDE will think there is no hardware divide and will use software divide. I haven&#39;t tried this but think it should work. Just make sure the correct command line option is being passed to gcc.
0 Kudos
Reply