x393
1.0
FPGAcodeforElphelNC393camera
mcntrl_1kx32r.v
Go to the documentation of this file.
1
40
`timescale 1ns/1ps
41
42
module
mcntrl_1kx32r
(
43
input
ext_clk
,
44
input
[
9
:
0
]
ext_raddr
,
// read address
45
input
ext_rd
,
// read port enable
46
input
ext_regen
,
// output register enable
47
output
[
31
:
0
]
ext_data_out
,
// data out
48
49
input
wclk
,
// !mclk (inverted)
50
input
[
1
:
0
]
wpage_in
,
// will register to wclk, input OK with mclk
51
input
wpage_set
,
// set internal read page to rpage_in
52
input
page_next
,
// advance to next page (and reset lower bits to 0)
53
output
[
1
:
0
]
page
,
// current inernal page
54
input
we
,
// write port enable (also increment write buffer address)
55
input
[
63
:
0
]
data_in
// data in
56
);
57
reg
[
1
:
0
]
page_r
;
58
reg
[
6
:
0
]
waddr
;
59
assign
page
=
page_r
;
60
always
@ (
posedge
wclk
)
begin
61
62
if
(
wpage_set
)
page_r
<=
wpage_in
;
63
else
if
(
page_next
)
page_r
<=
page_r
+
1
;
64
65
if
(
page_next
||
wpage_set
)
waddr
<=
0
;
66
else
if
(
we
)
waddr
<=
waddr
+
1
;
67
end
68
ram_512x64w_1kx32r
#(
69
.
REGISTERS
(
1
)
70
)
ram_512x64w_1kx32r_i
(
71
.
rclk
(
ext_clk
),
// input
72
.
raddr
(
ext_raddr
),
// input[9:0]
73
.
ren
(
ext_rd
),
// input
74
.
regen
(
ext_regen
),
// input
75
.
data_out
(
ext_data_out
),
// output[31:0]
76
.
wclk
(
wclk
),
// input - OK, negedge mclk
77
.
waddr
({
page
,
waddr
}),
// input[8:0] @negedge mclk
78
.
we
(
we
),
// input @negedge mclk
79
.
web
(
8'hff
),
// input[7:0]
80
.
data_in
(
data_in
)
// input[63:0] @negedge mclk
81
);
82
endmodule
83
mcntrl_1kx32r.5158ext_regen
5158ext_regen
Definition:
mcntrl_1kx32r.v:46
mcntrl_1kx32r.5165we
5165we
Definition:
mcntrl_1kx32r.v:54
ram_512x64w_1kx32r.11851ren
11851ren
Definition:
ram_512x64w_1kx32r.v:87
ram_512x64w_1kx32r.11858data_in
[63:0] 11858data_in
Definition:
ram_512x64w_1kx32r.v:95
mcntrl_1kx32r.5161wpage_in
[1:0] 5161wpage_in
Definition:
mcntrl_1kx32r.v:50
mcntrl_1kx32r.5156ext_raddr
[ 9:0] 5156ext_raddr
Definition:
mcntrl_1kx32r.v:44
ram_512x64w_1kx32r.11854wclk
11854wclk
Definition:
ram_512x64w_1kx32r.v:91
mcntrl_1kx32r.5163page_next
5163page_next
Definition:
mcntrl_1kx32r.v:52
ram_512x64w_1kx32r.11849rclk
11849rclk
Definition:
ram_512x64w_1kx32r.v:85
mcntrl_1kx32r.ram_512x64w_1kx32r
ram_512x64w_1kx32r_i ram_512x64w_1kx32r
Definition:
mcntrl_1kx32r.v:68
ram_512x64w_1kx32r.11850raddr
[ 9:0] 11850raddr
Definition:
ram_512x64w_1kx32r.v:86
mcntrl_1kx32r.5168waddr
5168waddrreg[6:0]
Definition:
mcntrl_1kx32r.v:58
mcntrl_1kx32r.5155ext_clk
5155ext_clk
Definition:
mcntrl_1kx32r.v:43
ram_512x64w_1kx32r.11855waddr
[ 8:0] 11855waddr
Definition:
ram_512x64w_1kx32r.v:92
ram_512x64w_1kx32r.11853data_out
[31:0] 11853data_out
Definition:
ram_512x64w_1kx32r.v:89
ram_512x64w_1kx32r.11856we
11856we
Definition:
ram_512x64w_1kx32r.v:93
mcntrl_1kx32r.5160wclk
5160wclk
Definition:
mcntrl_1kx32r.v:49
mcntrl_1kx32r.5157ext_rd
5157ext_rd
Definition:
mcntrl_1kx32r.v:45
mcntrl_1kx32r.5159ext_data_out
[31:0] 5159ext_data_out
Definition:
mcntrl_1kx32r.v:47
mcntrl_1kx32r.5162wpage_set
5162wpage_set
Definition:
mcntrl_1kx32r.v:51
mcntrl_1kx32r.5164page
[1:0] 5164page
Definition:
mcntrl_1kx32r.v:53
ram_512x64w_1kx32r.11857web
[ 7:0] 11857web
Definition:
ram_512x64w_1kx32r.v:94
mcntrl_1kx32r.5166data_in
[63:0] 5166data_in
Definition:
mcntrl_1kx32r.v:55
ram_512x64w_1kx32r.11852regen
11852regen
Definition:
ram_512x64w_1kx32r.v:88
mcntrl_1kx32r
Definition:
mcntrl_1kx32r.v:42
mcntrl_1kx32r.5167page_r
5167page_rreg[1:0]
Definition:
mcntrl_1kx32r.v:57
memctrl
mcntrl_1kx32r.v
Generated by
1.8.12