Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC TDC 1ns 5cha - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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 TDC 1ns 5cha - Gateware
Commits
4e8dfa4b
Commit
4e8dfa4b
authored
Sep 03, 2018
by
Tomasz Wlostowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rtl: fixed arithmetic errors in tdc_ts_addsub
parent
b8c763a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
10 deletions
+4
-10
tdc_ts_addsub.vhd
hdl/rtl/tdc_ts_addsub.vhd
+4
-10
No files found.
hdl/rtl/tdc_ts_addsub.vhd
View file @
4e8dfa4b
...
...
@@ -6,7 +6,7 @@
-- Author : Tomasz Wlostowski
-- Company : CERN
-- Created : 2011-08-29
-- Last update: 2018-0
8-06
-- Last update: 2018-0
9-03
-- Platform : FPGA-generic
-- Standard : VHDL'93
-------------------------------------------------------------------------------
...
...
@@ -102,15 +102,9 @@ begin -- rtl
sums
(
0
)
.
seq
<=
a_i
.
seq
;
sums
(
0
)
.
slope
<=
a_i
.
slope
;
if
(
b_i
.
tai
(
31
)
=
'1'
)
then
-- TAI negative, we subtract
sums
(
0
)
.
frac
<=
signed
(
resize
(
unsigned
(
a_i
.
frac
)
-
unsigned
(
b_i
.
frac
),
16
)
);
sums
(
0
)
.
coarse
<=
resize
(
signed
(
a_i
.
coarse
),
sums
(
0
)
.
coarse
'length
)
-
resize
(
signed
(
b_i
.
coarse
),
sums
(
0
)
.
coarse
'length
);
else
sums
(
0
)
.
frac
<=
signed
(
resize
(
unsigned
(
a_i
.
frac
)
+
unsigned
(
b_i
.
frac
),
16
)
);
sums
(
0
)
.
coarse
<=
resize
(
signed
(
a_i
.
coarse
),
sums
(
0
)
.
coarse
'length
)
+
resize
(
signed
(
b_i
.
coarse
),
sums
(
0
)
.
coarse
'length
);
end
if
;
sums
(
0
)
.
frac
<=
signed
(
resize
(
unsigned
(
a_i
.
frac
),
16
)
+
resize
(
unsigned
(
b_i
.
frac
),
16
)
);
sums
(
0
)
.
coarse
<=
signed
(
resize
(
unsigned
(
a_i
.
coarse
),
sums
(
0
)
.
coarse
'length
)
+
resize
(
unsigned
(
b_i
.
coarse
),
sums
(
0
)
.
coarse
'length
));
else
pipe
(
0
)
<=
'0'
;
...
...
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