x393
1.0
FPGAcodeforElphelNC393camera
mcont_common_chnbuf_reg.v
Go to the documentation of this file.
1
39
`timescale 1ns/1ps
40
41
module
mcont_common_chnbuf_reg
#(
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
47
input
ext_buf_rrefresh
,
48
input
ext_buf_page_nxt
,
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
);
55
reg
buf_chn_sel
;
56
always
@ (
posedge
clk
)
begin
57
if
(
rst
)
buf_chn_sel
<=
0
;
58
else
buf_chn_sel
<= (
ext_buf_rchn
==
CHN_NUMBER
) && !
ext_buf_rrefresh
;
59
60
if
(
rst
)
buf_done
<=
0
;
61
else
buf_done
<=
buf_chn_sel
&&
seq_done
;
62
63
if
(
rst
)
buf_run
<=
0
;
64
else
buf_run
<= (
ext_buf_rchn
==
CHN_NUMBER
) && !
ext_buf_rrefresh
&&
ext_buf_run
;
65
66
end
67
always
@ (
posedge
clk
)
page_nxt
<=
ext_buf_page_nxt
&& (
ext_buf_rchn
==
CHN_NUMBER
) && !
ext_buf_rrefresh
;
68
endmodule
69
mcont_common_chnbuf_reg.10663CHN_NUMBER
10663CHN_NUMBER0
Definition:
mcont_common_chnbuf_reg.v:42
mcont_common_chnbuf_reg.10674buf_chn_sel
10674buf_chn_selreg
Definition:
mcont_common_chnbuf_reg.v:55
mcont_common_chnbuf_reg.10673buf_run
reg 10673buf_run
Definition:
mcont_common_chnbuf_reg.v:53
mcont_common_chnbuf_reg
Definition:
mcont_common_chnbuf_reg.v:41
mcont_common_chnbuf_reg.10666ext_buf_rchn
[3:0] 10666ext_buf_rchn
Definition:
mcont_common_chnbuf_reg.v:46
mcont_common_chnbuf_reg.10669seq_done
10669seq_done
Definition:
mcont_common_chnbuf_reg.v:49
mcont_common_chnbuf_reg.10671buf_done
reg 10671buf_done
Definition:
mcont_common_chnbuf_reg.v:51
mcont_common_chnbuf_reg.10672page_nxt
reg 10672page_nxt
Definition:
mcont_common_chnbuf_reg.v:52
mcont_common_chnbuf_reg.10670ext_buf_run
10670ext_buf_run
Definition:
mcont_common_chnbuf_reg.v:50
mcont_common_chnbuf_reg.10664rst
10664rst
Definition:
mcont_common_chnbuf_reg.v:44
mcont_common_chnbuf_reg.10665clk
10665clk
Definition:
mcont_common_chnbuf_reg.v:45
mcont_common_chnbuf_reg.10668ext_buf_page_nxt
10668ext_buf_page_nxt
Definition:
mcont_common_chnbuf_reg.v:48
mcont_common_chnbuf_reg.10667ext_buf_rrefresh
10667ext_buf_rrefresh
Definition:
mcont_common_chnbuf_reg.v:47
util_modules
mcont_common_chnbuf_reg.v
Generated by
1.8.12