diff --git a/run_led.jdi b/run_led.jdi index 14cab09..66c132b 100644 --- a/run_led.jdi +++ b/run_led.jdi @@ -1,6 +1,6 @@ - + diff --git a/run_led.pin b/run_led.pin index f072b58..daecadf 100644 --- a/run_led.pin +++ b/run_led.pin @@ -120,7 +120,7 @@ RESERVED_INPUT : 49 : : : lt_on_off_ctrl_1 : 50 : output : 3.3-V LVTTL : : 3 : Y lt_on_off_ctrl_2 : 51 : output : 3.3-V LVTTL : : 3 : Y RESERVED_INPUT : 52 : : : : 3 : -tp5 : 53 : output : 3.3-V LVTTL : : 3 : N +RESERVED_INPUT : 53 : : : : 3 : RESERVED_INPUT : 54 : : : : 4 : RESERVED_INPUT : 55 : : : : 4 : VCCIO4 : 56 : power : : 3.3V : 4 : @@ -166,7 +166,7 @@ GND : 95 : gnd : : MSEL1 : 96 : : : : 6 : MSEL2 : 97 : : : : 6 : RESERVED_INPUT : 98 : : : : 6 : -RESERVED_INPUT : 99 : : : : 6 : +tp5 : 99 : output : 3.3-V LVTTL : : 6 : N RESERVED_INPUT : 100 : : : : 6 : ~ALTERA_nCEO~ / RESERVED_OUTPUT_OPEN_DRAIN : 101 : output : 3.3-V LVTTL : : 6 : N VCCINT : 102 : power : : 1.2V : : diff --git a/run_led.pof b/run_led.pof index 67ef784..7c431ad 100644 Binary files a/run_led.pof and b/run_led.pof differ diff --git a/run_led.sof b/run_led.sof index 9c35700..7f94862 100644 Binary files a/run_led.sof and b/run_led.sof differ diff --git a/run_led.sta.summary b/run_led.sta.summary index 43ae4b1..f5d9f65 100644 --- a/run_led.sta.summary +++ b/run_led.sta.summary @@ -3,63 +3,63 @@ TimeQuest Timing Analyzer Summary ------------------------------------------------------------ Type : Slow 1200mV 85C Model Setup 'clk' -Slack : -4.581 -TNS : -421.206 +Slack : -6.482 +TNS : -1403.642 Type : Slow 1200mV 85C Model Hold 'clk' -Slack : 0.433 +Slack : 0.432 TNS : 0.000 Type : Slow 1200mV 85C Model Recovery 'clk' -Slack : -1.252 -TNS : -31.619 +Slack : -2.126 +TNS : -454.792 Type : Slow 1200mV 85C Model Removal 'clk' -Slack : 0.694 +Slack : 2.018 TNS : 0.000 Type : Slow 1200mV 85C Model Minimum Pulse Width 'clk' Slack : -3.000 -TNS : -169.544 +TNS : -615.644 Type : Slow 1200mV 0C Model Setup 'clk' -Slack : -4.240 -TNS : -386.456 +Slack : -5.738 +TNS : -1270.445 Type : Slow 1200mV 0C Model Hold 'clk' Slack : 0.382 TNS : 0.000 Type : Slow 1200mV 0C Model Recovery 'clk' -Slack : -1.111 -TNS : -26.036 +Slack : -1.824 +TNS : -383.519 Type : Slow 1200mV 0C Model Removal 'clk' -Slack : 0.625 +Slack : 1.817 TNS : 0.000 Type : Slow 1200mV 0C Model Minimum Pulse Width 'clk' Slack : -3.000 -TNS : -169.544 +TNS : -615.644 Type : Fast 1200mV 0C Model Setup 'clk' -Slack : -1.267 -TNS : -110.384 +Slack : -2.296 +TNS : -387.010 Type : Fast 1200mV 0C Model Hold 'clk' Slack : 0.179 TNS : 0.000 Type : Fast 1200mV 0C Model Recovery 'clk' -Slack : -0.045 -TNS : -0.090 +Slack : -0.460 +TNS : -82.794 Type : Fast 1200mV 0C Model Removal 'clk' -Slack : 0.305 +Slack : 0.927 TNS : 0.000 Type : Fast 1200mV 0C Model Minimum Pulse Width 'clk' Slack : -3.000 -TNS : -151.106 +TNS : -544.450 ------------------------------------------------------------ diff --git a/source/top_module.v b/source/top_module.v index 2cf1dcc..7bfaf5d 100644 --- a/source/top_module.v +++ b/source/top_module.v @@ -61,6 +61,17 @@ module top_module ( wire [31:0] pluse_interval; //Âö³å¼ä϶ wire [31:0] pluse_shutter_delay; //¿ìÃÅÑÓ³Ù + reg trigger_input; + + always @(*) begin + if (stm32_pa4) begin + trigger_input <= !trigger_input0; + end else begin + trigger_input <= trigger_input0; + end + end + + zutils_pluse_width_detecter pluse_width_detecter0 ( .clk(clk), @@ -87,7 +98,7 @@ module top_module ( light_ctrl_pluse_generator light_ctrl_pluse_generator0 ( .clk(clk), .rst_n(rst_n), - .trigger(trigger_input0), + .trigger(trigger_input), .pluse_width(pluse_width), .pluse_interval(pluse_interval), .output_1(lt_on_off_ctrl_1), @@ -113,5 +124,7 @@ module top_module ( assign lt_intensity_3 = stm32_pc8; assign lt_intensity_4 = stm32_pc9; + assign tp8 = trigger_input; + endmodule diff --git a/source/zutils_pluse_width_detecter.v b/source/zutils_pluse_width_detecter.v index d7c449a..a2dc3ab 100644 --- a/source/zutils_pluse_width_detecter.v +++ b/source/zutils_pluse_width_detecter.v @@ -9,8 +9,8 @@ module zutils_pluse_width_detecter ( wire falling_edge; zutils_edge_detecter _signal_in ( - .clk(CLK), - .rst_n(RSTn), + .clk(clk), + .rst_n(rst_n), .in_signal(in_signal), .in_signal_rising_edge(rising_edge), .in_signal_falling_edge(falling_edge) @@ -19,8 +19,8 @@ module zutils_pluse_width_detecter ( reg [31:0] pluse_width_cnt; reg state; - always @(posedge CLK or negedge RSTn) begin - if (!RSTn) begin + always @(posedge clk or negedge rst_n) begin + if (!rst_n) begin in_signal_pluse_width <= 1; pluse_width_cnt <= 1; state <= 0;