Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
10/20/06 16:35
Read: times


 
#126810 - bank switching mechanism (RFC)
Responding to: ???'s previous message
if you look at the code needed for bank switching then the 64k barrier is really a barrier.

Two quite different implementations:

for SDCC:
http://svn.sourceforge.net/viewvc/sd...iew=markup

for Keil:
L51_BANK.A51

usually bank switching code has to setup stuff first, then call a routine in common memory, switch, then call the code, then return to the common memory, switch again, then return to the caller.
(You'll of course be familiar with this)

Now if you do a new design you could avoid the need for the jump into the common memory altogether (and would have an overhead of only one instruction over non banked calls:) You'd need a (separate) return stack holding the calling bank though.

in an arbitrary bank:
    mov SFR_BANK_TO_SELECT_ON_NEXT_LCALL, #0x03; pushes target bank
                                ; on top of seperate stack
                                ; lock IRQ for 1 instruction?
                                ; (as if IRQ enable is touched?)
                                ; 
    lcall my_func_in_bank3      ; pushing address on stack and
                                ; current bank on a separate 
                                ; (32/64 byte deep) stack

then in bank3:
  my_func_in_bank3: 
    ...
    ret                         ; returns to address defined by
                                ; the two topmost entries of the 
                                ; normal stack and the bank stored on
                                ; the topmost entry of the
                                ; separate stack 


reading SFR_BANK_TO_SELECT_ON_NEXT_LCALL could give the calling bank and remove the topmost entry.

There must be a caveat somewhere, comments?

Greetings,

Frieder


List of 59 messages in thread
TopicAuthorDate
How much flash should an 8051 have?            01/01/70 00:00      
   enough            01/01/70 00:00      
      Code Flash VS Data Flash            01/01/70 00:00      
         hints            01/01/70 00:00      
            Max Clock Speed, Etc.            01/01/70 00:00      
               that\'s a cop-out            01/01/70 00:00      
                  Not a cop-out            01/01/70 00:00      
                     can you sell it for less than $1.41            01/01/70 00:00      
                        Replacement costs            01/01/70 00:00      
                           then please stop arguing one point from the perspe            01/01/70 00:00      
                              The replacement market            01/01/70 00:00      
                                 How will that help?            01/01/70 00:00      
                                    Flash Reliability            01/01/70 00:00      
                                       not really - look out            01/01/70 00:00      
                                          More on Flash Reliability            01/01/70 00:00      
                                             XRAM replacement            01/01/70 00:00      
                                                Write-While-Fetch            01/01/70 00:00      
                                    That does not appear to be the target.            01/01/70 00:00      
                                       6/12 Clock Mode and XDATA support            01/01/70 00:00      
                     Have you looked at the one-clockers?            01/01/70 00:00      
                        How do you propose to fit that in the instruction            01/01/70 00:00      
                           map registers            01/01/70 00:00      
               clock speed            01/01/70 00:00      
                  Not a bad idea ... that's what Dallas did!            01/01/70 00:00      
                     Clock Speed Reduction            01/01/70 00:00      
                        if you knew the chip            01/01/70 00:00      
                           actually, it does either speed up or slow-down            01/01/70 00:00      
                              Variable clock speed            01/01/70 00:00      
                                 clock vs power            01/01/70 00:00      
                                    SIngle clock power            01/01/70 00:00      
               when i did this            01/01/70 00:00      
                  0.35u process & 64K            01/01/70 00:00      
         Big Flash - coda and data!            01/01/70 00:00      
            Does Zylogic = Triscend?            01/01/70 00:00      
               Zylogic; Triscend            01/01/70 00:00      
            that should make it clear            01/01/70 00:00      
         Data Apps            01/01/70 00:00      
   bank switching mechanism (RFC)            01/01/70 00:00      
      Bank Switching            01/01/70 00:00      
         that's how it's done traditionally ...            01/01/70 00:00      
         Keil support            01/01/70 00:00      
      bank switching no0t needed            01/01/70 00:00      
         "bank switching no0t needed"            01/01/70 00:00      
            if you read it all            01/01/70 00:00      
               I'd even tend to believe...            01/01/70 00:00      
      No lock IRQ            01/01/70 00:00      
   Parkinson's Law...            01/01/70 00:00      
   The trouble with PLLs            01/01/70 00:00      
      nearly every ARM has a PLL            01/01/70 00:00      
   yeah i understand that            01/01/70 00:00      
      ethernet mac            01/01/70 00:00      
   Dougal was..            01/01/70 00:00      
      Sorry to hear about your misfortune            01/01/70 00:00      
   no not seriously            01/01/70 00:00      
      I don't think he hates you, Jez            01/01/70 00:00      
      That must be the most painful            01/01/70 00:00      
         it's not a killer, but you do notice it            01/01/70 00:00      
   well jasmine can ride him all day            01/01/70 00:00      
   Gives a new meaning to that old interview question            01/01/70 00:00      

Back to Subject List