| Thoughts On MMU | page 1 2 3
|
|---|
|
|---|
Jakob Eriksson Sweden
| | (Moderator) Posts 1097 13 Jan 2012 16:41
| I think I will go ahead and derail this thread even further by pointing out that you can and could run Unix without MMU. :-)
| |
Marcel Verdaasdonk Netherlands
| | Posts 3975 13 Jan 2012 18:44
| µC Linux anyone. :P Na that ain't fair, Nixus why are you that solumn about a MMU?And yes it's true i am not a MMU fan.
| |
Nixus Minimax Germany
| | Posts 272 13 Jan 2012 19:54
| Samuel D Crow wrote:
| | Define "lot of efforts". After having tried my best to make Copper-lists work in a reasonable fashion as a simulator on ordinary PC hardware, I can tell you with certainty that Commodore's efforts were mere window-dressing and without hardware-banging the Amiga wouldn't have dazzled anyone. |
Well, perhaps not "lot of effort" but everything could be done through the OS which at least meant a theoretical chance that the hardware could have been changed without the software breaking. AFAIR you could build copperlists through OS functions but you had to pass the precise data to the function that you otherwise would have put into the copperlist. OS-compliant games were possible though. As I wrote above I made a small tech demo of a parallax scroller with a character sprite, joystick support, blitter objects and copperlist for colour fades that was 100% OS-compliant. It was written completely in asm. Since I'm no graphician, all graphics objects were black blocks, though :)
| Banging the hardware is a requirement for the NatAmi. |
I never said that hardware banging was a complete taboo. Even with an MMU and multiple OS instances you could just allow each task and each OS instance to access the chip registers/chipmem. If one program messes up chipmem or registers, you have the same situation as before: it will be your problem if you run that type of software. But at least most of the OS would be protected and tasks from each other. In addition having an MMU in place doesn't mean that you have to use it. Outside the amiga world there is multiboot. | BTW, the reason we're not putting an MMU in the NatAmi is mainly because there isn't room for one. |
I doubt this is the reason. If you can put a 3D core into the FPGA, there certainly is enough space for something as simple as an MMU. There was an MMU add-on for the 68020 when gates were still counted in thousands. | The N68050 will not have an MMU. Period. |
Oh really? Question Mark? It's perfectly fine if nobody but me wants to have an MMU. It is also perfectly fine if nobody wants to spend any time on the subject. I have enough experience with open-source software to know that the person having an idea is the only one who might put it to test if anybody does at all. What I don't like is when people put down an idea they don't like without convincing reasons and in a condescending way.
| |
Nixus Minimax Germany
| | Posts 272 13 Jan 2012 19:55
| Jakob Eriksson wrote:
| I think I will go ahead and derail this thread even further by pointing out that you can and could run Unix without MMU. |
The only one I know of is uC linux which in my opinion is not a UNIX precisely because it hasn't got an MMU and the features that are only possible with an MMU.
| |
André Jernung Sweden
| | (MX-Board Owner) Posts 988 13 Jan 2012 20:13
| Nixus Minimax wrote:
| I doubt this is the reason. If you can put a 3D core into the FPGA, there certainly is enough space for something as simple as an MMU. There was an MMU add-on for the 68020 when gates were still counted in thousands.
|
It is also a clockrate issue and thus a performance issue. We don't have any chances of achieving competitive CPU speeds with the N68050 if we integrate a MMU into the design. This has been discussed extensively over the years.
| |
Nixus Minimax Germany
| | Posts 272 13 Jan 2012 22:17
| André Jernung wrote:
| | It is also a clockrate issue and thus a performance issue. We don't have any chances of achieving competitive CPU speeds with the N68050 if we integrate a MMU into the design. |
This sounds much more convincing than the FPGA space thing. Will the code be public so that one could modify the CPU design? This has been discussed extensively over the years.
|
I'm sorry, I didn't know this was discussed so extensively.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3975 13 Jan 2012 23:05
| long story short adding a MMU would add another stage to our pipeline. This would be a large penalty when a JMP or Bcc is used and the pipeline needs to be flushed when miss predicted, the cost is equal to the length of the pipeline in clock ticks.general concensus is that the added perfomance penalty does not outweigh the gains. I have to mention this to be fair it has been mentioned to do a MMU outside the CPU and directly into the memory controller part of the system since both CPU and chipset need to pass through it.
| |
Thomas Richter Germany
| | (MX-Board Owner) Posts 1425 14 Jan 2012 09:23
| Marcel Verdaasdonk wrote:
| long story short adding a MMU would add another stage to our pipeline. This would be a large penalty when a JMP or Bcc is used and the pipeline needs to be flushed when miss predicted, the cost is equal to the length of the pipeline in clock ticks.
|
What has a MMU todo with the branch pipeline? And why do you care in first place? Are we back to cycle counting? I believe such days are over now, and software matters more than hardware.Marcel Verdaasdonk wrote:
| general concensus is that the added perfomance penalty does not outweigh the gains.
|
"General consensus" is a nice word. No, it's not "general" since I disagree. I appreciate that there are more important issues to work on, and that given the time and money constraints, this issue has no priority right now, but I do not agree that the performance penalty outweights its gains, basically because I do not see any penalty below 20% even worth discussing. You get the same speedup by just waiting a couple of months and picking the next generation of chips, and taking this as an argument for an engineering decision is folly.Marcel Verdaasdonk wrote:
| I have to mention this to be fair it has been mentioned to do a MMU outside the CPU and directly into the memory controller part of the system since both CPU and chipset need to pass through it.
|
That's a DMA MMU, and if you want a simpler integration of any type of DMA device, for example including for PATA DMA, then routing this through such a channel as well has the additional benefit of simplifying the software layer. It is not exactly necessary as the Os could handle it as well. Same goes for the hardware registers. Of course you could virtualize them, and let the os check whether the operations to be performed by the hardware are valid for the currently loaded program. I'm not saying that this is practical - it is however possible. In principle, you could get rid of the old Amiga hardware completely and emulate it by new more powerful chips, plus a virtualization layer, plus a CPU that is fast enough. It is not what this project is about, but it is not impossible.
| |
Thomas Richter Germany
| | (MX-Board Owner) Posts 1425 14 Jan 2012 09:26
| André Jernung wrote:
| It is also a clockrate issue and thus a performance issue. We don't have any chances of achieving competitive CPU speeds with the N68050 if we integrate a MMU into the design. This has been discussed extensively over the years.
|
Do you actually have any numbers? I highly doubt this, namely the unability to achieve a competitive CPU speed. Yes, things will be slower, but not much slower as it extends the pipeline by a couple of stages - but why bother? Thus, how much slower is slower? Any numbers?
| |
Marcel Verdaasdonk Netherlands
| | Posts 3975 14 Jan 2012 09:55
| Yeah i cycle count thomas i though you knew that already. I disagree that software is more important then hardware. What matter is that people know what they have and how to use it!and about your wait a month and there is a 20% increase was true in the late 90's and early last decade. But no this kite won't fly these days, we are looking at bounds in physics which needs to be overcome first. you can't stop me from cycle counting, call me old fashion but that is how performance is a guaranty.(and no i do not hand code all my code in ASM i do it in time critical loops.)
| |
André Jernung Sweden
| | (MX-Board Owner) Posts 988 14 Jan 2012 10:14
| Thomas Richter wrote:
| Do you actually have any numbers? I highly doubt this, namely the unability to achieve a competitive CPU speed. Yes, things will be slower, but not much slower as it extends the pipeline by a couple of stages - but why bother? Thus, how much slower is slower? Any numbers?
|
You will have to ask Jens for hard numbers. But IIRC the general consensus was that a 060 board would be a lot more useful if you want a fast 68k with MMU in your system. I think that it would be useful to have a MMU-equipped "debug core" that the user could load if he wants MMU functionality but do not mind a speed decrease while using it. Maybe that could be a feasible sub-project in the future.And of course the design choices could and should be revised when better FPGA tech is available further on.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3975 14 Jan 2012 11:06
| André think it could fit along nicely in the 4MiB Flash ROM?
| |
André Jernung Sweden
| | (MX-Board Owner) Posts 988 14 Jan 2012 11:17
| Marcel Verdaasdonk wrote:
| André think it could fit along nicely in the 4MiB Flash ROM?
|
What do you mean? The FPGA configuration is always read from flash at boot. And there are always two FPGA configurations to choose from with a jumper: main side and backup side. Reconfiguring any of the two FPGA loads is already as easy as writing a single AmigaDOS command, waiting a few seconds and rebooting. And eventually it will be as simple as a few GUI clicks. Loading a small file of a few hundred kilobytes from HDD vs flash mem does not really make a big difference, if that is what you meant.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3975 14 Jan 2012 11:27
| it could be even less since only parts of the FPGA would get replaced. but i thought the flash ROM also contained a copy of the OS
| |
André Jernung Sweden
| | (MX-Board Owner) Posts 988 14 Jan 2012 11:42
| Marcel Verdaasdonk wrote:
| it could be even less since only parts of the FPGA would get replaced.
|
The FPGA configuration is always read in full at boot. This takes a quarter of a second or so. When writing a new FPGA configuration to flash, you need to erase the area first anyway. Writing diffs is out of the question. Marcel Verdaasdonk wrote:
| but i thought the flash ROM also contained a copy of the OS
|
Yes, it has four slots for kickstart ROM images. What is your point?
| |
Megol .
| | Posts 672 14 Jan 2012 12:49
| Thomas Richter wrote:
|
André Jernung wrote:
| It is also a clockrate issue and thus a performance issue. We don't have any chances of achieving competitive CPU speeds with the N68050 if we integrate a MMU into the design. This has been discussed extensively over the years. |
Do you actually have any numbers? I highly doubt this, namely the unability to achieve a competitive CPU speed. Yes, things will be slower, but not much slower as it extends the pipeline by a couple of stages - but why bother? Thus, how much slower is slower? Any numbers?
|
The 68050 is a low clocked device implemented in FPGA logic. Trying to compare it with modern processors is just dumb, they have advanced hardware that just doesn't fit in a FPGA processor.It's possible to implement MMU functionality without too much performance impact but it isn't compatible with the rest: all caches are virtually addressed and translation is done on main memory accesses.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3975 14 Jan 2012 13:11
| André Jernung wrote:
|
Marcel Verdaasdonk wrote:
| it could be even less since only parts of the FPGA would get replaced. |
The FPGA configuration is always read in full at boot. This takes a quarter of a second or so. When writing a new FPGA configuration to flash, you need to erase the area first anyway. Writing diffs is out of the question. |
That isn't what i meant i meant dynamic so to dump a image in RAM but i guess that is technically not feasable while there is no memory controller.
| |
André Jernung Sweden
| | (MX-Board Owner) Posts 988 14 Jan 2012 13:12
| Megol . wrote:
| Trying to compare it with modern processors is just dumb, they have advanced hardware that just doesn't fit in a FPGA processor.
|
I was comparing it to existing 68k CPUs, though.
| |
Team Chaos Leader USA
| | (Moderator) Posts 2094 14 Jan 2012 15:11
| Marcel Verdaasdonk wrote:
| general concensus is that the added perfomance penalty does not outweigh the gains. |
Thomas Richter wrote:
| "General consensus" is a nice word. No, it's not "general" since I disagree. I appreciate that there are more important issues to work on, and that given the time and money constraints, this issue has no priority right now, but I do not agree that the performance penalty outweights its gains,
|
+1
| |
Team Chaos Leader USA
| | (Moderator) Posts 2094 14 Jan 2012 15:20
| Nixus Minimax wrote:
| It's perfectly fine if nobody but me wants to have an MMU. It is also perfectly fine if nobody wants to spend any time on the subject. I have enough experience with open-source software to know that the person having an idea is the only one who might put it to test if anybody does at all. What I don't like is when people put down an idea they don't like without convincing reasons and in a condescending way. |
Don't worry. We can get an MMU running in the 68080 or 090. There are plenty of ppl who want an MMU.
| |
|