Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr2rf-vme
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
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
wr2rf-vme
Commits
31b66a77
Commit
31b66a77
authored
Apr 24, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vtuCore: simplify HDL.
parent
7efea296
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
74 deletions
+17
-74
vtuCore.vhd
dependencies/vtu/rtl/vtuCore.vhd
+17
-74
No files found.
dependencies/vtu/rtl/vtuCore.vhd
View file @
31b66a77
...
...
@@ -1443,108 +1443,51 @@ begin
-- LowFreq: post processing to generate a square wave from pulses.
blk_lowfreq
:
block
is
signal
FilledMuxSel
:
std_logic
;
signal
DataOutPulse
:
std_logic
;
signal
DataFilled
:
std_logic_vector
(
7
downto
0
);
signal
DataAllEqual
:
std_logic_vector
(
7
downto
0
);
signal
ClkValueSwitch
:
std_logic
;
begin
-- Detect a pulse on seq output.
DataOutPulse
<=
DataOut_seq
(
7
)
or
DataOut_seq
(
6
)
or
DataOut_seq
(
5
)
or
DataOut_seq
(
4
)
or
DataOut_seq
(
3
)
or
DataOut_seq
(
2
)
or
DataOut_seq
(
1
)
or
DataOut_seq
(
0
);
-- Toggle when a pulse is detected.
process
(
Clk
,
RstOrStopSeq
)
begin
if
RstOrStopSeq
=
'1'
then
ClkValueSwitch
<=
'0'
;
elsif
(
Clk
'event
and
Clk
=
'1'
)
then
if
DataOut
Pulse
=
'1'
then
if
DataOut
_seq
/=
x"00"
then
ClkValueSwitch
<=
not
ClkValueSwitch
;
end
if
;
end
if
;
end
process
;
process
(
ClkValueSwitch
)
begin
case
ClkValueSwitch
is
when
'0'
=>
DataAllEqual
<=
(
others
=>
'0'
);
when
others
=>
DataAllEqual
<=
(
others
=>
'1'
);
end
case
;
end
process
;
process
(
DataAllEqual
,
DataFilled
,
FilledMuxSel
)
begin
case
FilledMuxSel
is
when
'0'
=>
DataOutLowFreq
<=
DataAllEqual
;
when
others
=>
DataOutLowFreq
<=
DataFilled
;
end
case
;
end
process
;
-- Fill data with ones or zeros after one when DataOutPulse='1'
process
(
DataOut_seq
,
DataOutPulse
,
ClkValueSwitch
)
process
(
DataOut_seq
,
RstorStopSeq
)
begin
if
DataOutPulse
=
'1'
then
if
RstOrStopSeq
=
'1'
then
-- Value at rest.
DataFilled
<=
"00000000"
;
else
-- In case of pulse, start the wave.
if
DataOut_seq
(
7
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"10000000"
;
else
DataFilled
<=
"01111111"
;
end
if
;
DataFilled
<=
"01111111"
;
elsif
DataOut_seq
(
6
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11000000"
;
else
DataFilled
<=
"00111111"
;
end
if
;
DataFilled
<=
"00111111"
;
elsif
DataOut_seq
(
5
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11100000"
;
else
DataFilled
<=
"00011111"
;
end
if
;
DataFilled
<=
"00011111"
;
elsif
DataOut_seq
(
4
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11110000"
;
else
DataFilled
<=
"00001111"
;
end
if
;
DataFilled
<=
"00001111"
;
elsif
DataOut_seq
(
3
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11111000"
;
else
DataFilled
<=
"00000111"
;
end
if
;
DataFilled
<=
"00000111"
;
elsif
DataOut_seq
(
2
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11111100"
;
else
DataFilled
<=
"00000011"
;
end
if
;
DataFilled
<=
"00000011"
;
elsif
DataOut_seq
(
1
)
=
'1'
then
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11111110"
;
else
DataFilled
<=
"00000001"
;
end
if
;
DataFilled
<=
"00000001"
;
else
if
ClkValueSwitch
=
'1'
then
DataFilled
<=
"11111111"
;
else
DataFilled
<=
"00000000"
;
end
if
;
-- Either no pulse or start the wave on the next cycle.
DataFilled
<=
"00000000"
;
end
if
;
else
DataFilled
<=
(
others
=>
'0'
);
end
if
;
end
process
;
FilledMuxSel
<=
(
not
RstOrStopSeq
)
and
DataOutPulse
;
DataOutLowFreq
<=
DataFilled
when
ClkValueSwitch
=
'0'
else
not
DataFilled
;
end
block
blk_lowfreq
;
DataOut
<=
DataOutHTSyncLess
when
Mode
=
C_Code_ctuAsVtu_control2_mode_syncLessOperation
else
...
...
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