Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 2cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DEL 1ns 2cha
Commits
d5cf7971
Commit
d5cf7971
authored
Jul 28, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clock frequency generics clean up
parent
9393a482
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
82 additions
and
79 deletions
+82
-79
DacsController.vhd
hdl/ffpg/rtl/DacsController.vhd
+4
-4
DelayController.vhd
hdl/ffpg/rtl/DelayController.vhd
+1
-1
FfpgCore.vhd
hdl/ffpg/rtl/FfpgCore.vhd
+1
-1
FfpgSlave.vhd
hdl/ffpg/rtl/FfpgSlave.vhd
+2
-2
pulseGeneratorTime.vhd
hdl/ffpg/rtl/pulseGeneratorTime.vhd
+2
-2
Config.svh
hdl/ffpg/sim/testbench/Config.svh
+1
-1
Testbench.sv
hdl/ffpg/sim/testbench/Testbench.sv
+1
-1
SvecTopFfpg.vhd
hdl/svec/rtl/SvecTopFfpg.vhd
+70
-67
No files found.
hdl/ffpg/rtl/DacsController.vhd
View file @
d5cf7971
...
...
@@ -6,7 +6,7 @@ use work.FfpgPkg.all;
entity
DacsController
is
generic
(
g_ClkFrequency
:
natural
-- input clock frequency in M
Hz
g_ClkFrequency
:
positive
-- input clock frequency in
Hz
);
port
(
Clk_ik
:
in
std_logic
;
...
...
@@ -36,7 +36,7 @@ architecture syn of DacsController is
return
Result
;
end
function
;
function
calculateSclkDivsel
(
ClkFrequency
,
DacFrequencyMax
:
natural
)
return
std_logic_vector
is
function
f_calculateSclkDivsel
(
ClkFrequency
,
DacFrequencyMax
:
positive
)
return
std_logic_vector
is
variable
Result
:
integer
;
begin
Result
:
=
log2
(
ClkFrequency
/
DacFrequencyMax
);
...
...
@@ -51,8 +51,8 @@ architecture syn of DacsController is
return
std_logic_vector
(
to_unsigned
(
Result
,
3
));
end
function
;
constant
c_DacFrequencyMax
:
natural
:
=
20
;
-- in M
Hz
constant
c_SclkDivsel
:
std_logic_vector
(
2
downto
0
)
:
=
calculateSclkDivsel
(
g_ClkFrequency
,
c_DacFrequencyMax
);
constant
c_DacFrequencyMax
:
positive
:
=
20
_
000
_
000
;
-- in
Hz
constant
c_SclkDivsel
:
std_logic_vector
(
2
downto
0
)
:
=
f_
calculateSclkDivsel
(
g_ClkFrequency
,
c_DacFrequencyMax
);
signal
Reset_nr
:
std_logic
;
signal
TriggerDacEn
,
VcxoDacEn
:
std_logic
;
...
...
hdl/ffpg/rtl/DelayController.vhd
View file @
d5cf7971
...
...
@@ -4,7 +4,7 @@ use ieee.numeric_std.all;
entity
DelayController
is
generic
(
g_ClkFrequency
:
real
-- input clock frequency in Hz
g_ClkFrequency
:
positive
-- input clock frequency in Hz
);
port
(
Clk_ik
:
in
std_logic
;
...
...
hdl/ffpg/rtl/FfpgCore.vhd
View file @
d5cf7971
...
...
@@ -15,7 +15,7 @@ use work.wishbone_pkg.all;
entity
FfpgCore
is
generic
(
g_ClkFrequency
:
natural
-- input clock frequency in M
Hz
g_ClkFrequency
:
positive
-- input clock frequency in
Hz
);
port
(
-- Wishbone connection
...
...
hdl/ffpg/rtl/FfpgSlave.vhd
View file @
d5cf7971
...
...
@@ -8,7 +8,7 @@ use work.wishbone_pkg.all;
entity
FfpgSlave
is
generic
(
g_ClkFrequency
:
natural
-- input clock frequency in M
Hz
g_ClkFrequency
:
positive
-- input clock frequency in
Hz
);
port
(
-- Wishbone connection
...
...
@@ -115,7 +115,7 @@ begin
----------------------------------
cDelayController
:
entity
work
.
DelayController
(
syn
)
generic
map
(
g_ClkFrequency
=>
real
(
g_ClkFrequency
)
*
1
.
0
e6
g_ClkFrequency
=>
g_ClkFrequency
)
port
map
(
Clk_ik
=>
Clk_ik
,
...
...
hdl/ffpg/rtl/pulseGeneratorTime.vhd
View file @
d5cf7971
...
...
@@ -4,7 +4,7 @@ use ieee.numeric_std.all;
entity
PulseGeneratorTime
is
generic
(
g_ClkFrequency
:
real
;
-- input clock frequency in Hz
g_ClkFrequency
:
positive
;
-- input clock frequency in Hz
g_PulseMinWidthInTime
:
time
-- minimal pulse width in [s]
);
port
(
...
...
@@ -17,7 +17,7 @@ end entity;
architecture
syn
of
PulseGeneratorTime
is
constant
c_ClkPeriod
:
time
:
=
(
1
.
0
sec
)
/
g_ClkFrequency
;
constant
c_ClkPeriod
:
time
:
=
(
1
.
0
sec
)
/
real
(
g_ClkFrequency
)
;
function
f_CalculatePulseClk
(
ClkPeriod
,
PulseMinWidthInTime
:
time
)
return
integer
is
variable
Result
:
integer
;
...
...
hdl/ffpg/sim/testbench/Config.svh
View file @
d5cf7971
...
...
@@ -2,7 +2,7 @@
`define
CONFIG_SVH
// in MHz
`define
CLK_FREQ 200
`define
CLK_FREQ 200
_000_000
`define
WB_ADDRESS_WIDTH 32
`define
WB_DATA_WIDTH 32
...
...
hdl/ffpg/sim/testbench/Testbench.sv
View file @
d5cf7971
...
...
@@ -7,7 +7,7 @@ import TestbenchPackage::*;
module
Testbench
;
parameter
c_ClkPeriod
=
1
000
/
`CLK_FREQ
;
parameter
c_ClkPeriod
=
1
e9
/
`CLK_FREQ
;
// in [ns]
bit
Clk_k
,
Reset_r
;
...
...
hdl/svec/rtl/SvecTopFfpg.vhd
View file @
d5cf7971
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment