summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2016-11-04 23:15:50 (GMT)
committerH. Peter Anvin <hpa@zytor.com>2016-11-04 23:15:50 (GMT)
commit2f3ee5665d1dc7190cce4c61fde28e01dc49679b (patch)
tree100d624a08deb6d6f18140c4674071043b0329a7
parent5a17143b6877eaaef681bc559731e0cf96073cef (diff)
downloadabc80-2f3ee5665d1dc7190cce4c61fde28e01dc49679b.zip
abc80-2f3ee5665d1dc7190cce4c61fde28e01dc49679b.tar.gz
abc80-2f3ee5665d1dc7190cce4c61fde28e01dc49679b.tar.bz2
abc80-2f3ee5665d1dc7190cce4c61fde28e01dc49679b.tar.xz
display.v: use the stabilizer for fgctl_q
Now when we have a generic stabilizer, use it to stabilize fgctl_q. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--display.v14
1 files changed, 5 insertions, 9 deletions
diff --git a/display.v b/display.v
index 10e4f23..c1ec19d 100644
--- a/display.v
+++ b/display.v
@@ -97,8 +97,7 @@ module display (
reg prefetch; // True for the prefetch character position
// Fine Graphics control
- wire [7:0] v_fgctl; // Synchronized version of fg_ctl
- reg [7:0] fgctl_q; // Latched version of fg_ctl
+ wire [7:0] fgctl_q; // Latched version of fg_ctl
reg [1:0] fgpixel; // One fg pixel from FIFO
// Block graphics data
@@ -142,9 +141,10 @@ module display (
synchronize
width_sync (.reset(1'b0), .clk(clk), .d(width), .q(v_width));
- // Synchronize fg_ctl input
- synchronize #(.width(8))
- fg_ctl_sync (.reset(1'b0), .clk(clk), .d(fg_ctl), .q(v_fgctl));
+ // Synchronize fg_ctl input, update during vsync only
+ synchronize #(.width(8), .stabilize(1))
+ fg_ctl_sync (.reset(1'b0), .clk(clk), .enable (~video_y),
+ .d(fg_ctl), .q(fgctl_q));
// Should we advance the character pixel?
// We need to always advance at full speed during prefetch, or
@@ -225,10 +225,6 @@ module display (
wire [3:0] fg_argb;
always @(posedge clk)
- if ( ~yvideo ) // Only change mode during vertical blank
- fgctl_q <= v_fgctl;
-
- always @(posedge clk)
if (~x[0])
fgpixel <= fg_data;