option #1
module line_generator (
input logic clk,
input logic reset, // loads the numbers and begins drawing the line.
input logic signed [11:0] X [0:3],
input logic signed [11:0] Y [0:3],
input logic [1:0] sel_a, // selects which X&Y for the beginning of the line.
input logic [1:0] sel_b, // selects which X&Y for the ending of the line. If sel_A&B are equal,
// or different but the stored coordinates match, no line drawn, just the
// output should immediately draw 1 pixel at those coordinates.
input logic ena_stop_ypos,
input logic signed [11:0] stop_ypos,
output logic signed [11:0] X_coord,
output logic signed [11:0] Y_coord,
output logic pixel_data_rdy,
output logic ypos_stopped,
output logic line_complete
);
option #2
module line_generator (
input logic clk,
input logic reset, // loads the numbers and begins drawing the line.
input logic signed [11:0] aX,
input logic signed [11:0] aY,
input logic signed [11:0] bX,
input logic signed [11:0] bY,
input logic ena_stop_ypos,
input logic signed [11:0] stop_ypos,
output logic signed [11:0] X_coord,
output logic signed [11:0] Y_coord,
output logic pixel_data_rdy,
output logic ypos_stopped,
output logic line_complete
);
Go with option #2 please.
The module's inputs just have the 'SELA/B' at the input port.
This makes like easier to tie the top 2 linegens' outputs into the third linegen's single A/B inputs.