What is likely to be synthesized with a very high value like the following?
Code: Select all
// timing parameters
parameter
HFRONT = 2, // front porch (+right border)
HVIDEO = 1024, // active video area
HSYNC = 2, // hsync
HBACK = 318; // back porch (+left border) :1346 horizontal pixels total 356
......
//horizontal & vertical delay using a multi-stage single bit shift register
parameter hvd = ((HFRONT + HVIDEO + HSYNC + HBACK) * 22) + 11; //22 scanlines + 11 pixel delay
reg [hvd:0] s;
wire q = s[hvd];
always @(posedge clk)
s <= { s[hvd-1:0], countflag }
......
......
//X & Y pixel counters
reg [9:0] X = 0;
reg [9:0] Y = 0;
always @(posedge clk) begin
if ( vstart | ( X == 1023 & Y == 767 )) begin
X <= 0;
Y <= 0;
end
if ( X == 1023 ) begin
Y <= Y + 1;
X <= 0;
end
else if ( q )
X <= X + 1;
end;EDIT: Functionally this works, but is adding to occupied slices and takes forever to synthesize. I guess I am on the wrong track here.