Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AIDA-2020 TLU
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
AIDA-2020 TLU
Commits
933c60e5
Commit
933c60e5
authored
Jul 06, 2018
by
David Cussans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fixes in SyncGenerator ( part of shutter/spill signal firmware)
parent
350bfc2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
9 deletions
+18
-9
SyncGenerator_rtl.vhd
components/tlu/firmware/hdl/SyncGenerator_rtl.vhd
+15
-8
stretchPulse4x_rtl.vhd
components/tlu/firmware/hdl/stretchPulse4x_rtl.vhd
+2
-0
top_enclustra_tlu_v1e.vhd
projects/TLU_v1e/firmware/hdl/top_enclustra_tlu_v1e.vhd
+1
-1
No files found.
components/tlu/firmware/hdl/SyncGenerator_rtl.vhd
View file @
933c60e5
...
...
@@ -78,7 +78,7 @@ ARCHITECTURE rtl OF syncGenerator IS
signal
s_trigger_source_select
:
std_logic_vector
(
c_SELWIDTH
-1
downto
0
);
signal
s_counter_lt_t1
,
s_counter_lt_t2
,
s_counter_lt_t3
,
s_counter_gt_cycle
:
std_logic
:
=
'0'
;
signal
s_shutter
,
s_veto
:
std_logic
:
=
'0'
;
signal
s_threshold_t1
,
s_threshold_t3
,
s_threshold_t2
,
s_internal_cycle_length
:
unsigned
(
g_COUNTER_WIDTH
-1
downto
0
);
signal
s_threshold_t1
,
s_threshold_t3
,
s_threshold_t2
,
s_internal_cycle_length
,
s_truncated_counter_value
:
unsigned
(
g_COUNTER_WIDTH
-1
downto
0
);
BEGIN
...
...
@@ -97,12 +97,14 @@ BEGIN
--! Process to generate a reset signal for counter
--! Will reset ( and hence start to count ) if input trigger is high and
--! the sequence isn't running.
--! the sequence isn't running and sequence is enabled.
--! (The sequence isn't running if either the counter exceeds T3 or the top
--! bit of the counter is set and has stopped running.)
p_generateReset
:
PROCESS
(
clock_i
)
BEGIN
IF
rising_edge
(
clock_i
)
THEN
if
(
s_trigger
=
'1'
)
and
(
s_counter_lt_t3
=
'0'
)
and
(
(
s_counter_lt_t3
=
'0'
)
or
(
s_counter_value
(
s_counter_value
'left
)
=
'1'
))
and
(
enable_sequence_i
=
'1'
)
then
s_reset_counter
<=
'1'
;
else
...
...
@@ -131,7 +133,8 @@ BEGIN
--! Process to register trigger input
p_triggerSelect
:
PROCESS
(
clock_i
)
BEGIN
IF
rising_edge
(
clock_i
)
and
(
strobe_i
=
'1'
)
THEN
--IF rising_edge(clock_i) and (strobe_i='1') THEN
IF
rising_edge
(
clock_i
)
THEN
if
(
enable_internal_cycle_i
=
'0'
)
then
s_trigger
<=
trigger_sources_i
(
s_sel
);
--! Trigger on external signals if not generating internal cycles
else
...
...
@@ -148,30 +151,34 @@ BEGIN
s_threshold_t3
<=
unsigned
(
threshold_t3_i
(
s_threshold_t3
'range
));
s_internal_cycle_length
<=
unsigned
(
internal_cycle_length_i
(
s_internal_cycle_length
'range
)
);
-- Truncate the top bit of the counter ( which is only used to halt count
-- when needed.
s_truncated_counter_value
<=
unsigned
(
s_counter_value
(
s_truncated_counter_value
'range
));
--! Process to drive s_counter_lt_t1 , s_counter_lt_t2, s_counter_lt_t3
p_comparators
:
PROCESS
(
clock_i
)
BEGIN
IF
rising_edge
(
clock_i
)
and
(
strobe_i
=
'1'
)
THEN
if
unsigned
(
s_counter_value
)
<
s_threshold_t1
THEN
if
s_truncated_counter_value
<
s_threshold_t1
THEN
s_counter_lt_t1
<=
'1'
;
else
s_counter_lt_t1
<=
'0'
;
end
if
;
if
unsigned
(
s_counter_value
)
<
s_threshold_t2
THEN
if
s_truncated_counter_value
<
s_threshold_t2
THEN
s_counter_lt_t2
<=
'1'
;
else
s_counter_lt_t2
<=
'0'
;
end
if
;
if
unsigned
(
s_counter_value
)
<
s_threshold_t3
THEN
if
s_truncated_counter_value
<
s_threshold_t3
THEN
s_counter_lt_t3
<=
'1'
;
else
s_counter_lt_t3
<=
'0'
;
end
if
;
if
unsigned
(
s_counter_value
)
>
s_internal_cycle_length
then
if
s_truncated_counter_value
>
s_internal_cycle_length
then
s_counter_gt_cycle
<=
'1'
;
else
s_counter_gt_cycle
<=
'0'
;
...
...
components/tlu/firmware/hdl/stretchPulse4x_rtl.vhd
View file @
933c60e5
...
...
@@ -11,6 +11,8 @@ USE ieee.std_logic_1164.all;
--! @author David Cussans
entity
stretchPulse4x
is
generic
(
g_FIND_RISING_EDGE
:
boolean
:
=
true
);
-- ! Set true to look for rising edge of input signal. NB. "false" Not implemented yet.
port
(
clk_4x_i
:
in
std_logic
;
--! system clock
clk_4x_strobe_i
:
in
std_logic
;
--! strobes high for one cycle every 4 of clk_4x
...
...
projects/TLU_v1e/firmware/hdl/top_enclustra_tlu_v1e.vhd
View file @
933c60e5
...
...
@@ -25,7 +25,7 @@ use work.ipbus.ALL;
entity
top
is
generic
(
constant
FW_VERSION
:
unsigned
(
31
downto
0
):
=
X"1e00001
1
"
;
-- Firmware revision. Remember to change this as needed.
constant
FW_VERSION
:
unsigned
(
31
downto
0
):
=
X"1e00001
3
"
;
-- Firmware revision. Remember to change this as needed.
g_NUM_DUTS
:
positive
:
=
4
;
-- <- was 3
g_NUM_TRIG_INPUTS
:
positive
:
=
6
;
-- <- was 4
g_NUM_EDGE_INPUTS
:
positive
:
=
6
;
-- <-- was 4
...
...
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