Welcome, Guest. Please login or register.

Author Topic: Memory Addresing  (Read 4914 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline XamicheTopic starter

Memory Addresing
« on: July 27, 2004, 12:23:31 PM »
Greetings fellow humans.

Oh joy of Joys, I have started the new semester with a wonderful unit called Micro-Processor Fundamentals. Very exciting. We've just learned how a CPU, namely the 8086 in this course, addresses memory. And how segment registers allow a 16-bit IP register to address 1MB. Brilliant stuff. Anywho, it got me thinking about the limits on how much RAM the 68020 processor in my Amiga 1200 can address. Does the 68000 series of processors address memory in the same way as their intel counter-parts, and is it possible to replace the CPU in an Amiga 1200 to one which can address more than 8MB?

Please excuse my ignorance of this subject as it a topic I have just started learning about Micro-Processors, from an engineering point of view anyway. :-P

Xamiche  
A500, A600, A1200, A2000, A4000D, A4000T, CD32
 

Offline Cyberus

  • Hero Member
  • *****
  • Join Date: Feb 2003
  • Posts: 5696
    • Show only replies by Cyberus
Re: Memory Addresing
« Reply #1 on: July 27, 2004, 12:38:39 PM »
Quote
Memory Addresing


"Shall I compare thee to a piece of Si? Thou art more lovely and more temperate!"

You might find some info  here

I know 030 accelerators and up can can address more than 8MB...So the answer to your question is 'yes'
I like Amigas
 

Offline XamicheTopic starter

Re: Memory Addresing
« Reply #2 on: July 27, 2004, 01:12:26 PM »
So I'd need to use an accelerator of some kind to upgrade the CPU. I was hoping there was a way to replace the CPU only. Accelerators are prohibitively expensive for me. :-(
Does anyone know of a home design/made accelerator project? I have a 68030 CPU here that I could use for such a project.

Xamiche
 
A500, A600, A1200, A2000, A4000D, A4000T, CD32
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Memory Addresing
« Reply #3 on: July 27, 2004, 01:20:05 PM »
Quote
...how segment registers allow a 16-bit IP register to address 1MB. Brilliant stuff.

Hell no, horrible stuff. Segmented memory addressing is evil.

Quote
Anywho, it got me thinking about the limits on how much RAM the 68020 processor in my Amiga 1200 can address. Does the 68000 series of processors address memory in the same way as their intel counter-parts

No. x86 has direct and segmented memory adddressing. m68k has only direct memory addressing. 680EC020 can address upto 16MB memory (24-bit addressing).

Quote
is it possible to replace the CPU in an Amiga 1200 to one which can address more than 8MB?

Yes. Add a CPUcard with 68020, 68030, 68040 or 68060 and you get 32-bit addressing.
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16882
  • Country: gb
  • Thanked: 6 times
    • Show only replies by Karlos
Re: Memory Addresing
« Reply #4 on: July 27, 2004, 01:27:38 PM »
You wont find any of that segmented pointer nastiness on the 680x0 :-) It might look intresting from an engineering point of view, but segmented addressing is a total anachronism that crippled the x86 for years thanks to the need to keep backwards compatibility.

The original 68000 (and IIRC 68010 and 68EC020) had 32-bit address registers but only physically used the lower 24 address lines (so the upper 8-bits of the address registers a0-a7 were ignored) and thus had a total, linear address space of 16MB.

The full 68020 and above use all 32-bits of the address to give a proper 4GB linear address space.

The closest thing to segmented addressing you will ever see in the 680x0 series is MMU remapping, which uses paging to remap the physical 4GB space into whatever order the software expects. Of course, as far as user mode code goes, you never see this - you just fetch a byte from address X, and reality it might come from somewhere totally different, depending on how the MMU was set up.

Building a DIY accelerator? Hmm, intresting. I'm sure it is feasable for someone with sufficient engineering knowledge and understanding of the amiga hardware. In other words, not me :-)
int p; // A
 

Offline XamicheTopic starter

Re: Memory Addresing
« Reply #5 on: July 27, 2004, 01:34:22 PM »
Quote


Quote

    ...how segment registers allow a 16-bit IP register to address 1MB. Brilliant stuff.


Hell no, horrible stuff. Segmented memory addressing is evil.


Oh come now, be fair. Segmented addressing meant that everyone’s code based on the old microprocessors didn't become redundant, which would have meant expensive re-design. I can see why it would be a headache if one had just spent a couple of years developing software only to have Intel release a processor on which the software would not work. Sure segmented memory addressing is a patch-work solution but it works. Mind you I'm new to all this, so in a year I may be agreeing with you. :-P

Xamiche

A500, A600, A1200, A2000, A4000D, A4000T, CD32
 

Offline XamicheTopic starter

Re: Memory Addresing
« Reply #6 on: July 27, 2004, 01:41:27 PM »
@Karlos

Quote
Building a DIY accelerator? Hmm, intresting. I'm sure it is feasable for someone with sufficient engineering knowledge and understanding of the amiga hardware. In other words, not me :-)


Me neither. Maybe in a year from now. But I doubt it. :-?

Thanks for the info guys/gals (Who knows, maybe there's some Gals here) ;-)

Xamiche
A500, A600, A1200, A2000, A4000D, A4000T, CD32
 

Offline KennyR

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 8081
    • Show only replies by KennyR
    • http://wrongpla.net
Re: Memory Addresing
« Reply #7 on: July 27, 2004, 02:14:05 PM »
Piru's right - segmented memory addressing was pure evil, and was only in there to keep legacy with the original horribly badly designed 8086! There was no practical reason to include it, apart from to get around the 8086 and 8088's design limitations. Compared to the direct addressing method used by better designed CPUs, it makes assembly so much harder, and adds a totally unwelcome and unnecessary layer of complexity to low level design. For these reasons, modern CPUs and most modern hardware dropped it a long time ago.
 

Offline XamicheTopic starter

Re: Memory Addresing
« Reply #8 on: July 27, 2004, 02:34:34 PM »
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it? Maybe we (the students at my college) should jump up and down and ask to be shown the 68000 series rather than the 8086 and 8088. I guess they'll move past them and onto better MPs later on.

I didn't realise people found the system so horrible. I though it was a clever way to maintain compatibility, whilst increasing the address bus width. I guess that's the difference between knowledge and experience. I guess it's lucky for me there are many experienced people out there to enlighten this Newb. :-)

Xamiche

P.S.

Thanks for bothering to respond to my post. That's what I like about this forum, people actually respond to you.
:-)
A500, A600, A1200, A2000, A4000D, A4000T, CD32
 

Offline KennyR

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 8081
    • Show only replies by KennyR
    • http://wrongpla.net
Re: Memory Addresing
« Reply #9 on: July 27, 2004, 02:40:37 PM »
Quote
Xamiche wrote:
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it?


Hmm, good question. When I did computer tech at uni in '96, we were taught how 6502 and 68000 memory addressing worked. We didn't touch on Intel at all, except to compare. Maybe segmented memory addressing still has some use in devices where bus bandwidth is limited, I don't know.

Quote
I didn't realise people found the system so horrible. I though it was a clever way to maintain compatibility, whilst increasing the address bus width.


Well, it is, very clever. But try doing serious assembler on it and you'll be calling it every bad word under the sun. ;-) Like every workaround it just increased the amount of work and thought you have to expend just to get something done.
 

Offline lordv

  • Full Member
  • ***
  • Join Date: Feb 2004
  • Posts: 124
    • Show only replies by lordv
    • http://lvd.nm.ru
Re: Memory Addresing
« Reply #10 on: July 27, 2004, 05:31:26 PM »
Quote

Xamiche wrote:
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it?

I think, some people are more narrow-mainded than we are. They know only x86 and do not want to learn any other architectures.

Quote

I didn't realise people found the system so horrible. I though it was a clever way to maintain compatibility, whilst increasing the address bus width.

Compatibility with what? x86 isn't compatible with anything else afaik. Maybe compatibility with narrow-minded people that were afraid of new truly 16/32 bit architectures? You know, x86 is very close to older 8bit ones.
 

Offline FluffyMcDeath

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 3440
    • Show only replies by FluffyMcDeath
Re: Memory Addresing
« Reply #11 on: July 27, 2004, 06:03:21 PM »
Quote

Xamiche wrote:
Hmm, I wonder why they are bothering to teach us about these microprocessors if the segmented memory addressing is so bad. If todays processors no longer use it, why teach it?


For the same reason we're all taught to type on QWERTY keyboards; not because it's the best, rather because there is a lot of it about.

QWERTY, for those who don't already know, was a layout designed specifically to solve the problem on mechanical typewriters, of people typing so fast that they would jam the keys. Dvorak, for example, is a much better layout and allows faster typing, but you are not likely to come across one of these. Why? Because QWERTY is everywhere. Why? because that's what people know. Why? Because that's what they are taught. Why? because QWERTY is everywhere.


Anyway, x86 based ISAs are massively common on the desktop, so you have to know them, even though the newer ones have contiguous memory addressing. Once you know how to do the segmented addressing, you'll be happy to throw it away and forget about it because you probably won't ever need it.
 

Offline XamicheTopic starter

Re: Memory Addresing
« Reply #12 on: July 28, 2004, 01:03:37 PM »
Quote
Compatibility with what? x86 isn't compatible with anything else afaik.


Not cross platfrom compatibility, but compatibility in terms of everyones source code created on the older Intel MP. If you change the width of the IP register, everyones source code would not work, and people would have been very irrate with that in 1981 (See my earlier post on software developement). The main reason for semented memory addressing is so you don't have to change the IP register's bit width, and you can maintain backwards compatibility. I'm sure Intel considered changing the IP register width, but it would have meant alienating their customers, which in business is just plain dangerous. The Amiga, in it's early stages could get away with it because it was yet to have a customer base.

Quote
Maybe compatibility with narrow-minded people that were afraid of new truly 16/32 bit architectures?


Come on, we're talking about 23 years ago. The 68000 didn't even exist when the x86 series started (8086 -1981, 68000 -1984). No one is suggesting that such addressing is relevant now. Sheesh!

Quote
You know, x86 is very close to older 8bit ones.


You know, that was very much the point. It could do the job of an 8-bit or 16-bit MP.

I dearly love the Amiga and the 680x0 which drives it, but that doesn't mean I'm going to bag every other MPs which exist. Especially considering what Intel did for the world in terms of it's R & D in the 70s.

Xamiche

A500, A600, A1200, A2000, A4000D, A4000T, CD32
 

Offline Steady

Re: Memory Addresing
« Reply #13 on: July 28, 2004, 01:30:45 PM »
@ Xamiche:
Quote
Come on, we're talking about 23 years ago. The 68000 didn't even exist when the x86 series started (8086 -1981, 68000 -1984). No one is suggesting that such addressing is relevant now. Sheesh!


Actually, it was 8086 - 1978, 68000 - 1979. Still, the 8086 was there first.

@General thread
On compatibility, the 8086 wasn't binary compatible with it's predecessors (8080/8085) but was supposed to allow you to easily assemble the 8080 source to run on 8086. I imagine some translation takes place in the assembler and I have never seen it in action, but it was meant to be the idea.

Also, the current x86 architecture still has segmentation, it is just that most people program to the 32-bit flat architecture (ie CS/DS/ES/SS/FS/GS all have the same value). The 8086 could also be programmed in flat mode too, if you wanted to limit everything to 64k and only called the BIOS/DOS routines (ie no direct memory access). That was what the .COM programs were all about.
 

Offline XamicheTopic starter

Re: Memory Addresing
« Reply #14 on: July 28, 2004, 01:50:33 PM »
Quote
Actually, it was 8086 - 1978, 68000 - 1979. Still, the 8086 was there first


Not according to my text book. ;-)

The dates it gives me are 81 and 84. I checked a few references on the web to see if this was correct. I'm not saying you are wrong, just that my references say different. :-)
Pendantic really, but in many ways I am a small, small man. Maybe I need a new text book. :-P

Quote
The 8086 could also be programmed in flat mode too, if you wanted to limit everything to 64k and only called the BIOS/DOS routines (ie no direct memory access). That was what the .COM programs were all about.


I always wondered about the .COM programs, and why you don't seem them much anymore.

Xamiche
:-)

P.S.
I just checked another reference which says the 8086 came out in 1979...oh look, a site which says the 8086 was released in 1879, Wow, the Victorians had personal computers. Clever bunch. :-P
A500, A600, A1200, A2000, A4000D, A4000T, CD32