comp.lang.ada
 help / color / mirror / Atom feed
* implementation approach
@ 2002-07-31  2:54 Mark
  2002-07-31 13:59 ` SteveD
  2002-08-01 19:18 ` Stephen Leake
  0 siblings, 2 replies; 3+ messages in thread
From: Mark @ 2002-07-31  2:54 UTC (permalink / raw)


I'm in a quandry here and could certainly use some help.  That said,
some background information.

I've got code spread across two processors.  We'll call processors A
and B respectively.  Of interest is a device I'm communicating with
(serial).  The code for communicating with said device resides on
processor A.
While communicating with the device during a 'certain' mode, the
communication is as follows:
 - I send a command.
 - Device sends an interrupt 
 - I synchronize with interrupt and send said command again 
 -- and so on ..

Trouble is.  The interrupt gets routed through and FPGA and 'goes'
through processor B.

On B i've got an interrupt handler .. "pragma Attach_Handler .."
that'll check if the interrupt happened.  When it does I could perhaps
set a flag, then pass the message via a Send_Message routine to
processor A and the routine for commanding the device on A will again
command device.

After 8 months of ADA I'm startign to catch on, however, my ADA is
still 'limited'.  In any event, I'm thinking a semaphore might might
be the most elegant approach or ... I'm open for ideas.
If semaphore could someone provide me with an example on how to do
this?

I suspect I'll need two semaphores on both processors.  Once the flag
gets passed from processor B to processor A, the routine in A will
enter the semaphore command the device, release the flag, etc.

Thanks in advance



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-01 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-31  2:54 implementation approach Mark
2002-07-31 13:59 ` SteveD
2002-08-01 19:18 ` Stephen Leake

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox