Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
SPEC7
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
5
Issues
5
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Projects
SPEC7
Commits
8dd8f713
Commit
8dd8f713
authored
Aug 30, 2022
by
Pascal Bos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Start counting from 2000 instead of 1970.
Gave credit where credit was due.
parent
63951dff
Pipeline
#3915
failed with stage
in 2 minutes and 7 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
spec7_wr_ref_top.vhd
hdl/top/spec7_ref_design/spec7_wr_ref_top.vhd
+1
-1
wr_irigb_conv.vhd
hdl/top/spec7_ref_design/wr_irigb_conv.vhd
+6
-5
No files found.
hdl/top/spec7_ref_design/spec7_wr_ref_top.vhd
View file @
8dd8f713
...
...
@@ -82,7 +82,7 @@ entity spec7_wr_ref_top is
g_simulation
:
integer
:
=
0
;
g_use_pps_in
:
string
:
=
"single"
;
g_refclk_tune_pos_slope
:
boolean
:
=
TRUE
;
g_irig_b_enable
:
boolean
:
=
FALS
E
g_irig_b_enable
:
boolean
:
=
TRU
E
);
port
(
---------------------------------------------------------------------------`
...
...
hdl/top/spec7_ref_design/wr_irigb_conv.vhd
View file @
8dd8f713
...
...
@@ -6,6 +6,7 @@
-------------------------------------------------------------------------------
-- File : wr_irigb_conf.vhd
-- Author(s) : Pascal Bos <bosp@nikhef.nl>
-- Author(s) : Bas Jansweijer
-- Company : Nikhef
-- Created : 2021-04-29
-- Last update: 2021-05-04
...
...
@@ -211,7 +212,7 @@ pps_trigger <= '1' when pps_i = '1' and pps_reg = '0' else '0';
-- ______ ___________ _________________
-- --------->| |---------------->| |-------------->| Multiply by 4 |------------------------------------------
-- Days | +365 | | DIVIDE BY |(Answer) | (bit shift 2) | _|_ _|_ _|_ _|_
-- | | | 1461 | |_________________| |+ 0|-->year|+ 1|-->year|+ 2|-->year|+ 3|-->year
-- | | | 1461 | |_________________| |+ 0|-->year|+ 1|-->year|+ 2|-->year|+ 3|-->year
(+29 years) (to start in 2000 instead of 1969)
-- |______| | |------------ ________ |___| |___| |___| |___|
-- | |(Remainder) | / <365 |-----------0 | | |
-- |___________| | / | | | | |
...
...
@@ -310,16 +311,16 @@ begin
remaining_days
:
=
unsigned
(
remainders
(
3
));
block_4_years
:
=
unsigned
(
quotients
(
3
));
if
remaining_days
<
365
then
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
29
);
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
-
1
);
days
<=
std_logic_vector
(
remaining_days
(
8
downto
0
)
+
1
);
elsif
remaining_days
<
730
then
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
3
0
);
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
0
);
days
<=
std_logic_vector
(
remaining_days
(
8
downto
0
)
-365
+
1
);
elsif
remaining_days
<
1095
then
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
3
1
);
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
1
);
days
<=
std_logic_vector
(
remaining_days
(
8
downto
0
)
-730
+
1
);
else
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
3
2
);
years
<=
std_logic_vector
((
block_4_years
(
37
downto
0
)
&
"00"
)
+
2
);
days
<=
std_logic_vector
(
remaining_days
(
8
downto
0
)
-1095
+
1
);
end
if
;
all_rdy
(
3
)
:
=
'1'
;
...
...
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