ijor / fx68k

FX68K 68000 cycle accurate SystemVerilog core
GNU General Public License v3.0
135 stars 31 forks source link

Optional BRAM-based register file on Altera #8

Open gyurco opened 3 years ago

gyurco commented 3 years ago

Tested on Atari ST and fpgagen, no problems found so far.

gyurco commented 3 years ago

Is this patch has a problem? Or totally unacceptable?

jotego commented 3 years ago

I have tested it and found no problems using the BRAM option.

ijor commented 3 years ago

Hi gyurco,

Sorry for the delay, but please bear with me, I need to check it thoroughly before merging your patch.

gyurco commented 3 years ago

No problem, just I was wondering if it's noticed. In the patch, no signal timings should changed, the original behaviour of availability of the register value at the same time as the address changed is preserved by giving negative clock to the BRAM blocks. Still no timing issues on FPGAGen, where the master clock is 56MHz.

gyurco commented 2 years ago

@ijor could you make a progress with the check? As without enabling the BRAM option, it doesn't change any behavior, it should be perfectly safe. The ugliness of the negative clock for the BRAM is only effective when FX68K_ALTERA_REGS is defined, so in the default case, the performance is not affected at all.

ijor commented 2 years ago

@ijor could you make a progress with the check? As without enabling the BRAM option, it doesn't change any behavior, it should be perfectly safe. The ugliness of the negative clock for the BRAM is only effective when FX68K_ALTERA_REGS is defined, so in the default case, the performance is not affected at all.

Sorry, not yet. I'm not concerned too much about the performance. As I told you over PM, even in the worst case, it might still be a reasonable compromise to trade speed for size in specific cases.

But there are a couple of other issues. One is that some enhancements I’m planning might require accessing multiple registers simultaneously. As you realize, that would not be possible if the registers are located in ram.

gyurco commented 2 years ago

Oh, more than two registers at a time? It's for some kind of supporting save-states?