Ok, you can change your line:
if ( cmd_ready && ~geo_run && !draw_busy ) begin // when the cmd_read input is high and the geometry unit geo_run is not running, execute the following command input
To:
if ( cmd_ready && ~geo_run && !(draw_busy && draw_cmd_tx) ) begin // when the cmd_read input is high and the geometry unit geo_run is not running, execute the following command input
All this has done is if after pulsing the 'draw_cmd_tx' for 1 clock, or the draw_busy just went high after the draw_cmd_tx' has ended, the geometry_xy_plotter can still receive new commands like setup x/y coordinates which do not get transmitted to the pixel writer, so those commands are still free to be run.
Also, let's see you make a cheap addition which will prevent the 'draw_cmd_tx' from going high when the drawing coordinates are outside the minimum and maximum screen view area. Show a functional test. (This one should be easy peasy)
Next, the pixel_address_generator.sv
This module sits in-between the geometry_xy_plotter.sv and pixel_writer.sv.
Like I said in my last post, it takes in the draw command, holds / intercepts the commands with registers settings it uses itself to calculate a memory address (2 of them, normal write pixel and read pixel), pixel bitplane type & pixel location on the bitplane, and passes the write / read command with pixel bitplane type and color to the next pixel_writer.sv module.
Let's see how you would begin this module. Remember the commands which will be fed through this module:
// AUX=0 : Do nothing
// AUX=1 : Write pixel, : 31:24 color : 23:12 Y coordinates : 11:0 X coordinates
// AUX=2 : Write pixel with color 0 mask, : 31:24 color : 23:12 Y coordinates : 11:0 X coordinates
// AUX=3 : Write from read pixel, : 31:24 ignored : 23:12 Y coordinates : 11:0 X coordinates
// AUX=4 : Write from read pixel with color 0 mask, : 31:24 ignored : 23:12 Y coordinates : 11:0 X coordinates
// AUX=6 : Read source pixel, : 31:24 ignored : 23:12 Y coordinates : 11:0 X coordinates
// AUX=7 : Set Truecolor pixel color : 31:24 8 bit alpha blend mix value : bits 23:0 hold RGB 24 bit color
// Use function Aux3/4 to draw this color, only works if the destination is set to 16 bit true-color mode
// AUX=10 ; Resets the Write Pixel collision counter : 31:24 sets transparent masked out color : bits 23:0 in true color mode, this holds RGB 24 bit mask color, in 8 bit mode, this allows for 3 additional transparent colors
// AUX=11 ; Resets the Write from read pixel collision counter : 31:24 sets transparent masked out color : bits 23:0 in true color mode, this holds RGB 24 bit mask color, in 8 bit mode, this allows for 3 additional transparent colors
// AUX=12 : Set destination raster width in bytes : 15:0 holds destination raster image width in #bytes so the proper memory address can be calculated from the X&Y coordinates
// AUX=13 : Set source raster width in bytes, : 15:0 holds source raster image width in #bytes so the proper memory address can be calculated from the X&Y coordinates
// AUX=14 : Set destination mem address, : 31:24 bitplane mode : 23:0 hold destination base memory addres for write pixel
// AUX=15 : Set source mem address, : 31:24 bitplane mode : 23:0 hold the source base memory address for read source pixel
Now choose output buss which can drive the pixel_writer.sv.
Like mem address, bitplane size, read/write, color. In fact, make it another 36bit pixel_cmd bus with a 'pixel_cmd_rdy' and decide what the structure of the bits within will contain with 16 possible functions.
Let's see how your pixel_address_generator.sv will begin.
I have time now to work on the new data_mux_geo.sv.
----------------------------------------------------------------------
Maybe we should move :
' 31:24 bitplane mode ' in aux 14&15 into the top of aux 12&13. This way, there is more space a larger address for future growth.
----------------------------------------------------------------------