-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtextGeneration.sv.bak
More file actions
24 lines (23 loc) · 985 Bytes
/
textGeneration.sv.bak
File metadata and controls
24 lines (23 loc) · 985 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
module textGeneration(input clk, input reset,
input [6:0] ascii_In,
input [9:0] x_desired, y_desired,
input [9:0] x,y,
output reg [6:0] asciiData,
output reg displayContents);
always @* begin
// Buffer the ASCII input to the output
asciiData = ascii_In;
// Determine if the current position is within the desired X range
if (x >= x_desired && x < (x_desired + 10'd16)) begin
// Determine if the current position is within the desired Y range
if (y >= y_desired && y < (y_desired + 10'd32)) begin
// Set displayContents to 1 if both horizontal and vertical conditions are met
displayContents <= 1;
end else begin
displayContents <= 0;
end
end else begin
displayContents <= 0;
end
end
endmodule