x393
1.0
FPGAcodeforElphelNC393camera
Main Page
+
Packages
Packages
+
Package Functions
All
Functions/Tasks/Always Construct
Variables
+
Design Unit List
Design Unit List
Design Units
Design Unit Hierarchy
+
Design Unit Members
+
All
1
2
3
5
7
8
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions/Tasks/Always Construct
_
a
c
e
f
g
l
p
r
s
t
w
+
Variables
1
2
3
5
7
8
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
File Members
+
All
c
d
s
u
+
Variables
c
d
s
u
•
All
Classes
Namespaces
Files
Functions
Variables
sim_clk_div.v
Go to the documentation of this file.
1
39
`timescale 1ns/1ps
40
41
module
sim_clk_div
#(
42
parameter
DIVISOR
=
5
43
) (
44
input
clk_in
,
45
input
en
,
46
output
clk_out
47
);
48
integer
cntr
=
0
;
49
reg
clk_out_r
=
0
;
50
assign
clk_out
= (
DIVISOR
==
1
) ?
clk_in
:
clk_out_r
;
51
always
@(
clk_in
)
if
(
en
)
begin
52
if
(
cntr
==
0
)
begin
53
cntr
=
DIVISOR
-
1
;
54
clk_out_r
= !
clk_out_r
;
55
end
else
begin
56
cntr
=
cntr
-
1
;
57
end
58
end
59
endmodule
60
sim_clk_div
Definition:
sim_clk_div.v:41
sim_clk_div.8810en
8810en
Definition:
sim_clk_div.v:45
sim_clk_div.8812cntr
8812cntrinteger
Definition:
sim_clk_div.v:48
sim_clk_div.8811clk_out
8811clk_out
Definition:
sim_clk_div.v:46
sim_clk_div.8808DIVISOR
8808DIVISOR5
Definition:
sim_clk_div.v:42
sim_clk_div.8813clk_out_r
8813clk_out_rreg
Definition:
sim_clk_div.v:49
sim_clk_div.8809clk_in
8809clk_in
Definition:
sim_clk_div.v:44
simulation_modules
sim_clk_div.v
Generated by
1.8.12