Hi,
is it possible to run single "thread" at full 400 MIPS speed on some core? I'll see from MIPS chart that four thread gets 100 mips each and so on, could these join to calculate single code without threading? And sorry about my bad english ;)
Single thread at high speed?
-
- Member
- Posts: 11
- Joined: Thu Dec 10, 2009 10:16 pm
- Location: Finland
-
- Respected Member
- Posts: 363
- Joined: Thu Dec 10, 2009 10:17 pm
Nope sadly you cant do that. You need to use threads to get all the MIPS.
You will get used to using threads once you work with it a while.
You will get used to using threads once you work with it a while.
-
- Member
- Posts: 11
- Joined: Thu Dec 10, 2009 10:16 pm
- Location: Finland
Another question. I've modified VGA 8bpp code and want to do some maths to render graphics. I can't find solution to use sin, cos etc. operands inside XC file. Even including math includes.
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
XC does not support floating point types.
Do your float maths in C functions called from XC. Or have your main program in C making calls to XC functions to do the output.
You will have to cast to/from floats appropriately. But that has to happen to get onto the display anyway.
Alternatively, harder, find away to do what you want using fixed point arithmetic.
Do your float maths in C functions called from XC. Or have your main program in C making calls to XC functions to do the output.
You will have to cast to/from floats appropriately. But that has to happen to get onto the display anyway.
Alternatively, harder, find away to do what you want using fixed point arithmetic.
-
- Member
- Posts: 11
- Joined: Thu Dec 10, 2009 10:16 pm
- Location: Finland
Thanks, just found that myself from "Programming XC" PDF. Now have to learn how those calls must be done between XC and C. These things are just amazing, learning new things all the time :)Heater wrote:XC does not support floating point types.
Do your float maths in C functions called from XC. Or have your main program in C making calls to XC functions to do the output.
You will have to cast to/from floats appropriately. But that has to happen to get onto the display anyway.
Alternatively, harder, find away to do what you want using fixed point arithmetic.
-
- Respected Member
- Posts: 296
- Joined: Thu Dec 10, 2009 10:33 pm
Normal calling from C to XC and vice-versa should be no problem as long as you don't use the unsupported XC types and pointers of course.
By the way, I just discovered that you can pass things like XC chanend and such into C and pass them back from C to XC. Have a look in compat.h
Very useful when you need your C code to input/output data on a channel at some point. Just pass the chanend in to C and have it pass that back to an XC function when it needs to do I/O.
By the way, I just discovered that you can pass things like XC chanend and such into C and pass them back from C to XC. Have a look in compat.h
Very useful when you need your C code to input/output data on a channel at some point. Just pass the chanend in to C and have it pass that back to an XC function when it needs to do I/O.
-
- XCore Addict
- Posts: 133
- Joined: Tue Dec 15, 2009 10:23 pm
Fixed point is the way to go, particularly if you need performance. VDP-2 uses a single sine table with an extra 90 degrees worth of data tacked on the end to save space.
-Yvo
-Yvo