code banking

Hi,

I want to use code banking for my project on 8032 based microcontroller. I am using Keil uvision2. I want to know how efficient is code banking? I have to implement a tcp/ip stack on the microcontroller. So i cant afford inefficieny.

Reply to
mohun106
Loading thread data ...

Not Very. Each out of bank switch has overhead.

Reply to
Neil

Means if I use more banks i am in a trouble of slowing down the processing speed.

Reply to
koolvinci

In article , snipped-for-privacy@gmail.com writes

READ the Manual it is very well explained in that. Read the app notes on the Keil web site.

Which 8032 are you using and why?

Where are you getting the TCP/IP stack from?

How much of the TCP/IP suite are you going to implement?

What else do you want the chip to do.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/ chris@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris Hills

In article , koolvinci writes

It depends

what 8032 are you useing and at what clock speed?

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
/\/\/ chris@phaedsys.org      www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris Hills

The simple answer is not bad, but if you look at the compiler asm output from even a good compiler like Keil, you will be amazed at how much code is generated for even a simple C function. If you make no allowances and use structure and function pointers widely as part of your coding methodology, it's even worse.

The other thing to remember about banking is that it has limitations which can make the system design hard work for anything more than small applications / 1 or 2 banks worth of code. For example, const data defined in one bank is not visible to code in another because only one bank is visible in address space at once. This means that if you have an application that uses sets of large lookup tables overall > bank size, or access code which won't fit in the common area, the data must be split across banks, with stub access functions duplicated over the same banks as the data...

Chris

--
Greenfield Designs Ltd
-----------------------------------------------------------
Embedded Systems & Electronics: Research Design Development
Oxford. England. (44) 1865 750 681
Reply to
Chris Quayle

Years ago(1985) IAR had a C compiler for the 80C196 that had a banked switched memory model. You needed to supply the bank switching hardware. It was fast. Only about 3 or 4 instructions for the switch. And the same for the return.

It also let you arrange the code modules for packing into different banks and that too was no problem.

So check with IAR and see if they still support it. If so it's a great starting place.

Good Luck George

Reply to
GMM50

Maybe. The out of bank calls do it. Grouping functions in a module may improve performance. More banks may speed it up if it keeps you in a bank longer.

If you are that concerned about performance you may need a bigger CPU.

Reply to
Neil

8082 is not a 196 It need to maintain a 24 bit pointer with 8 bit instructions. the over head is easy to look up. There is a bank switch function the the user must complete. the overhead is there.
Reply to
Neil

With these boundary conditions, I'd consider changing the processor to something more powerful, e.g. an ARM. If the code exceeds the 16 bit addressing range of an 8051 family processor, the arithmetic capability of the processor for the needed addressing will be mariginal.

The design of the TCP/IP protocol stack is pretty well adjusted to a 32 bit processing architecture.

--

Tauno Voipio
tauno voipio (at) iki fi
Reply to
Tauno Voipio

Hi,

I have implemented a minimal tcp/ip stack in it. Yes as you said for something more powerful we can go for an ARM. Anyway I thought could try code banking with my current processor.

ok, now i have been trying this code banking for my project for few days. I got 6 hex files as output for 6 banks. I want to know if there is a way I can a single hex file. Or else do we have to program each one individually at the addresses specified.

--Mohan

Reply to
koolvinci

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.