[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference 49.910::kav30

Title:VAX on VMEbus: KAV30
Notice:Could have been as fast as 68K but its a VAX!
Moderator:CSSVMS::KAV30_SUPP
Created:Thu Apr 18 1991
Last Modified:Fri Aug 02 1996
Last Successful Update:Fri Jun 06 1997
Number of topics:159
Total number of notes:645

65.0. "semaphore between board" by TRN01::SICUREZZA () Wed Sep 16 1992 20:35

    Hi,
    
    I whould like some more information about SMP.
    
    We need to share a lot of data between a KAV30 and a Motorola based
    board connected to the same VME bus. To do this we are thinking to map 
    local KAV30 memory on the VME
    bus so that this memory can be accessed by the Motorola board. So doing
    what we need is a semaphore between the two boards in order to
    synchronize access to the data.
    
    In note 36.11 I read that only the ADAWI instruction may be used on I/O
    space and this is not suitable to realize something like a semaphore.
    With this limit we cannot use test and set (BBSSI) intruction on 
    motorola memory.
    
    What happen if I share memory on KAV30 instead of memory on motorola
    board ?
    May we use BBSSI intruction on local memory that has been made visible
    to the VME bus through the KAV$INMAP system service ?
    May we use motorola test and set intruction on KAV30 memory ?.
    
    I hope there is one way to do this because if we cannot implement at
    all semaphores between board we cannot really share data. We only can
    implement message passing using FIFO or location monitor or interrupt
    line, but the best solution for our application is to share data using
    semaphore.
    
    Thanks in advance,
    Regards,				Marco
T.RTitleUserPersonal
Name
DateLines
65.1Some answers....BAYERN::WOLFFConformism is for little minds.Mon Oct 12 1992 19:5132
I don't know your application, but usually there is no hard requirement for
semaphores and the design can utilize alternate methods of synch'ing access.

>>>May we use BBSSI intruction on local memory that has been made visible
>>>to the VME bus through the KAV$INMAP system service ?

Yes, you may use the instruction, however that does not accomplish what you
need. There is no point in time, let us call it T in which the motorola board
can examine the bit in the KAV30 memory and be sure that the bit will be
held up or will change to zero in the next time interval. Basically this will
never work.

What you need is a communication between the two processors, such that both
will know when something changes, or both will know when it is save to access
a page in memory. On the KAV30 there are two ways to do this, the first
you use the location monitor, which I would not recommend. The second method is
to use the FIFOs. Here you have again two possibilities, the first one is
to use the FIFOs as a basis of the producer/consumer model which come very close
to semaphores, or you can, as possiblity 2, us the FIFOs for communication. Form
your basenote I guess this is no option since you have to share "lots" of data.
You could for example put a token into the FIFO each processor examines the
FIFO and then accesses the datastructure if it can find the the token in the
FIFO. This has by the way nothing to do with message passing, as you write
in the base note. Also you can build a queue with the FIFOs and sync access
using the queue - that is a semaphore.

If you look in the KAV30 manual there is an ADA example in there on how to use
the FIFOs for sync'ing access to datastructures. 

I hope this helps.

	Julian.
65.2TST+RMWPDV01::ANDREACETue Mar 02 1993 20:165
    Try test&set on kav30 side and VMEbus RMW cycles on 68K.
    Hoping this will help, regards.
    
    
    			Raffaele.
65.3HERR::CROSBIEWed Mar 03 1993 11:558
    Hi Raffaele,
    
    Unfortunately, it is not this simple from the KAV30 side. VAX
    architecture has severe restrictions as to which VAX interlocked
    instructions can have operands in IO space, one of the replies to note
    36 in this conference contains more details.
    
    Graham