x393  1.0
FPGAcodeforElphelNC393camera
mcont_common_chnbuf_reg.v
Go to the documentation of this file.
1 
39 `timescale 1ns/1ps
40 
42  parameter CHN_NUMBER=0
43 )(
44  input rst,
45  input clk,
46  input [3:0] ext_buf_rchn, // ==run_chn_d valid 1 cycle ahead of ext_buf_rd!, maybe not needed - will be generated externally
49  input seq_done, // sequence done
50  input ext_buf_run,
51  output reg buf_done, // sequence done for the specified channel
52  output reg page_nxt,
53  output reg buf_run
54 );
56  always @ (posedge clk) begin
57  if (rst) buf_chn_sel <= 0;
59 
60  if (rst) buf_done <= 0;
61  else buf_done <= buf_chn_sel && seq_done;
62 
63  if (rst) buf_run <= 0;
65 
66  end
68 endmodule
69