Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix timing closure issue on motor 208MHz PWM clock domain

  • Loading branch information...
commit ff002fd3e8ced2dcd3d3cdbba7f75281675a5956 1 parent 6e1593b
@bunnie authored
View
1  kovan1.srcs/sources_1/imports/kovan1/kovan.v
@@ -1254,6 +1254,7 @@ module kovan (
// - modify dim/bright settings for heartbeat to make it more apparent
// - fix DDR2 reset bug, core now runs instead of hanging in reset
// - fix LCDO_G7 pin missing in .UCF file
+ // - improve timing closure for 208 MHz motor register interface
/////// version FF.0001.0003 (log created 3/1/2012)
// - fix ADC bit width
View
7 kovan1.srcs/sources_1/imports/kovan1/robot_iface.v
@@ -267,9 +267,12 @@ module robot_iface(
reg pwm_clk_a;
reg [15:0] pwm_scaler;
wire pwmclk;
-
+ reg [15:0] mot_pwm_div_r;
+
always @(posedge clk_208MHz) begin
- if( (pwm_scaler > mot_pwm_div) || (&pwm_scaler) ) begin
+ mot_pwm_div_r <= mot_pwm_div; // decouple timing to local domain
+
+ if( (pwm_scaler > mot_pwm_div_r) || (&pwm_scaler) ) begin
pwm_scaler <= 0;
pwm_clk_a <= 1;
end else begin
Please sign in to comment.
Something went wrong with that request. Please try again.