Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
E
euro-adc-65m-14b-40cha-gw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
eurocard
euro-adc-65m-14b-40cha
euro-adc-65m-14b-40cha-gw
Commits
c9108da9
Commit
c9108da9
authored
Jun 21, 2017
by
Dave Newbold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding ZS selector block; fixing trigger bits
parent
9436f332
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
60 additions
and
0 deletions
+60
-0
sc_zs_sel.vhd
components/solid/firmware/hdl/sc_zs_sel.vhd
+60
-0
No files found.
components/solid/firmware/hdl/sc_zs_sel.vhd
0 → 100644
View file @
c9108da9
-- sc_zs_sel
--
-- Random and external trigger generator
--
-- Dave Newbold, August 2016
library
IEEE
;
use
IEEE
.
STD_LOGIC_1164
.
ALL
;
use
work
.
top_decl
.
all
;
entity
sc_zs_sel
is
port
(
clk40
:
in
std_logic
;
rst40
:
in
std_logic
;
mark
:
in
std_logic
;
zscfg
:
in
std_logic_vector
(
31
downto
0
);
trig
:
in
std_logic_vector
(
15
downto
0
);
trig_valid
:
in
std_logic
;
sel
:
out
std_logic_vector
(
1
downto
0
)
);
end
sc_zs_sel
;
architecture
rtl
of
sc_zs_sel
is
signal
mark_del
:
std_logic_vector
(
ZS_DEL
-
1
downto
0
);
signal
m
,
g
:
std_logic
;
signal
t
:
unsigned
(
3
downto
0
);
begin
mark_del
<=
mark_del
(
ZS_DEL
-
2
downto
0
)
&
mark
when
rising_edge
(
clk40
);
m
<=
mark_del
(
ZS_DEL
-
1
);
process
(
clk40
)
begin
if
rising_edge
(
clk40
)
then
if
rst40
=
'1'
or
m
=
'1'
then
t
<=
(
others
=>
'0'
);
g
<=
'0'
;
elsif
trig_valid
=
'1'
then
g
<=
'1'
;
if
unsigned
(
trig
(
3
downto
0
))
>
t
then
t
<=
unsigned
(
trig
(
3
downto
0
));
end
if
;
end
if
;
if
rst40
=
'1'
then
sel
<=
"00"
;
elsif
m
=
'1'
then
if
g
=
'0'
then
sel
<=
"00"
;
else
sel
<=
zscfg
(
to_integer
(
t
)
*
2
+
1
downto
to_integer
(
t
)
*
2
);
end
if
;
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