x393
1.0
FPGAcodeforElphelNC393camera
mcont_to_chnbuf_reg.v
Go to the documentation of this file.
1
39
`timescale 1ns/1ps
40
41
module
mcont_to_chnbuf_reg
#(
42
parameter
CHN_NUMBER
=
0
43
)(
44
input
rst
,
45
input
clk
,
46
input
ext_buf_wr
,
47
input
ext_buf_wpage_nxt
,
48
input
[
3
:
0
]
ext_buf_wchn
,
//
49
input
ext_buf_wrefresh
,
50
input
ext_buf_wrun
,
51
input
[
63
:
0
]
ext_buf_wdata
,
// valid with ext_buf_wr
52
output
reg
buf_wr_chn
,
// @ negedge mclk
53
output
reg
buf_wpage_nxt_chn
,
// @ negedge mclk
54
output
reg
buf_run
,
// @ negedge mclk
55
output
reg
[
63
:
0
]
buf_wdata_chn
// @ negedge mclk
56
);
57
reg
buf_chn_sel
;
58
reg
rst_nclk
=
1
;
59
always
@ (
negedge
clk
)
rst_nclk
<=
rst
;
60
always
@ (
negedge
clk
)
begin
61
if
(
rst_nclk
)
buf_chn_sel
<=
0
;
62
else
buf_chn_sel
<= (
ext_buf_wchn
==
CHN_NUMBER
) && !
ext_buf_wrefresh
;
63
64
if
(
rst_nclk
)
buf_wr_chn
<=
0
;
65
else
buf_wr_chn
<=
buf_chn_sel
&&
ext_buf_wr
;
66
67
if
(
rst_nclk
)
buf_run
<=
0
;
68
else
buf_run
<= (
ext_buf_wchn
==
CHN_NUMBER
) && !
ext_buf_wrefresh
&&
ext_buf_wrun
;
69
end
70
71
always
@ (
negedge
clk
)
begin
72
buf_wpage_nxt_chn
<=
ext_buf_wpage_nxt
&& (
ext_buf_wchn
==
CHN_NUMBER
) && !
ext_buf_wrefresh
;
73
end
74
75
always
@ (
negedge
clk
)
if
(
buf_chn_sel
&&
ext_buf_wr
)
begin
76
buf_wdata_chn
<=
ext_buf_wdata
;
77
end
78
endmodule
79
mcont_to_chnbuf_reg.10691rst
10691rst
Definition:
mcont_to_chnbuf_reg.v:44
mcont_to_chnbuf_reg.10694ext_buf_wpage_nxt
10694ext_buf_wpage_nxt
Definition:
mcont_to_chnbuf_reg.v:47
mcont_to_chnbuf_reg.10702buf_wdata_chn
reg [63:0] 10702buf_wdata_chn
Definition:
mcont_to_chnbuf_reg.v:55
mcont_to_chnbuf_reg.10693ext_buf_wr
10693ext_buf_wr
Definition:
mcont_to_chnbuf_reg.v:46
mcont_to_chnbuf_reg.10697ext_buf_wrun
10697ext_buf_wrun
Definition:
mcont_to_chnbuf_reg.v:50
mcont_to_chnbuf_reg.10703buf_chn_sel
10703buf_chn_selreg
Definition:
mcont_to_chnbuf_reg.v:57
mcont_to_chnbuf_reg.10700buf_wpage_nxt_chn
reg 10700buf_wpage_nxt_chn
Definition:
mcont_to_chnbuf_reg.v:53
mcont_to_chnbuf_reg.10699buf_wr_chn
reg 10699buf_wr_chn
Definition:
mcont_to_chnbuf_reg.v:52
mcont_to_chnbuf_reg.10695ext_buf_wchn
[3:0] 10695ext_buf_wchn
Definition:
mcont_to_chnbuf_reg.v:48
mcont_to_chnbuf_reg.10690CHN_NUMBER
10690CHN_NUMBER0
Definition:
mcont_to_chnbuf_reg.v:42
mcont_to_chnbuf_reg.10704rst_nclk
10704rst_nclkreg
Definition:
mcont_to_chnbuf_reg.v:58
mcont_to_chnbuf_reg.10698ext_buf_wdata
[63:0] 10698ext_buf_wdata
Definition:
mcont_to_chnbuf_reg.v:51
mcont_to_chnbuf_reg.10692clk
10692clk
Definition:
mcont_to_chnbuf_reg.v:45
mcont_to_chnbuf_reg.10701buf_run
reg 10701buf_run
Definition:
mcont_to_chnbuf_reg.v:54
mcont_to_chnbuf_reg.10696ext_buf_wrefresh
10696ext_buf_wrefresh
Definition:
mcont_to_chnbuf_reg.v:49
mcont_to_chnbuf_reg
Definition:
mcont_to_chnbuf_reg.v:41
util_modules
mcont_to_chnbuf_reg.v
Generated by
1.8.12