[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

81.0. "KAV$K_USER_24 and KAV$K_USER_32 problem" by MLNTSC::RESNATI () Wed Mar 17 1993 16:51

Hi, a customer has the following configuration:

	- CPU KAV-30 T6010DA .A02 serie MU14400423
	- MEMORY VME Motorola mod. 204/1 addrees allocation %x900000

	- VAXELN 4.2  - VAXELN KAV toolkit Extension Library v1.0

It use the following program to read a memory location:

#####################################################################

		module test;
		include $kavdef;
		program test(input,output);
	var  
			base_ptr : ^anytype;
			long_ptr : ^integer;
			entry : integer;
			istat,data,null : integer;

		begin
			writeln(' program test, welcome!');
			readln(null);			 {to continue}
	{}
			kav$out_map(status := istat,
			  	entry := entry,
				page_count := 1,
				bus_address := %x900000,
				virtual_address := base_ptr,
				am_code := kav$k_user_32,
				map_functions := kav$m_vme+kav$m_mode_3_swap),
			if not odd(istat) then
				writeln(' map error',hex(istat))
			else
				begin
				 longw_ptr::integer := base_ptr::integer;
				 data := longw_ptr^;
				 writeln(' d = ',hex(data));
				end;
		end;
	end;

#############################################################################

The input configuration file for EBUILD is the following:

characteristic /shared_status /net_device=EZA /objects=1024 -
/p0_virtual_size=8192 /p1_virtual_size=512 -
/io_region=6000 /interrupt_stack=100 /target=24
program TEST /kernel_stack=180 /mode=kernel
device EZA /vector=%x130 /net_def
terminal CONSOLE /scope

This read program gives a %xFFFFFFFF value also if the data on VMEbus are OK.
If the customer use KAV$K_USER_24 all works fine.
The customer has notice that this problem happens only in read mode. In write
mode all is OK.
Using the exerciser the A32 read is ok but on VME bus was load the AM_CODE of
read A24.
Using console program loaded with :
>>> start $20080054 
the read in A24 and A32 are loaded with the correct AM_CODES.

The customer does the following manual test:

- start console program ($20080054)
- With no read come back on program console
- he programs outgoing map with the DEPOSIT command
- read the location memory with the command EXAMINE and the result is OK.

if he loads the read program on VAXELN and
- with no read come back on program console  and
- he  programs outgoing map with the DEPOSIT command
the EXAMINE read command gives $FFFFFFFF

I'm not a real-time specialist, I hope this information are quite.
Any help is appreciate.

	
					Massimo
T.RTitleUserPersonal
Name
DateLines
81.1BAYERN::WOLFFConformism is for little minds.Thu Mar 18 1993 09:2725
I think your customer has a configuration problem. Configuration problems
are the most common source of problems on VME. 

Here are some things to check for:

1) Does the Memory card support A32 mode? 
2) Does it have to be configured for A32 mode (Maybe several DIP switches 
   on the card)
3) Maybe the card needs another AM code for A32.
4) Do you have Arbitration enabled on the KAV30?
5) Some memory card need to be accessed in A24 to program the A32 base address
   they respond to - is this such a card?

Another question I would have is why TEST needs to be in Kernel Mode?
Debugging is much more easy in User Mode.

I wonder how your customer can program the SGM with DEPOSIT, we do not
document the addresses of the SGM entries, plus we do not document the
structure of the SGM entries, the DEPOSIT/EXAMINE does not work unless 
you know much more about the HW. Use the ROM based excerciser, this is
the only valid way. If the ROM based excerciser works, then you program
has a problem, otherwise your configuration,. again DEPOSIT/EXAMINE cannot
be used as a valid test on the KAV30.

	Julian.
81.2KAV$K_USER_24 and KAV$K_USER_32 problemMLNTSC::RESNATIThu Mar 18 1993 13:564
Hi, thank for your reply.
Now I check with the customer your suggestion.

			Massimo
81.3May this help ?PDV01::ANDREACEFri Jun 11 1993 14:1417
    Just as an hint,
    when you get all FF from the bus, mostly implies that the particular
    address selected from a R/W cycle does not respond, and also may imply
    for example that you are trying to read an 8-bit register as 32-bit
    register (but this is not your case) where generally the logic would
    not respond. You do not need to investigate arbiter problems as long as
    youu are the only VME bus master. My personal opinion is that either
    the board is working only in A24 (in which case what you see is
    "noise") or you have problem in generating correct VME addresses (+
    modifier) see specs. Remember also that to work in A32/D32 you must have
    the P2 connected. Is this the case for the Motorola Memory Card ?
    
    
    Regards.
    
    		Raffaele.
    
81.4Motorola and other boards problemsBLG03::ROSSIMon Oct 18 1993 18:17101
Hi,
	I was at the customer site. The problem is unsolved.

The customer has several boards that does not work with our KAV30.
The boards works properly when the program uses the am_code
KAV$K_USER_24. The boards are:

	- Tecnint 531
	- Motorola 204/1
	- other Controller boards

Using the am_code KAV$K_USER_32 all boards, except Tecnint, are not working.
The Tecnint memory board work properly using simple programs to read and 
write in a memory location.
All the other boards can write without exceptions but cannnot read the data.

Using, instead KAV30, another CPU (Motorola or  Eltec E-5) all the above 
boards works properly in 32 bit AM.



About reply 81.1 We can see that:

> I think your customer has a configuration problem. Configuration problems
> are the most common source of problems on VME. 
>
> Here are some things to check for:
>
> 1) Does the Memory card support A32 mode? 

	1. The memory support 32 bit AM


> 2) Does it have to be configured for A32 mode (Maybe several DIP switches 
>    on the card)

	2. The board is configured as above and works with 2 other CPUs 
		in 32 bit AM.


> 3) Maybe the card needs another AM code for A32.

	3. QUESTION: Please, How and/or where I can find this code ??????


> 4) Do you have Arbitration enabled on the KAV30?

	4. KAV30 is the only VME bus master.


> 5) Some memory card need to be accessed in A24 to program the A32 base address
>    they respond to - is this such a card?
> 

	5. QUESTION: Please, How and/or where I can find this info ??????

> I wonder how your customer can program the SGM with DEPOSIT, we do not
> document the addresses of the SGM entries, plus we do not document the
> structure of the SGM entries, the DEPOSIT/EXAMINE does not work unless 
> you know much more about the HW. Use the ROM based excerciser, this is
> the only valid way. If the ROM based excerciser works, then you program
> has a problem, otherwise your configuration,. again DEPOSIT/EXAMINE cannot
> be used as a valid test on the KAV30.

With ROM exerciser all boards are working with A32 with successfully read
and write operations. The Motorola memory board can read the data written
in fast or slow mode in 24 and 32 AM.

Using a Logic Analyzer we check also the bus signals. The bus cycle is as
follows:

	AS  _______            520 nSec              _________________
                   |________________________________|
                   .
 DS0 - DS1 ___________                           _____________________
                   .  |_________________________|
                   .
 DTACK     ______________________________  140 nS. ___________________
                   .        360 nSec.    |________|
                   .                       
           ___________________________  _____________  _______________
 D0 - D32                             \/             \/
           ___________________________/\_____________/\_______________


No differencies between use of kav$k_user_24 or kav$k_user_32.


There is the same problem also using the call KAV$BUS_READ.


We have also tried to modify the switch/jumper settings combining the
various "normal mode"/"fast mode" with "lockout enabled/lockout disabled"
and "DTACK delay enable/disable" with no sulution of the problem.

Thanks in advance.


Bye

Giuseppe Rossi
81.5this should work....GOBANG::LEMMERMon Oct 18 1993 18:5755

	Hi,

	once you have verified that with ROM-based diagnostics everything
	works fine it is clear that the HW works fine (the diagnostics use
	the same HW interface as the ELN kernel). According to your last
	entry and your bus-signals everything is OK on the HW.

	This points to software or setup:


> 4) Do you have Arbitration enabled on the KAV30?

	4. KAV30 is the only VME bus master.

	-> OK, but you still need to configure it as an arbiter (Dip switch 5)
	but I suppose you have done this, otherwise you would see problems
	not only in A32 mode (at least I think so...)


	
	->The only conclusion is that your boards expect a different A32 code
	as we use with our modifier:


> 3) Maybe the card needs another AM code for A32.

	3. QUESTION: Please, How and/or where I can find this code ??????


	-> The information about the modifiers (and hex values) we use are given
	in the documentation of the KAV$OUT_MAP call (Programmers reference).
	The AM codes expected by your boards should be found in the documenation
	of these boards. ALL possible AM codes are listed in the VME spec, 
	available from VITA. I suggest that you look into the documentation 
	of your boards to find out what AM codes they expect.



> 5) Some memory card need to be accessed in A24 to program the A32 base address
>    they respond to - is this such a card?
> 

	5. QUESTION: Please, How and/or where I can find this info ??????

	-> Again, thats the documentation of your boards, we don't have any 
	experience with these boards (but with a lot of other boards and
	we are shure that A32 address mode works ok on the KAV30..)


	Hope this helps...

	Thomas

81.6Base address conflict?BAYERN::WOLFFConformism is for little minds.Tue Oct 19 1993 12:117
Did you setup the A32 base addresses correctly such that you don't have them
conflicting? The KAV30 has a default (0) which might conflict with other boards
on the bus - this needs to be done by software.

It's all in the documentation....

	Julian.
81.7thank YouBLG03::ROSSIMon Oct 25 1993 14:1712
    Thaks a lot for your answers.
    
    I'll check and try about this things with the customer...
    
    Thanks again
    
    
    Bye,
    
    
    Giuseppe
    
81.8Still not working and working around %x01000000BLG03::ROSSIWed Nov 10 1993 12:1348
Hi,
	I went to the customer to check all previous things.

There was no problems with arbiter. The KAV30 is the only arbiter
on the VME bus (bus master).
The Motorola memory board (as explained on its documentation) is 
full A32 and the am_code for A32 is %x09.
No address conflicts with address of KAV30 (rotary switch defined).

The Motorola memory board that we can write but not read using a KAV30,
with am_code = %x09 = kav$k_user_32, is normally working with a Motorola
VME cpu. The am_code (seen using a logic analyzer on VME lines AM0 to AM5)
is %x09, the same. We are again reading %xFFFFFFFF when we read a location
previously written with a specific data. Reading the location via KAV30
console program the data is available. We tried to use base address %x00900000
and %x00C00000 as memory starting address and as parameter of kav$out_map.
The result was again %xFFFFFFFF. It is important to remark that the logic
analyzer shows correctly the VME bus signals.

Reading a VME document of another VME cpu board we discovered that, using
the am_code = %x09 (A32 extended mode) the valid addresses are from 
%x01000000 to %x7FFFFFFF !!!!

Immediately we tried to use a base address above %x01000000. Using %x01C00000
the memory started to works correctly with KAV30 !!!!   The same with
%x01D00000. All data are written and read correctly !!!!

We cannot find this indication on the KAV30 documentation.

Questions:

	1) Is it a malfunction or is it normal ?

	2) If normal, is it documented in any KAV30 or VAXELN manual ?

	3) Why bus data are ok anyway (logic analyzer & KAV30 console program
	   starting at 20080054) and software cannot read them when the 
	   base address is under %x01000000 ?  VME bus signals are the same
	   above and under %x01000000.

The customer now could start to work, but He's asking the three questions
above. If someone could help us, please reply. 

Thanks in advance,

Bye,

Giuseppe
81.9address conflict....!GOBANG::LEMMERWed Nov 10 1993 18:1571
Hi,

	thats the reson why:

>	..
>	No address conflicts with address of KAV30 (rotary switch defined).
>	..

	A32 space of the KAV30 is NOT defined with the rotary(thats A24!), but
	with software (ebuild system parameters or KAV$VME_SETUP call) -
	see reply .6!

	By default A32 base address of KAV30 is set to (0) and A32 slave
	access is enabled! Your example code and .dat file shows that you
	do not override the defaults... so if you look at the VME address
	space you see that the 'lowest' 16Mbyte or everything below
	x01000000 is 'reserved' for the KAV30. From the KAV30 documentation:

	section 3.6 scatter-gather map

	....
	The KAV30 base address specifies the part of the VMEbus address space
	allocated to the module. For A32 addressing, each device has 16Mbyte
	of VMEbus address space. You can set bits 24 to 31 by calling the
	KAV$VME_SETUP service to setup the VMEbus system.
	....

	[end]

	(or use the system parameters in the ebuild .dat file...)
	
	This is a 'physical' allocation done by HW, it has nothing to do
	with 'mapping' a certain VMEbus address space to the VAX memory
	space using the KAV$IN_MAP service. Therefore:

	If you're setting the base address of your other device to x00900000
	it is in the space allocated for the KAV30. This may not create a 
	conflict on the VMEbus, since the KAV30 HW is 'listening' to this
	address space only - but it definitely creates a conflict at the 
	data line drivers inside the KAV30, therefore you will see corrupted
	data. If you use the onboard diags (200800...), you may not see this
	conflict since the diagnostics do initialize the board in a different
	way...

	Solution: use a different address space for your 'other' device, as
	you have already done, or setup the KAV30 VMEbus allocation properly
	by using the system parameters or the SETUP service.
	
	To answer your questions:

	1) Is it a malfunction or is it normal ?

	-> normal, see above

	2) If normal, is it documented in any KAV30 or VAXELN manual ?

	-> yes, see above

	3) Why bus data are ok anyway (logic analyzer & KAV30 console program
	   starting at 20080054) and software cannot read them when the 
	   base address is under %x01000000 ?  VME bus signals are the same
	   above and under %x01000000.
	
	-> see above...


	hope this helps....

regards,

	Thomas
81.10Many ThanksBLG03::ROSSIFri Nov 12 1993 14:1012
    Thanks Thomas,
    			for the quick answer, very well detailed.
    
    I'll check moving the KAV30 portion of the addressing space (16 MB) 
    above.
    
    Thank You Very Much.
    
    Bye
    
    Giuseppe