Sign in

username:

password:



Not a member?

Search rabbit-semi



Search tips

Subscribe to rabbit-semi



Ads

Discussion Groups

See Also

DSPFPGAElectronics

Discussion Groups | Rabbit-Semi | Far pointer support on DC9.25?

This is a group for folks designing and programming embedded systems using the Rabbit Semiconductor C-programmable microcontroller. Rabbit Semi is a spin-off from Z-World who makes a variety of embedded modules and tools. This group is not affiliated with either Rabbit or Z-World, but is a user forum for sharing ideas, asking questions, flaunting knowledge, and other typical user group stuff. The Rabbit is a powerful uC, supported by a full-featured C-compiler.

Far pointer support on DC9.25? - dhan...@solus.co.in - Jun 25 8:22:11 2009

Hi to all
I am developing a code which needs far pointer. But the manual says that RCM4000 and later version only supports far pointers. I am using root2xmem and xmem2root functions to get xalloc.

I made a structure for 12 bytes


typedef struct
{
unsigned long rightchild;
unsigned long data;
unsigned long leftchild;
}btreenode;


and using unsigned long *p i store address of host every time. and updating the pointers using binary tree.


*p = _xalloc(&Node_size, 0, XALLOC_ANY);
node.left = node.right = 0;
node.dat = value;

root2xmem( *p, &node, sizeof(node));

What i am trying to do with this is, When i add a user detail i am searching them in the xmem to be sure that my entering data is not exist. so after conformed this i am sortingthem using binary tree.

Though my value is a unsigned long variable which holds 4 byte data always. Hence 1 record holds 12 bytes in the memory i.e left pointer is 4 bytes , data is 4 bytes and right pointer is 4 bytes. i need to store 15000 records minimum. Since I have 512k RAM and 512k SF but i have some reserve space in RAM for some other purpose. RCM3720.

So my DC 9.25 doesnt support far pointer . RCM4000 onwards they have given this option. It would be great full if we have far pointer for my 3700.

Here binary tree makes my each record size as 12 bytes. So i am looking for some other alternatives to reduce my each record size. So help me on this.
------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )


Re: Far pointer support on DC9.25? - Scott Henion - Jun 25 12:06:15 2009

d...@solus.co.in wrote:
> Hi to all
> I am developing a code which needs far pointer. But the manual says that RCM4000 and later version only supports far pointers. I am using root2xmem and xmem2root functions to get xalloc.
>
> I made a structure for 12 bytes
>
 typedef struct
> {
> unsigned long rightchild;
> unsigned long data;
> unsigned long leftchild;
> }btreenode;
>
and using unsigned long *p i store address of host every time. and updating the pointers using binary tree.
>
 	  *p = _xalloc(&Node_size, 0, XALLOC_ANY);
> node.left = node.right = 0;
> node.dat = value;
>
> root2xmem( *p, &node, sizeof(node));
>

> What i am trying to do with this is, When i add a user detail i am searching them in the xmem to be sure that my entering data is not exist. so after conformed this i am sortingthem using binary tree.
>
> Though my value is a unsigned long variable which holds 4 byte data always. Hence 1 record holds 12 bytes in the memory i.e left pointer is 4 bytes , data is 4 bytes and right pointer is 4 bytes. i need to store 15000 records minimum. Since I have 512k RAM and 512k SF but i have some reserve space in RAM for some other purpose. RCM3720.
>
> So my DC 9.25 doesnt support far pointer . RCM4000 onwards they have given this option. It would be great full if we have far pointer for my 3700.
>
> Here binary tree makes my each record size as 12 bytes. So i am looking for some other alternatives to reduce my each record size. So help me on this.
>

You could always use the Softools compiler; it supports far pointers on
the 2k and 3k processors. Although DC has non-ANSI features (costates,
rabbitweb) that do not port easily.

If you store the nodes as an array, you could use an short array index
to store the right/leftchild. Would reduce the node to 8 bytes.

--
------------------------------------------
| Scott G. Henion| s...@shdesigns.org |
| Consultant | Stone Mountain, GA |
| SHDesigns http://www.shdesigns.org |
------------------------------------------

today's fortune
hacker, n.:
Originally, any person with a knack for coercing stubborn inanimate
things; hence, a person with a happy knack, later contracted by the
mythical philosopher Frisbee Frobenius to the common usage, 'hack'.
In olden times, upon completion of some particularly atrocious body
of coding that happened to work well, culpable programmers would gather
in a small circle around a first edition of Knuth's Best Volume I by
candlelight, and proceed to get very drunk while sporadically rending
the following ditty:

Hacker's Fight Song

He's a Hack! He's a Hack!
He's a guy with the happy knack!
Never bungles, never shirks,
Always gets his stuff to work!

All take a drink (important!)

------------------------------------

______________________________
controlSUITE™ software. Comprehensive. Intuitive. Optimized.
Real-world software for real-time control. Details Here!



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Far pointer support on DC9.25? - Dhanaraj S - Jun 26 8:12:37 2009



-----------------------------------------------
Solus Software & Systems Pvt Ltd, Mumbai, India


(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )

Re: Far pointer support on DC9.25? - Robert Richter - Jun 26 15:04:49 2009

--- In r...@yahoogroups.com, Dhanaraj S (Solus) wrote:
>
> Thanks for your reply.
>
> So are you saying that can i use far pointer for my RCM3720 also if i
> upgrade my DC to >9.25 versions?

DC 10.xx only works on the new Rabbit CPU's; it won't give you support for far pointers in a '3720.

------------------------------------



(You need to be a member of rabbit-semi -- send a blank email to rabbit-semi-subscribe@yahoogroups.com )