 |
Welcome to the Natami / Amiga ForumThis forum is for AMIGA fans interested in the new NATAMI platform.
Please read the forum usage manual.
|
Do you have questions about the Natami? Post it here and we will answer it!
|
| About the Memory | page 1 2 3
|
|---|
|
|---|
SID Hervé France
| | Posts 663 28 May 2012 20:18
| Nixus Minimax wrote:
| Is this what you are talking about: MEMF_CHIP = "I want RAM where the custom chips have priority over the CPU" MEMF_FAST = "I want RAM where the CPU has priority over the custom chips" MEMF_SID = "I want RAM where first come, first serve" MEMF_ANY = "Don't care, just give me some RAM"
|
Yes it is and in a better way but with just a note, I would have preferred a more anonymous name... If we wishes to increase the attractiveness of the platform, then the software development must be helped and the previous uses of the term "anachronism" confirms the urgency of this need. This minor addition is not directly intended for current and former programmers but it is mainly for programmers of other platforms whose contributions have always been beneficial.
| |
Thomas Richter Germany
| | (MX-Board Owner) Posts 1425 28 May 2012 20:40
| SID Hervé wrote:
|
Nixus Minimax wrote:
| Is this what you are talking about: MEMF_CHIP = "I want RAM where the custom chips have priority over the CPU" MEMF_FAST = "I want RAM where the CPU has priority over the custom chips" MEMF_SID = "I want RAM where first come, first serve" MEMF_ANY = "Don't care, just give me some RAM" |
Yes it is and in a better way but with just a note, I would have preferred a more anonymous name... If we wishes to increase the attractiveness of the platform, then the software development must be helped and the previous uses of the term "anachronism" confirms the urgency of this need. This minor addition is not directly intended for current and former programmers but it is mainly for programmers of other platforms whose contributions have always been beneficial.
|
Well, there are several issues here. First, to answer your question whether it is possible to construct the memory such that the CPU has preference over the custom chip bus arbitration, my answer would be "not in general". There is custom chip DMA which requires a certain minimum bandwidth and which cannot be delayed - screen DMA, copper DMA, audio DMA, disk DMA. If there is not enough bandwidth because the CPU takes it all, then you would get screen, audio or data corruption, none of which is acceptable. There is also blitter DMA, which is not critical. Though for that we already have a mechanism to control the DMA priority (not exactly, but it could be used for that) - namely the "blitter nasty" flag. I also don't quite see why the priority should be dependent on the memory type. This type of coupling is not exactly correct - priority is task dependent, not memory dependent. That said, I don't see why the memory should not consist of several banks, such that custom chip access to bank A does not interfere with CPU access to bank B. But I don't see a good justification why custom chip access to bank B should be forbidden completely (as it is now - FAST MEM as bank B, and CHIP MEM as bank A) nor why there should be two banks. A much saner system would be one where we had a couple of memory banks and custom chip and CPU would not interfere or block each whenever the access goes to different banks. This would be a much more novel, more flexible and more forwards oriented system than the one we have.
| |
SID Hervé France
| | Posts 663 28 May 2012 22:40
| Thomas Richter wrote:
| There is custom chip DMA which requires a certain minimum bandwidth and which cannot be delayed - screen DMA, copper DMA, audio DMA, disk DMA. If there is not enough bandwidth because the CPU takes it all, then you would get screen, audio or data corruption, none of which is acceptable.
|
I agree, but I was hoping that with the help of the new features of bandwidth, these problems could be solved.
Thomas Richter wrote:
| I also don't quite see why the priority should be dependent on the memory type. This type of coupling is not exactly correct - priority is task dependent, not memory dependent.
|
It is not dependent on the memory type. I would say arbitration is done according to the user (CPU or chipset).
| |
Marcel Verdaasdonk Netherlands
| | Posts 3974 28 May 2012 23:02
| Okay here is my unbiased opinion as always having set banks is a step back to the days of the C64 and Atari 8bit machines. If i want to have the Disk DMA dump it's data at a address somewhere in chipmem I currently can do this wherever i please.(Spectrum spread, interesting when RAM is getting flaky)Next I hope Thomas uses a simple register where during boot up the address is written where the chipmem stops.(This could make it byte exact, if needed to!) Further more what SID proposed should be to some extend embedded in the memory controller in such a manner a programmer cannot access it. Why? Because they do not need to determine priority to memory access this is pure a part of the memory controller!!!
| |
Thomas Richter Germany
| | (MX-Board Owner) Posts 1425 29 May 2012 09:54
| Marcel Verdaasdonk wrote:
| Okay here is my unbiased opinion as always having set banks is a step back to the days of the C64 and Atari 8bit machines.
|
Probably I should more clear what I mean by "bank". I *no not mean* "write the high-order bits of the memory region that should be available to the custom chips into a magic memory address".I do mean: Memory appears as a continuous overall region to custom chips and the CPU with no need to distinguish between them. However, internally, memory is segmented into banks (each of which x K large) that can be addressed independently and have independent busses. If the custom chips access bank Y, no bandwidth limitations arise for bank X, if X != Y. So in other words, there is no need for "fast mem" and "chip mem", which is quite an anachronsim. In the simplest case, there are two banks (call them low and high, if you like, and identify low with chip and high with fast, if you like), but custom chips and CPU can access both. If the custom chips DMA from the low memory, memory transfer to the high memory is unconstraint and fast. If the custom chips access memory from the high region (new feature!) CPU access to the low region is fast and not hindered by DMA. Extend this from two banks to N banks,without having the need of storing or telling the hardware which bank you want to map in (as said, I'm speaking of a continuous addressing space) and you have a flexible system within which CPU and chips see a continuous memory region, can access the full region at once, but still do not block each other most of the time.
| |
Nixus Minimax Germany
| | Posts 272 29 May 2012 09:57
| Thomas Richter wrote:
| | There is custom chip DMA which requires a certain minimum bandwidth and which cannot be delayed - screen DMA, copper DMA, audio DMA, disk DMA. If there is not enough bandwidth because the CPU takes it all, then you would get screen, audio or data corruption, none of which is acceptable. |
Well, at least audio and disk DMA appear to me to be good examples for DMA that may be delayed (i.e. buffered). Their priority could depend on their buffer's fill level. Thus, if the buffer needs to get flushed (read access) or is almost empty (write access), the priority of the DMA will get promoted to above CPU priority and will remain lower than CPU priority else. I agree with the two of you that all this is a matter of hardware and should not be visible to the programmer.
| |
Nixus Minimax Germany
| | Posts 272 29 May 2012 10:03
| Thomas Richter wrote:
| | I do mean: Memory appears as a continuous overall region to custom chips and the CPU with no need to distinguish between them. However, internally, memory is segmented into banks (each of which x K large) that can be addressed independently and have independent busses. If the custom chips access bank Y, no bandwidth limitations arise for bank X, if X != Y. |
I think that is what many modern CPUs do: they have more than one memory bus (e.g. "HyperTransport") and thus can do several independent memory accesses at the same time. If you now have two or more CPU cores, you get exactly what you describe for a pair of CPU and a custom chip. And yes, this would be the best mode of implementation because it shows the least amount of hardware limitations to the programmer.
| |
Marcel Verdaasdonk Netherlands
| | Posts 3974 29 May 2012 17:37
| Dual channel is not what ThoR was talking about closest example i could find was MDRAM in which case i would have to agree ThoR is right.
| |
SID Hervé France
| | Posts 663 29 May 2012 19:52
| Thomas Richter wrote:
| A much saner system would be one where we had a couple of memory banks and custom chip and CPU would not interfere or block each whenever the access goes to different banks. This would be a much more novel, more flexible and more forwards oriented system than the one we have.
|
Thomas Richter wrote:
| I do mean: Memory appears as a continuous overall region to custom chips and the CPU with no need to distinguish between them. However, internally, memory is segmented into banks (each of which x K large) that can be addressed independently and have independent busses. If the custom chips access bank Y, no bandwidth limitations arise for bank X, if X != Y.So in other words, there is no need for "fast mem" and "chip mem", which is quite an anachronsim. In the simplest case, there are two banks (call them low and high, if you like, and identify low with chip and high with fast, if you like), but custom chips and CPU can access both. If the custom chips DMA from the low memory, memory transfer to the high memory is unconstraint and fast. If the custom chips access memory from the high region (new feature!) CPU access to the low region is fast and not hindered by DMA. Extend this from two banks to N banks,without having the need of storing or telling the hardware which bank you want to map in (as said, I'm speaking of a continuous addressing space) and you have a flexible system within which CPU and chips see a continuous memory region, can access the full region at once, but still do not block each other most of the time.
|
Should we consider it as a replacement and a loss of compatibility?
| |
Thomas Richter Germany
| | (MX-Board Owner) Posts 1425 29 May 2012 19:58
| SID Hervé wrote:
| Should we consider it as a replacement and a loss of compatibility?
|
In how far? In such a system, all memory could be designated as MEMF_CHIP. I'm not aware of an application that explicitly asked for MEMF_FAST (for what reason, actually?).
| |
Marcel Verdaasdonk Netherlands
| | Posts 3974 29 May 2012 20:57
| SID Hervé wrote:
| Should we consider it as a replacement and a loss of compatibility? |
It's always funny seeing people coming to the wrong conclusion. :PSID no offense intended. the more i read it over the more MDRAM comes to mind for me read it up and read ThoR's post again.
| |
SID Hervé France
| | Posts 663 29 May 2012 21:37
| Marcel Verdaasdonk wrote:
| read ThoR's post again.
|
Done.
| |
SID Hervé France
| | Posts 663 29 May 2012 21:41
| Thomas Richter wrote:
| In how far? In such a system, all memory could be designated as MEMF_CHIP. I'm not aware of an application that explicitly asked for MEMF_FAST (for what reason, actually?).
|
Although this question is slightly off topic, do you think the idea has a chance to be accepted for a future version of NatAmi?
| |
SID Hervé France
| | Posts 663 30 May 2012 19:47
| Sorry for the previous message, it is incomplete. Here is the full version : This idea of doing a software version leads me to suppose that the same approach could simplify the implementation of enhancements. CLICK HERE Assuming this is possible, do you think the idea has a chance to be accepted for a future version of NatAmi?
| |
|
|
|
|