Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
STITCH
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Pascal Engeler
STITCH
Commits
239a98af
Commit
239a98af
authored
6 months ago
by
Pascal Engeler
Browse files
Options
Downloads
Patches
Plain Diff
Added unwrapper, hooked components up correctly
parent
72cb76fd
No related branches found
No related tags found
1 merge request
!2
Resolve "Distance wrapping invalidates lock sum"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stitch_project/stitch/Stitch.vhd
+25
-2
25 additions, 2 deletions
stitch_project/stitch/Stitch.vhd
with
25 additions
and
2 deletions
stitch_project/stitch/Stitch.vhd
+
25
−
2
View file @
239a98af
...
@@ -107,6 +107,9 @@ signal iLockInAccumulator_dataSin : STD_LOGIC_VECTOR(63 downto 0);
...
@@ -107,6 +107,9 @@ signal iLockInAccumulator_dataSin : STD_LOGIC_VECTOR(63 downto 0);
signal
iLockInAccumulator_n_samples
:
STD_LOGIC_VECTOR
(
31
downto
0
);
signal
iLockInAccumulator_n_samples
:
STD_LOGIC_VECTOR
(
31
downto
0
);
signal
iLockInAccumulator_idle
:
STD_LOGIC
;
signal
iLockInAccumulator_idle
:
STD_LOGIC
;
signal
iDistanceUnwrapper_distance_out
:
STD_LOGIC_VECTOR
(
24
downto
0
);
signal
iDistanceUnwrapper_dr_out
:
STD_LOGIC
;
signal
iCordic_x_out
:
STD_LOGIC_VECTOR
(
20
DOWNTO
0
);
signal
iCordic_x_out
:
STD_LOGIC_VECTOR
(
20
DOWNTO
0
);
signal
iCordic_y_out
:
STD_LOGIC_VECTOR
(
20
DOWNTO
0
);
signal
iCordic_y_out
:
STD_LOGIC_VECTOR
(
20
DOWNTO
0
);
signal
iCordic_rdy
:
STD_LOGIC
;
signal
iCordic_rdy
:
STD_LOGIC
;
...
@@ -193,6 +196,17 @@ Port (
...
@@ -193,6 +196,17 @@ Port (
);
);
END
COMPONENT
;
END
COMPONENT
;
COMPONENT
DistanceUnwrapper
Port
(
clk100
:
in
STD_LOGIC
;
en
:
in
STD_LOGIC
;
dr
:
in
STD_LOGIC
;
distance_in
:
in
STD_LOGIC_VECTOR
(
20
downto
0
);
distance_out
:
out
STD_LOGIC_VECTOR
(
24
downto
0
);
dr_out
:
out
STD_LOGIC
);
END
COMPONENT
;
COMPONENT
LockInAccumulator
COMPONENT
LockInAccumulator
Port
(
Port
(
CLK100
:
in
STD_LOGIC
;
CLK100
:
in
STD_LOGIC
;
...
@@ -493,8 +507,8 @@ iLockInAccumulator : LockInAccumulator port map(
...
@@ -493,8 +507,8 @@ iLockInAccumulator : LockInAccumulator port map(
CLK100
=>
Stitch_CLK100
,
-- in STD_LOGIC
CLK100
=>
Stitch_CLK100
,
-- in STD_LOGIC
sin
=>
iCordic_y_out
,
-- in STD_LOGIC_VECTOR(20 downto 0)
sin
=>
iCordic_y_out
,
-- in STD_LOGIC_VECTOR(20 downto 0)
cos
=>
iCordic_x_out
,
-- in STD_LOGIC_VECTOR(20 downto 0)
cos
=>
iCordic_x_out
,
-- in STD_LOGIC_VECTOR(20 downto 0)
data
=>
i
LaserReceiver_DISTANCE
,
-- in STD_LOGIC_VECTOR(20 downto 0)
data
=>
i
DistanceUnwrapper_distance_out
,
-- in STD_LOGIC_VECTOR(20 downto 0)
trig
=>
i
LaserReceiver_DATA_READY
,
-- in STD_LOGIC
trig
=>
i
DistanceUnwrapper_dr_out
,
-- in STD_LOGIC
clear
=>
iSweeper_lockin_clear
,
-- in STD_LOGIC
clear
=>
iSweeper_lockin_clear
,
-- in STD_LOGIC
enable
=>
iSweeper_lockin_en
,
-- in STD_LOGIC
enable
=>
iSweeper_lockin_en
,
-- in STD_LOGIC
dataCos
=>
iLockInAccumulator_dataCos
,
-- out STD_LOGIC_VECTOR(63 downto 0)
dataCos
=>
iLockInAccumulator_dataCos
,
-- out STD_LOGIC_VECTOR(63 downto 0)
...
@@ -503,6 +517,15 @@ iLockInAccumulator : LockInAccumulator port map(
...
@@ -503,6 +517,15 @@ iLockInAccumulator : LockInAccumulator port map(
idle
=>
iLockInAccumulator_idle
-- out STD_LOGIC
idle
=>
iLockInAccumulator_idle
-- out STD_LOGIC
);
);
iDistanceUnwrapper
:
DistanceUnwrapper
port
map
(
clk100
=>
Stitch_CLK100
,
en
=>
iSweeper_lockin_en
,
dr
=>
iLaserReceiver_DATA_READY
,
distance_in
=>
iLaserReceiver_DISTANCE
,
distance_out
=>
iDistanceUnwrapper_distance_out
,
dr_out
=>
iDistanceUnwrapper_dr_out
);
--TODO: The clocking and data input and stuff may need some optimizations. Refer to the manual in ISE, esp. pertaining parallel vs word serial
--TODO: The clocking and data input and stuff may need some optimizations. Refer to the manual in ISE, esp. pertaining parallel vs word serial
iCordic
:
cordic
port
map
(
iCordic
:
cordic
port
map
(
phase_in
=>
phi_clean
,
-- IN STD_LOGIC_VECTOR(31 DOWNTO 0)
phase_in
=>
phi_clean
,
-- IN STD_LOGIC_VECTOR(31 DOWNTO 0)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment