manili wrote:
Garth thanks for your replay.
Well there are some reasons to use caches :
1. First thing first this is a B.S. project and I should have something to represent
!
Quite valid.
Allow me to play "devil's advocate" though, so your answers will educate those of us who don't know caches.
Quote:
2. Each time, pipeline requests different number of op-codes/operands based on number of used op-codes/operands during the previous decode process. Normal memories cannot handle this kind of request.
Can it do more than one byte per memory cycle (or edge, as mentioned later) per memory port? It seems like with multi-port memory and the MMU (to translate virtual to physical addresses) onboard, a cache would provide no benefit. Or is it that the MMU is not fast enough?
Quote:
3. Currently my D-Cache has 4 groups of different ports (Effective Address, Read Data, Write Data, MMU). So I think doing the same with the main memory is not possible.
4. As I said before, my project is WISHBONE compatible. WISHBONE needs at least 3 clock cycles to RD/WR data so it's not a good idea to use memory directly.
Samuel Falvo, forum name kc5tja, who does not check in very often, is a professional programmer. He is a strong advocate of Wishbone. But is there any reason to put a small memory out on Wishbone instead of onboard? After all, we're not talking about more than a couple of megabytes, are we?
Quote:
5. I'm currently using one MMU, so we can extend it to support memory protection, virtual addressing and it will possible to support a much bigger main memory (I know that each process should stick to only 64KB).
The 6502 was originally designed for embedded control, not desktop computers, and even today mostly goes into embedded-control applications, many of them being realtime, meaning that a program must have
immediate, instant access to I/O. Make sure your memory protection does not prohibit this. Going through OS calls is absolutely not acceptable for this kind of application.
Quote:
Is it possible/reasonable to ask users/assembles to replace RTI with PLP + RTS ? Because I think it's impossible for the pipeline to handle this without unreasonable overload.
In addition to what Ed said, note that if there are multiple interrupts pending, doing PLP before RTS (or even RTI) will allow re-starting the ISR, possibly multiple times without unwinding its way out, using more stack space. Granted, going more than a few levels deep means there's simply not enough processing speed to handle the intended load.
BigEd wrote:
Garth, yes, there are still advantages to caches
- possibly the RAM space is more than 64k
That's partly what the '816 is for, and it also has the VMA and VDA outputs for cache use.
Quote:
- the caches can efficiently interface to SDRAM by using burst mode accesses
- the caches can insulate against a RAM system which serves other uses, such as DMA or video, or which needs time out to refresh.
How does that differ from dual-port RAM?
BTW, "replay" means to "play again." The word you want is "reply," with no "a," meaning "to answer."