ts_external<=ts_external_m&&triggered_mode_r;// internal will still use common timestamp made for sending
ts_external<=ts_external_m&&triggered_mode_r;// internal will still use common timestamp made for sending
if(mrst)input_use<=0;
if(mrst)input_use<=0;
...
@@ -472,10 +470,12 @@ module camsync393 #(
...
@@ -472,10 +470,12 @@ module camsync393 #(
input_use<=0;
input_use<=0;
input_pattern<=0;
input_pattern<=0;
pre_input_use_intern<=1;// use internal source for triggering
pre_input_use_intern<=1;// use internal source for triggering
// input_use_cam <= 0;
endelseif(set_trig_src_w)begin
endelseif(set_trig_src_w)begin
input_use<=input_use_w;
input_use<=input_use_w;
input_pattern<=input_pattern_w;
input_pattern<=input_pattern_w;
pre_input_use_intern<=(input_use_w==0);// use internal source for triggering
pre_input_use_intern<=(input_use_w==0)&&(cmd_data[23:20]==0);// use internal source for triggering
// input_use_cam <= cmd_data[23:20]; // use camera frame sync for triggering
end
end
if(set_trig_delay0_w)begin
if(set_trig_delay0_w)begin
...
@@ -521,7 +521,6 @@ module camsync393 #(
...
@@ -521,7 +521,6 @@ module camsync393 #(
start_en<=en&&(repeat_period[31:0]!=0);
start_en<=en&&(repeat_period[31:0]!=0);
// if (!en) rep_en <= 0;
if(mrst)rep_en<=0;
if(mrst)rep_en<=0;
elseif(set_period)rep_en<=!high_zero;
elseif(set_period)rep_en<=!high_zero;
...
@@ -547,7 +546,6 @@ module camsync393 #(
...
@@ -547,7 +546,6 @@ module camsync393 #(
// request master timestamp at start if it is sent out or at receive (if it is not). ts_snd_en_pclk should be 0 if incoming sync does not have timestamps
// request master timestamp at start if it is sent out or at receive (if it is not). ts_snd_en_pclk should be 0 if incoming sync does not have timestamps
// ~(ext_int_mode_pclk?(10'b1 << CAMSYNC_GPIO_EXT_IN):10'b0)) == 10'b0); // disable external trigger in line
// trigger_condition_mask_w is @ mclk, but input signal is asynchronous too, so filtering is needed anyway)
trigger_condition<=(|trigger_condition_mask_w)&&(((gpio_in[9:0]^input_pattern[9:0])&trigger_condition_mask_w)==10'b0);// disable external trigger in line
trigger_condition<=(|trigger_condition_mask_w)&&(((gpio_in[9:0]^input_pattern[9:0])&trigger_condition_mask_w)==10'b0);// disable external trigger in line