Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
atlas-tdaq-felix
firmware
Commits
8b33cdad
Commit
8b33cdad
authored
3 years ago
by
Ali Skaf
Browse files
Options
Downloads
Patches
Plain Diff
Cleaned code and removed unnecessary assignments
parent
cd5565a6
No related branches found
No related tags found
2 merge requests
!308
Added license headers (Apache v2)
,
!300
Resolve FLX-1697 "Ttc emulator longb ocr support"
Pipeline
#3150566
canceled
3 years ago
Stage: sim
Stage: build_full
Stage: build_gbt_8ch
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sources/TTCdataEmulator/TTC_Emulator.vhd
+20
-41
20 additions, 41 deletions
sources/TTCdataEmulator/TTC_Emulator.vhd
with
20 additions
and
41 deletions
sources/TTCdataEmulator/TTC_Emulator.vhd
+
20
−
41
View file @
8b33cdad
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
-- Revised by : Ali Skaf
-- Revised by : Ali Skaf
-- Email : ali.skaf@uni-goettingen.de
-- Email : ali.skaf@uni-goettingen.de
-- V2.1: provide OCR and long Bchannel support
-- V2.1: provide OCR and long Bchannel support
-- Last edited;
1
1.10.2021
-- Last edited;
2
1.10.2021
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
...
@@ -106,11 +106,11 @@ architecture Behavioral of TTC_Emulator is
...
@@ -106,11 +106,11 @@ architecture Behavioral of TTC_Emulator is
signal
short_b_bchan_valid
:
std_logic
;
signal
short_b_bchan_valid
:
std_logic
;
signal
fifo_bchan_valid
:
std_logic
;
signal
fifo_bchan_valid
:
std_logic
;
signal
Bch_short_cnt_init
:
unsigned
(
4
downto
0
)
:
=
"10000"
;
constant
Bch_short_cnt_init
:
unsigned
(
4
downto
0
)
:
=
"10000"
;
signal
fifo_cnt_init
:
unsigned
(
6
downto
0
)
:
=
"1000000"
;
constant
fifo_cnt_init
:
unsigned
(
6
downto
0
)
:
=
"1000000"
;
signal
short_bch_cnt
:
unsigned
(
4
downto
0
)
:
=
"10000"
;
signal
short_bch_cnt
:
unsigned
(
4
downto
0
)
:
=
Bch_short_cnt_init
;
--AS:
"10000";
signal
fifo_bch_cnt
:
unsigned
(
6
downto
0
)
:
=
"1000000"
;
signal
fifo_bch_cnt
:
unsigned
(
6
downto
0
)
:
=
fifo_cnt_init
;
--AS:
"1000000";
signal
serialization_process
:
std_logic
:
=
'0'
;
signal
serialization_process
:
std_logic
:
=
'0'
;
signal
Serial_Bchannel
:
std_logic
:
=
'1'
;
signal
Serial_Bchannel
:
std_logic
:
=
'1'
;
signal
Serial_Bchannel_r
:
std_logic
:
=
'1'
;
signal
Serial_Bchannel_r
:
std_logic
:
=
'1'
;
...
@@ -651,30 +651,20 @@ begin
...
@@ -651,30 +651,20 @@ begin
sig_out
=>
fifo_bchan_valid
-- output signal
sig_out
=>
fifo_bchan_valid
-- output signal
);
);
--FS: For 1 clock delay, we simply push our signals through a single flipflop.
short_b_prep_delay
:
entity
work
.
signal_delay
process
(
Clock
)
generic
map
(
begin
width
=>
1
-- number counter stages used to generate delay given in count_in
if
rising_edge
(
Clock
)
then
)
if
Reset
=
'1'
then
port
map
(
fifo_read_r
<=
'0'
;
clk
=>
Clock
,
-- clock
prepare_bcr_r
<=
'0'
;
rst
=>
Reset
,
-- sync reset
else
count_in
=>
(
others
=>
'0'
),
fifo_read_r
<=
fifo_read
;
sig_in
=>
prepare_bcr
,
-- input signal
prepare_bcr_r
<=
prepare_bcr
;
sig_out
=>
prepare_bcr_r
-- delayed output signal
end
if
;
);
end
if
;
end
process
;
short_e_prep_delay
:
entity
work
.
signal_delay
generic
map
(
width
=>
1
-- number counter stages used to generate delay given in count_in
)
port
map
(
clk
=>
Clock
,
-- clock
rst
=>
Reset
,
-- sync reset
count_in
=>
(
others
=>
'0'
),
sig_in
=>
fifo_read
,
-- input signal
sig_out
=>
fifo_read_r
-- delayed output signal
);
-- Depending on what is triggered, with the shortBchannel for the BCR or the fifo output are registered
-- Depending on what is triggered, with the shortBchannel for the BCR or the fifo output are registered
-- The 2 have different lengths
-- The 2 have different lengths
...
@@ -700,8 +690,8 @@ begin
...
@@ -700,8 +690,8 @@ begin
begin
begin
if
rising_edge
(
Clock
)
then
if
rising_edge
(
Clock
)
then
if
Reset
=
'1'
or
user_reset
=
'1'
then
if
Reset
=
'1'
or
user_reset
=
'1'
then
Bch_short_cnt_init
<=
"10000"
;
--
Bch_short_cnt_init <= "10000";
fifo_cnt_init
<=
"1000000"
;
--
fifo_cnt_init <= "1000000";
short_b
<=
(
others
=>
'1'
);
short_b
<=
(
others
=>
'1'
);
short_bch_cnt
<=
Bch_short_cnt_init
-1
;
short_bch_cnt
<=
Bch_short_cnt_init
-1
;
fifo_bch_cnt
<=
fifo_cnt_init
-1
;
fifo_bch_cnt
<=
fifo_cnt_init
-1
;
...
@@ -746,11 +736,6 @@ begin
...
@@ -746,11 +736,6 @@ begin
short_bch_cnt
<=
Bch_short_cnt_init
;
short_bch_cnt
<=
Bch_short_cnt_init
;
fifo_bch_cnt
<=
fifo_cnt_init
;
fifo_bch_cnt
<=
fifo_cnt_init
;
end
if
;
end
if
;
Serial_Bchannel
<=
'1'
;
serialization_process
<=
'0'
;
short_b
<=
(
others
=>
'1'
);
short_bch_cnt
<=
Bch_short_cnt_init
;
fifo_bch_cnt
<=
fifo_cnt_init
;
end
if
;
end
if
;
end
if
;
end
if
;
end
process
;
end
process
;
...
@@ -789,12 +774,6 @@ begin
...
@@ -789,12 +774,6 @@ begin
end
if
;
end
if
;
-- INIT STATE -- AS: Removed as no need to have a specific state for this!
-- INIT STATE -- AS: Removed as no need to have a specific state for this!
-- when init =>
-- if Serial_Bchannel_r = '0' and Serial_Bchannel = '0' then
-- state <= shortB;
-- elsif Serial_Bchannel_r = '0' and Serial_Bchannel = '1' then
-- state <= longB;
-- end if;
--SHORT B STATE
--SHORT B STATE
when
shortB
=>
when
shortB
=>
...
...
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