Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit core collection
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
30
Issues
30
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit core collection
Commits
feec500b
Commit
feec500b
authored
Dec 04, 2014
by
Stefan Rauch
Committed by
Wesley W. Terpstra
Dec 23, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wr_eca: new action channel for scubus
parent
86df7f9c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
100 additions
and
0 deletions
+100
-0
Manifest.py
modules/wr_eca/Manifest.py
+1
-0
eca_pkg.vhd
modules/wr_eca/eca_pkg.vhd
+10
-0
eca_scubus_channel.vhd
modules/wr_eca/eca_scubus_channel.vhd
+89
-0
No files found.
modules/wr_eca/Manifest.py
View file @
feec500b
...
...
@@ -3,6 +3,7 @@ files = [
"eca_adder.vhd"
,
"eca_channel.vhd"
,
"eca_gpio_channel.vhd"
,
"eca_scubus_channel.vhd"
,
"eca_offset.vhd"
,
"eca_pkg.vhd"
,
"eca_sdp.vhd"
,
...
...
modules/wr_eca/eca_pkg.vhd
View file @
feec500b
...
...
@@ -235,6 +235,16 @@ package eca_pkg is
gpio_o
:
out
std_logic_vector
(
15
downto
0
));
end
component
;
-- sends channel_i.tag to the scu bus
component
eca_scubus_channel
is
port
(
clk_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
channel_i
:
in
t_channel
;
tag_valid
:
out
std_logic
;
tag
:
out
std_logic_vector
(
31
downto
0
));
end
component
eca_scubus_channel
;
---------------------- Internals ------------------------
function
f_eca_active_high
(
x
:
boolean
)
return
std_logic
;
...
...
modules/wr_eca/eca_scubus_channel.vhd
0 → 100644
View file @
feec500b
--! @file eca_gpio_channel.vhd
--! @brief ECA-GPIO Adapter
--! @author Wesley W. Terpstra <w.terpstra@gsi.de>
--! @author Stefan Rauch <s.rauch@gsi.de>
--!
--! Copyright (C) 2013 GSI Helmholtz Centre for Heavy Ion Research GmbH
--!
--! This component takes an action channel and sends the tag to the SCU bus
--!
--------------------------------------------------------------------------------
--! This library is free software; you can redistribute it and/or
--! modify it under the terms of the GNU Lesser General Public
--! License as published by the Free Software Foundation; either
--! version 3 of the License, or (at your option) any later version.
--!
--! This library is distributed in the hope that it will be useful,
--! but WITHOUT ANY WARRANTY; without even the implied warranty of
--! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
--! Lesser General Public License for more details.
--!
--! You should have received a copy of the GNU Lesser General Public
--! License along with this library. If not, see <http://www.gnu.org/licenses/>.
---------------------------------------------------------------------------------
library
ieee
;
use
ieee
.
std_logic_1164
.
all
;
use
ieee
.
numeric_std
.
all
;
use
work
.
wishbone_pkg
.
all
;
use
work
.
eca_pkg
.
all
;
entity
eca_scubus_channel
is
port
(
clk_i
:
in
std_logic
;
rst_n_i
:
in
std_logic
;
channel_i
:
in
t_channel
;
tag_valid
:
out
std_logic
;
tag
:
out
std_logic_vector
(
31
downto
0
));
end
eca_scubus_channel
;
architecture
rtl
of
eca_scubus_channel
is
-- Out of principle, tell quartus to leave my design alone.
attribute
altera_attribute
:
string
;
attribute
altera_attribute
of
rtl
:
architecture
is
"-name AUTO_SHIFT_REGISTER_RECOGNITION OFF"
;
signal
s_tag
:
std_logic_vector
(
31
downto
0
);
signal
s_valid
:
std_logic
;
type
state_type
is
(
idle
,
cnt
);
signal
sm_state
:
state_type
;
begin
tag_valid
<=
s_valid
;
tag
<=
s_tag
;
main
:
process
(
clk_i
)
is
variable
v_cnt
:
unsigned
(
1
downto
0
);
begin
if
rising_edge
(
clk_i
)
then
if
rst_n_i
=
'0'
then
s_tag
<=
(
others
=>
'0'
);
s_valid
<=
'0'
;
v_cnt
:
=
(
others
=>
'0'
);
else
case
sm_state
is
when
idle
=>
s_valid
<=
'0'
;
v_cnt
:
=
(
others
=>
'0'
);
if
channel_i
.
valid
=
'1'
then
s_tag
<=
channel_i
.
tag
;
sm_state
<=
cnt
;
end
if
;
when
cnt
=>
s_valid
<=
'1'
;
if
v_cnt
=
3
then
sm_state
<=
idle
;
else
v_cnt
:
=
v_cnt
+
1
;
end
if
;
end
case
;
end
if
;
end
if
;
end
process
;
end
rtl
;
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