Skip to content

Commit

Permalink
pid is mostly connected
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh S committed Dec 22, 2012
1 parent 81d9a0d commit f88902b
Show file tree
Hide file tree
Showing 5 changed files with 229 additions and 90 deletions.
7 changes: 7 additions & 0 deletions bemf_update.v
Expand Up @@ -9,6 +9,7 @@ module bemf_update(
input [19:0] bemf_calib_in, input [19:0] bemf_calib_in,
input clk, input clk,
output [19:0] bemf_out, output [19:0] bemf_out,
output [19:0] bemf_vel_out,
output [1:0] mot_sel_out, output [1:0] mot_sel_out,
output out_valid output out_valid
); );
Expand Down Expand Up @@ -62,6 +63,9 @@ module bemf_update(
reg [19:0] bemf_in_0 = 20'd0; reg [19:0] bemf_in_0 = 20'd0;
reg [19:0] bemf_in_1 = 20'd0; reg [19:0] bemf_in_1 = 20'd0;



reg vel_out_3 = 20'd0;

always @ (posedge clk) begin always @ (posedge clk) begin


// pipeline stage 0: load inputs // pipeline stage 0: load inputs
Expand Down Expand Up @@ -96,6 +100,8 @@ module bemf_update(




// pipeline stage 3: integrated the calibrated value // pipeline stage 3: integrated the calibrated value

vel_out_3 <= bemf_integr_in_a_r;
bemf_out_r <= bemf_integr_out; bemf_out_r <= bemf_integr_out;
in_valid_3 <= in_valid_2; in_valid_3 <= in_valid_2;
mot_sel_in_3 <= mot_sel_in_2; mot_sel_in_3 <= mot_sel_in_2;
Expand All @@ -105,5 +111,6 @@ module bemf_update(
assign bemf_out = bemf_out_r; assign bemf_out = bemf_out_r;
assign out_valid = in_valid_3; assign out_valid = in_valid_3;
assign mot_sel_out = mot_sel_in_3; assign mot_sel_out = mot_sel_in_3;
assign bemf_vel_out = vel_out_3;


endmodule endmodule
Binary file modified kovan.bit
Binary file not shown.

0 comments on commit f88902b

Please sign in to comment.