[comp.sys.nsc.32k] 32000 Un-Nicities

s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) (11/23/89)

I've just been doing some theoretical playing around with the 32000 series,
as a preliminary for building a small machine (32016 to be precise). I've
discovered a number of things which I think could have been better done.

1) Displacements can only cover 1M of addressing space (512k if you only
   allow for forward displacements from a fixed base).
2) There is no unsigned multiply and divide.
3) CVTP has no parallel. ie. there is no single instruction which can undo
   the bit pointer, nor can anything directly use the result.

Number 1) is not all that much of a problem, as it simply restricts the
   size of a particular segment (dare I use the word) in rare circumstances.
   But I believe that the absolute addressing more should have used a
   32 bit immediate rather than the displacement, because, as is, it
   is difficult to access absolute address FFFFFFFF (for example) without
   loading a register first.
2) can be a bummer if an unsigned multiply is what you wanted (with no regard
   for overflows and such. And is especially so with the extended multiplys.
3) Seems a bit silly to be. Ok, the pointer could be undone with 2
   instructions, but it would have been a lot better if there was an
   instruction to undo it, or, for example, extract field took the bit
   pointer supplied by CVTP.

The purpose of this item is to see if anyone knows WHY these un-nicities
were put there. Or is NSC not as infallible as we think it is.


Chris Cogdon [Brataccas], s872625.xx.rmit.oz (ACSnet)
All spelling mistakes are the fault of a malicious filter, honest.

amos@taux01.UUCP (Amos Shapir) (11/23/89)

In article <1914@minyos.xx.rmit.oz> s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) writes:
>
>The purpose of this item is to see if anyone knows WHY these un-nicities
>were put there. Or is NSC not as infallible as we think it is.

What makes you think it ever was? :-)

>1) Displacements can only cover 1M of addressing space (512k if you only
>   allow for forward displacements from a fixed base).

That's what's left in the address word after the two size bits are
used up.  When this scheme was designed, nobody was supposed to use
more than 1Gb, and 5-byte addresses were considered even un-nicer.

>2) There is no unsigned multiply and divide.

Yes there are: MEIi and DEIi.

>3) CVTP has no parallel. ie. there is no single instruction which can undo
>   the bit pointer, nor can anything directly use the result.

This is ambiguous, since a bit pointer can be reduced into any number
of possible byte+offset pairs.  If you are satisfied with a minimum-offset
pair, do a LSH, AND, or DEI.

-- 
	Amos Shapir		amos@taux01.nsc.com, amos@nsc.nsc.com
National Semiconductor (Israel) P.O.B. 3007, Herzlia 46104, Israel
Tel. +972 52 522261  TWX: 33691, fax: +972-52-558322 GEO: 34 48 E / 32 10 N

chaim@nsc.nsc.com (Chaim Bendelac) (11/24/89)

In article <1914@minyos.xx.rmit.oz> s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) writes:

>>1) Displacements can only cover 1M of addressing space (512k if you only
>>   allow for forward displacements from a fixed base).

Not at all. The NS32016 displacements cover its entire adddress-space 
(24 bits, 16Mbyte).
The more recent Series 32000 processors (such as the NS32532), have a 4 
GIGA-byte address-space. You can use a displacement to reach out to as 
much as one Giga-byte. Register-relative addressing modes can be used to 
span the entire 4 Gbyte range.

dlr@daver.UU.NET (Dave Rand) (11/24/89)

In article <13434@nsc.nsc.com> chaim@nsc.nsc.com.UUCP (Chaim Bendelac) writes:
>In article <1914@minyos.xx.rmit.oz> s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) writes:
>>>1) Displacements can only cover 1M of addressing space (512k if you only
>>>   allow for forward displacements from a fixed base).
>
>Not at all. The NS32016 displacements cover its entire adddress-space 
>(24 bits, 16Mbyte).
>The more recent Series 32000 processors (such as the NS32532), have a 4 
>GIGA-byte address-space. You can use a displacement to reach out to as 
>much as one Giga-byte. Register-relative addressing modes can be used to 
>span the entire 4 Gbyte range.

Oh dear. Oh my. I hope that the CTP products don't make this assumption,
Chaim.

The displacement addressing of the Series 32000 is a 30 bit, 2's complement
signed value. This means that it may range (in branch instructions for
example) +/- 16 meg for the 32008, 32016, 32032, 32C016, 32C032 and 32CG16,
covering the entire address range with no problem. For the 32332 and
32532 (and future 32 bit processors), the range is +/- 0.5 Giga byte, not
1 Giga byte. Values in _displacement_ may range from 0x1fffffff positive to
0x20000000 negative. Regretfully, negative values in absolute addresses
are "undefined" in the current programmers reference manual for the
Series 32000, so you can't assume that:
	ADDR	-1,r0
will point r0 to the last byte in memory.

As well, register-relative also uses a displacement field (so you have
all the advantages of code density), so it too is limited to +/- 0.5
Gigabyte. You may not use register relative to span the entire 4 Gigabyte
range.

So - for that Reeeally big program (> 500 megabytes), you will have to use
a jump table, or use immediate addressing modes.

The real problem is I/O on the 332 and 532. You must use a move instruction,
followed by register-relative to get to the really high addresses:

	MOVD	$ICU,r0		# load address of ICU (0xfffffe00)
	MOVB	xx,0(r0)	# access the ICU

Life is like that. Such a small price to pay for the benefit of tight
code that you can get on the 32000.
-- 
Dave Rand
{pyramid|hoptoad|sun|vsi1}!daver!dlr	Internet: dlr@daver.uu.net

ian@sibyl.eleceng.ua.OZ (Ian Dall) (11/24/89)

In article <1914@minyos.xx.rmit.oz> s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) writes:
>1) Displacements can only cover 1M of addressing space (512k if you only
>   allow for forward displacements from a fixed base).

Not true. Displacements can be 30 bit signed which is 1GB not 1MB.

>The purpose of this item is to see if anyone knows WHY these un-nicities
>were put there. Or is NSC not as infallible as we think it is.

Well, I've never heard anyone suggest they were infallible before!



-- 
Ian Dall     life (n). A sexually transmitted disease which afflicts
                       some people more severely than others.       

s872625@minyos.xx.rmit.oz (Chris Cogdon [Brataccas]) (12/06/89)

Sorry 'bout the delayed reply. My post rights to this group strangely
disappeared.

In article <2495@taux01.UUCP> amos@taux01.UUCP (Amos Shapir) writes:
>
> >3) CVTP has no parallel. ie. there is no single instruction which can undo
> >   the bit pointer, nor can anything directly use the result.
>
> This is ambiguous, since a bit pointer can be reduced into any number
> of possible byte+offset pairs.  If you are satisfied with a minimum-offset
> pair, do a LSH, AND, or DEI.

Seperate instructions could also be used to create the bit-pointer. I don't
see why they created a single instruction to do-up the bit-pointer, but no
single instruction to un-do it.

In article <410@sibyl.eleceng.ua.OZ> ian@sibyl.OZ (Ian Dall) writes:
>
> >1) Displacements can only cover 1M of addressing space (512k if you only
> >   allow for forward displacements from a fixed base).
> 
> Not true. Displacements can be 30 bit signed which is 1GB not 1MB.

Sorry, bit of a typo there. I meant 1GB and 512MB respectively.

Chris Cogdon. (s872625@minyos.xx.rmit.oz)