-----Original 
  Message-----
From: owner-openrisc@opencores.org 
  [mailto:owner-openrisc@opencores.org] 
  On Behalf Of Damjan 
  Lampret
Sent: 
  Tuesday, February 25, 
  2003 5:03 
  AM
To: openrisc@opencores.org
Subject: Re: [openrisc] PIC 
  documentation
   
  
  
  
  before we make a rush decision let 
  see what are some other options.
 
  
  
  How about clearing pending 
  interrupts in PICSR by reading PICSR register. This would constitute an atomic 
  interrupt read/clear operation. You get pending interrupts and ack them by 
  single PICSR read operation. Any current software would have to be modified if 
  it doesn't store PICSR status already and therefore this could mean that 
  current software wouldn't have to be modified and there would be no two 
  version of the software in the future.
 
   
   
   
  One problem I can 
  imagine with this solution is that reading the PICSR clears *all* pending interrupts, not just the one 
  that originally triggered the dispatch to the interrupt service routine 
  (ISR).  That means that the ISR that reads the PICSR will need to service 
  all pending interrupts (or somehow post them to the OS for deferred 
  servicing).  Whether or not your proposed change to the PIC would cause 
  lack of forward-compatibility in SW seems somewhat dependent on how ISRs are 
  implemented.  I would hazard that some ISRs exist that service only a 
  single interrupt, then resume program execution, possibly to be interrupted 
  immediately again.  (Actually it’s not much of a guess; I have written 
  such code for the OpenRISC port of eCos myself.)
   
  -Scott