- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
i am facing a problem in converting matlab code into nios ide. is there anyway to convert these code into C/C++ used in nios ide? My matlab code is regarding image processing. is there any reference for this part?thank you. regards, LiauLink Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You need to rewrite into C code your m-script code.
Did you use MATLAB functions like imfilter? In that case the work is harder, and it would be necessary to write this code in C. try using mcc -m 'your_file.m' in MATLAB- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Am fairly sure that the MATLAB compiler won't produce any code useable with NIOS. I'm a little out of date, I'll admit, but it used to just generate lots of calls to MATLAB library functions. Almost certainly not what you want. You would also need to have a MATLAB compiler license.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm afraid you have to re-write the code. :(
But don't worry, it's not so complicated... Cheers OD- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
--- Quote Start --- Hello, i am facing a problem in converting matlab code into nios ide. is there anyway to convert these code into C/C++ used in nios ide? My matlab code is regarding image processing. is there any reference for this part?thank you. regards, Liau --- Quote End --- There is no direct conversion. But there are ways which can lessen your burden: 1. Write a C code that can be used both in MATLAB and NIOS with some changes: For MATLAB, write a mex file and for NIOS, modify the C-code with NIOS specific constructs. A simple code may not reuire much change for NIOS but a complicated one would need complete restructuring. 2. Codes that need RTOS will have to be completely rewritten for NIOS and MATLAB. 3. Or you can write a code in MATLAB, use its Link to ModelSim feature to convert it to HDL and then use it as an HDL component in SOPC Builder.
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