ElEctric_EyE wrote:
Ok, so your CPU is running at 100MHz as is your SDRAM video controller. I assume the CPU is your original 8 bit version?
Yes, everything is running at 100 MHz. I've never tried running things at different clock frequencies, and honestly I have no idea how to do it, except in the "easy" cases where the clock domains can be separated by a dual port RAM. The core is a slightly modified version of the 8 bit original. I have removed a few cycles at the cost of an extra adder in the address calculator. Also, I moved the stack page into page zero. I didn't need so much zero page/stack, so now I have extra room for code.
Quote:
I would like to experiment with your SDRAM code
Attached. Note that the sdramif.v module is made for an 8 bit CPU. For the 65org16 core you'll need to modify a few things.
Code:
sdram_wr_data <= { DOH, DO };
sdram_addr <= { ABH, AB[7:0] };
Should be changed into:
Code:
sdram_wr_data <= DO;
sdram_addr <= AB[23:0];
And some of the signals need to be changed from 8 to 16 bit.
You can also remove this code here:
Code:
always @(posedge clk)
if( ctrl & WE )
case( AB[1:0] )
0: ABH[ 7:0] <= DO;
1: ABH[15:8] <= DO;
2: DOH <= DO;
endcase
By the way, I'm not too happy with the design of the sdramif module. It's a bit of a quick hack. It seems to work okay, but I would like to replace it with a cleaner design at some point.