- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe following is too easy or too small to give the name IP http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
Custom instruction that implements aprrox the same algorithm as the nios library for processors without dedicated multiplier. Some benchmarks I did with :int r;
volatile int* pr = &r; //prevent optimalisations
for (int a = -1000; a < 1000; a++)
for (int b = 1000; b >-1000; b--) //count backwards : prevent optimalisations
*pr = a*b;
1. Without cutom instruction : this takes about 22.4 seconds at 50Mc with the standard NiosII 2. With the custominstruction in the mulsi function : 4.3 seconds (without frame pointer stuff) The compiler made this : __mulsi3:
custom 13, r2, r4, r5
ret
3. With the custominstruction inlined (without the additinal function call and ret instruction) : 2.4 seconds. Unforunatly, I had to inline it inside the loop, I was not able to get the mulsi function inlined by the compiler. If someone has suggestions, let me know I think it is approx 280 LE's ( this was the difference when I added to an already existand custom instruction), maybe there is some extra overhead somewhere. See also top of the verilog file for info. Stefaan
- Tags:
- EMO_DIR
Link Copied
9 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Usefull for somebody? Any comments or improvements?
Stefaan- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Stefaan,
I’m interested in your code but until now I hadn’t enough time to evaluate it. Thanks for your work, niosIIuser- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
good boy !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
custom_mul.v can not download now?
Where can I to found it? Thanks!- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by chenm001@Jul 4 2006, 03:44 PM custom_mul.v can not download now?
where can i to found it?
thanks!
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16648)
--- quote end ---
--- Quote End --- It seems to be a problem with the forum, I can't also. Maybe some forum supervisor can? Stefaan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by svhb@Jul 5 2006, 02:29 AM it seems to be a problem with the forum, i can't also.
maybe some forum supervisor can?
stefaan
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16653)
--- quote end ---
--- Quote End --- Thanks! Can you send it to me with email(chenm003@163.com)? I'm interest for this small multipler, it is the smallest than my found.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It would be interesting to see how this holds up agains the Cyclone II embedded mult.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
how do i set a darn avatar on this board? ...i'll keep on traveling as always
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- originally posted by jdhar@Jul 5 2006, 08:49 PM it would be interesting to see how this holds up agains the cyclone ii embedded mult.
<div align='right'><{post_snapback}> (index.php?act=findpost&pid=16675)
--- quote end ---
--- Quote End --- It will show up rather slow. Never tried to beat internal multipliers.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page