There were the primary mistakes:
altsyncram_component.numwords_a = NUM_WORDS /2,
altsyncram_component.widthad_a = ADDR_SIZE - 1 , // *************************** 1 less address since we are now 16 bit
altsyncram_component.init_file_layout = "PORT_B", // *************** assign .mif file to layout 'B'
Ah, that's got it compiling again...
Too many other changes all at once. Before making these changes, did everything else work properly?
Like, why did 'PIPE_DELAY' go from the proper value of 7 down to 6 from the last version to this version?
Yes, it was working fine - the PIPE_DELAY error was because I'd fixed the x_in/x_out issue and changed PIPE_DELAY back to 7, but because of a work distraction here, I came back and got confused about the original value and changed it back to 6.
Noooooooooo. The x_in/x_out fixes the:
.bg_colour( GPU_HW_Control_regs[10] ),
.x_in( dly6_disp_x ),
.colour_mode_in( GPU_HW_Control_regs[12][2:0] ),
.x_in( dly
5_disp_x ),
Back to the proper:
.x_in( dly
6_disp_x ),
This bug had nothing to do with the 'PIPE_DELAY', which had the proper value of '7'.
The PIPE_DELAY went from 6 to 7 because the 'bitplane_to_raster' takes 1 clock cycle to create an output pixel where the older pixel character[~xsel] selection from the ram took 0 clock cycles.
Now, your garbage text, did you fix the 'addr[0]' so that the addr which selects the correct memory output byte is the same addr with the same byte we expect to receive from the altsyncram's memory output when the original address was fed in.
Remember, we are feeding 125 million new read addresses second. Non stop. The ram coming out keeps on changing 125 million times a second, even though it is 2 clocks behind. Take this info into consideration when selecting the high and low byte.
(You still have other errors as even the green seems impossible. I only re-wrote your code from the last version to what you were supposed to create, and it correctly worked with the 16 bit memory and 16 bit mux and 32 bit aux ports and I got perfect blue text.)
After the address generator, we will be modding the gpu_INTEL ram into a new wrapper module, running the the INTEL ram at 250MHz, making it's 2 ports into 4 ports at 125MHz. And, we will be multiplying the 'multiport_gpu_ram' module 3 fold making a 15 read address ports for 15 parallel pixel reads, plus the 1 host_ port. I hope you are up to the challenge. (We would need 1GHz 8 bit static ram to replicate this, not counting the palette memory which would double that as we might do the same 15 ports there for true multiple degrees of translucency between all layers instead of between 2 layers, then just transparent color 0 / vs non-transparent. Also in the lattice part, you will ran the ram at 500Mhz, in other words, you would need a 4GHz 8 bit static ram to replicate that display engine with it's 40 parallel read ports and 2x equivalent host_ ports.)