Forum Discussion
Altera_Forum
Honored Contributor
21 years agoinlined __mulsi3 ?
Hello, Anyone nows how I can get an inlined call to __mulsi3 in my project? I want to use a custom multiplier, and I can get it into the executable (overriding the library version). the pr...
Altera_Forum
Honored Contributor
21 years agoHi,
I have a custom instruction that is roughly doing the same thing as the library mulsi, just adding and shifting. It is not a single cycle mutliplier, but it takes much less cycles as the software version. It is posted already al long time ago in the "Post your own IP" section. I just want to know if it is possible to have a "custom ..." assembler statement in the code instead of the call to __mulsi3. I tried with inline __mulsi3 but then it is using the library version. If I not inline it, it is using my custom __mulsi3 implementation. Like it is now the __mulsi3 does just the custom instruction and a return. But this is an overhead for doing nothing. I think recompiling libraries and so is a bit over the top of the experience I have at the moment. But I want to try if someone gives me some good starting points. Can you tell me how much cycles the Logic element version of the multiplier takes in a Cyclone? And maybe also how big it is (otherwise I can compile it if I have some time). Stefaan.