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
9be153cf
Commit
9be153cf
authored
Apr 10, 2018
by
Dave Newbold
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://bitbucket.org/solidexperiment/solid_firmware
parents
ed70a4fe
f322a4b0
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
158 additions
and
7 deletions
+158
-7
sc_trig.xml
components/solid/addr_table/sc_trig.xml
+1
-0
sc_trig.dep
components/solid/firmware/cfg/sc_trig.dep
+1
-1
sc_local_trig.vhd
components/solid/firmware/hdl/sc_local_trig.vhd
+3
-1
sc_trig.vhd
components/solid/firmware/hdl/sc_trig.vhd
+3
-1
sc_trig_gen_or_coinc.vhd
components/solid/firmware/hdl/sc_trig_gen_or_coinc.vhd
+105
-0
sc_trig_stretch.vhd
components/solid/firmware/hdl/sc_trig_stretch.vhd
+35
-0
sc_zs_sel_rolling.vhd
components/solid/firmware/hdl/sc_zs_sel_rolling.vhd
+2
-2
top_decl.vhd
projects/64ch/firmware/hdl/top_decl.vhd
+7
-1
top_decl.vhd
projects/8ch/firmware/hdl/top_decl.vhd
+1
-1
No files found.
components/solid/addr_table/sc_trig.xml
View file @
9be153cf
...
...
@@ -4,6 +4,7 @@
<node
id=
"dtmon_en"
mask=
"0x1"
/>
<node
id=
"trig_in_en"
mask=
"0x2"
/>
<node
id=
"trig_out_force"
mask=
"0x4"
/>
<node
id=
"coinc_mode"
mask=
"0x8"
/>
</node>
<node
id=
"evt_ctr"
address=
"0x2"
/>
<node
id=
"stat"
address=
"0x3"
>
...
...
components/solid/firmware/cfg/sc_trig.dep
View file @
9be153cf
src sc_trig.vhd sc_local_trig.vhd sc_zs_sel_rolling.vhd sc_trig_ro_block.vhd sc_deadtime_mon.vhd
src sc_trig_gen.vhd sc_trig_gen_or.vhd
src sc_trig_gen.vhd sc_trig_gen_or.vhd
sc_trig_gen_or_coinc.vhd sc_trig_stretch.vhd
include sc_seq.dep
src ipbus_decode_sc_trig.vhd
addrtab -t sc_trig.xml
...
...
components/solid/firmware/hdl/sc_local_trig.vhd
View file @
9be153cf
...
...
@@ -19,6 +19,7 @@ entity sc_local_trig is
clk40
:
in
std_logic
;
rst40
:
in
std_logic
;
en
:
in
std_logic
;
coinc_mode
:
in
std_logic
;
mask
:
in
std_logic_vector
(
N_TRG
-
1
downto
0
);
hops
:
in
std_logic_vector
(
31
downto
0
);
mark
:
in
std_logic
;
...
...
@@ -55,7 +56,7 @@ begin
-- Threshold trigger generator
tg0
:
entity
work
.
sc_trig_gen_or
tg0
:
entity
work
.
sc_trig_gen_or
_coinc
generic
map
(
TBIT
=>
0
,
DELAY
=>
2
...
...
@@ -63,6 +64,7 @@ begin
port
map
(
clk
=>
clk40
,
en
=>
en
,
mode
=>
coinc_mode
,
mark
=>
mark
,
chan_trig
=>
chan_trig
,
chan_act
=>
cact
(
0
),
...
...
components/solid/firmware/hdl/sc_trig.vhd
View file @
9be153cf
...
...
@@ -56,7 +56,7 @@ architecture rtl of sc_trig is
signal
ctrl
,
ctrl_mask
:
ipb_reg_v
(
0
downto
0
);
signal
stat
:
ipb_reg_v
(
1
downto
0
);
signal
stb
:
std_logic_vector
(
0
downto
0
);
signal
ctrl_dtmon_en
,
ctrl_trig_in_en
,
ctrl_trig_out_force
:
std_logic
;
signal
ctrl_dtmon_en
,
ctrl_trig_in_en
,
ctrl_trig_out_force
,
ctrl_coinc_mode
:
std_logic
;
signal
masks
:
ipb_reg_v
(
N_CHAN_TRG
*
2
-
1
downto
0
);
signal
trig_mask
:
std_logic_vector
(
N_TRG
-
1
downto
0
);
signal
hop_cfg
:
std_logic_vector
(
31
downto
0
);
...
...
@@ -109,6 +109,7 @@ begin
ctrl_dtmon_en
<=
ctrl
(
0
)(
0
);
ctrl_trig_in_en
<=
ctrl
(
0
)(
1
);
ctrl_trig_out_force
<=
ctrl
(
0
)(
2
)
and
stb
(
0
);
ctrl_coinc_mode
<=
ctrl
(
0
)(
3
);
stat
(
0
)
<=
X"0"
&
tctr
;
stat
(
1
)
<=
X"0000000"
&
"00"
&
rveto
&
err
;
...
...
@@ -183,6 +184,7 @@ begin
clk40
=>
clk40
,
rst40
=>
rst40
,
en
=>
trig_en
,
coinc_mode
=>
ctrl_coinc_mode
,
mask
=>
trig_mask
,
hops
=>
hop_cfg
,
mark
=>
mark
,
...
...
components/solid/firmware/hdl/sc_trig_gen_or_coinc.vhd
0 → 100644
View file @
9be153cf
-- sc_trig_gen_or_coinc
--
-- Local trigger module for simple 'ored' threshold triggers
-- This trigger will fire if any channel has a high bit in a given block
-- Can be set up to require a coincidence between X and Y channels
--
-- Dave Newbold, March 2018
library
IEEE
;
use
IEEE
.
STD_LOGIC_1164
.
ALL
;
use
ieee
.
numeric_std
.
all
;
use
ieee
.
std_logic_misc
.
all
;
use
work
.
top_decl
.
all
;
entity
sc_trig_gen_or_coinc
is
generic
(
TBIT
:
natural
:
=
0
;
DELAY
:
positive
:
=
1
);
port
(
clk
:
in
std_logic
;
en
:
in
std_logic
;
mode
:
in
std_logic
;
mark
:
in
std_logic
;
chan_trig
:
in
sc_trig_array
;
hit
:
out
std_logic
;
chan_act
:
out
std_logic_vector
(
N_CHAN
-
1
downto
0
);
valid
:
out
std_logic
;
ack
:
in
std_logic
);
end
sc_trig_gen_or_coinc
;
architecture
rtl
of
sc_trig_gen_or_coinc
is
signal
y_or
,
x_or
:
std_logic
;
signal
t
,
m
,
tc
,
v
:
std_logic
;
signal
mark_del
:
std_logic_vector
(
DELAY
downto
0
);
signal
c
:
std_logic_vector
(
N_CHAN
-
1
downto
0
);
begin
-- Define the trigger condition
process
(
chan_trig
)
begin
y_or
<=
'0'
;
x_or
<=
'0'
;
for
i
in
range
N_CHAN
/
4
-
1
downto
0
loop
y_or
<=
y_or
or
chan_trig
(
TBIT
)(
SC_CH_Y0
(
i
))
or
chan_trig
(
TBIT
)(
SC_CH_Y1
(
i
));
x_or
<=
x_or
or
chan_trig
(
TBIT
)(
SC_CH_X0
(
i
))
or
chan_trig
(
TBIT
)(
SC_CH_X1
(
i
));
end
loop
;
end
process
;
stretch
:
entity
work
.
sc_trig_stretch
generic
map
(
WIDTH
=>
2
)
port
map
(
clk
=>
clk
,
del
=>
"0011"
,
-- Fixed four-sample window for now
d
(
0
)
=>
y_or
,
d
(
1
)
=>
x_or
,
q
(
0
)
=>
y_or_s
,
q
(
1
)
=>
x_or_s
);
t
<=
(
y_or_s
and
x_or_s
)
when
mode
=
'1'
else
or_reduce
(
chan_trig
(
TBIT
));
-- Define the block boundary
mark_del
<=
mark_del
(
DELAY
-
1
downto
0
)
&
mark
when
rising_edge
(
clk
);
m
<=
mark_del
(
DELAY
);
-- Catch a trigger feature with the block
process
(
clk
)
begin
if
rising_edge
(
clk
)
then
if
en
=
'0'
then
tc
<=
'0'
;
c
<=
(
others
=>
'0'
);
elsif
t
=
'1'
then
tc
<=
'1'
;
if
m
=
'0'
then
c
<=
c
or
chan_trig
(
TBIT
);
else
c
<=
chan_trig
(
TBIT
);
end
if
;
elsif
m
=
'1'
then
tc
<=
'0'
;
c
<=
(
others
=>
'0'
);
end
if
;
end
if
;
end
process
;
-- Trigger request output
hit
<=
t
;
v
<=
(
v
or
(
tc
and
m
))
and
not
(
mark
or
ack
or
not
en
)
when
rising_edge
(
clk
);
valid
<=
v
;
chan_act
<=
c
when
m
=
'1'
and
rising_edge
(
clk
);
end
rtl
;
components/solid/firmware/hdl/sc_trig_stretch.vhd
0 → 100644
View file @
9be153cf
-- sc_trig_stretch
--
-- Pulse stretcher for trigger coincidence
--
-- Dave Newbold, March 2018
library
IEEE
;
use
IEEE
.
STD_LOGIC_1164
.
ALL
;
use
ieee
.
numeric_std
.
all
;
entity
sc_trig_stretch
is
generic
(
WIDTH
:
positive
:
=
1
);
port
(
clk
:
in
std_logic
;
del
:
in
std_logic_vector
(
3
downto
0
);
d
:
in
std_logic_vector
(
WIDTH
-
1
downto
0
);
q
:
out
std_logic_vector
(
WIDTH
-
1
downto
0
)
);
end
sc_trig_stretch
;
architecture
rtl
of
sc_trig_stretch
is
type
r_t
:
array
(
2
**
del
'width
-
1
downto
0
)
of
std_logic_vector
(
WIDTH
-
1
downto
0
);
signal
r
:
r_t
;
begin
r
(
0
)
<=
d
;
r
(
r
'left
downto
1
)
<=
r
(
r
'left
-
1
downto
0
)
when
rising_edge
(
clk
);
q
<=
r
(
to_integer
(
unsigned
(
del
)));
end
rtl
;
components/solid/firmware/hdl/sc_zs_sel_rolling.vhd
View file @
9be153cf
...
...
@@ -2,8 +2,8 @@
--
-- Zero suppression threshold select logic - range of blocks
--
-- zscfg is
four
bits for each trigger type
-- b
3-2
: blocks for change threshold for (from start of nzs buffer)
-- zscfg is
eight
bits for each trigger type
-- b
7-4
: blocks for change threshold for (from start of nzs buffer)
-- b1-0: ZS threshold ID for this trigger
--
-- Dave Newbold, August 2016
...
...
projects/64ch/firmware/hdl/top_decl.vhd
View file @
9be153cf
...
...
@@ -11,7 +11,7 @@ package top_decl is
constant
MAC_ADDR
:
std_logic_vector
(
47
downto
0
)
:
=
X"020ddba11500"
;
-- last byte from local addr
constant
IP_ADDR
:
std_logic_vector
(
31
downto
0
)
:
=
X"c0a8eb00"
;
-- last byte from local addr
constant
FW_REV
:
std_logic_vector
(
15
downto
0
)
:
=
X"001
3
"
;
constant
FW_REV
:
std_logic_vector
(
15
downto
0
)
:
=
X"001
5
"
;
constant
N_CHAN
:
integer
:
=
64
;
constant
BLK_RADIX
:
integer
:
=
8
;
-- 256 sample blocks
...
...
@@ -26,4 +26,10 @@ package top_decl is
type
sc_trig_array
is
array
(
N_CHAN_TRG
-
1
downto
0
)
of
std_logic_vector
(
N_CHAN
-
1
downto
0
);
type
sc_ltrig_array
is
array
(
N_TRG
-
1
downto
0
)
of
std_logic_vector
(
N_CHAN
-
1
downto
0
);
type
sc_ch_array_t
is
array
(
N_CHAN
/
4
-
1
downto
0
)
of
integer
;
constant
SC_CH_Y0
:
sc_ch_array_t
:
(
24
,
25
,
26
,
27
,
28
,
29
,
30
,
31
,
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
);
constant
SC_CH_Y1
:
sc_ch_array_t
:
(
39
,
38
,
37
,
36
,
35
,
34
,
33
,
32
,
63
,
62
,
61
,
60
,
59
,
58
,
57
,
56
);
constant
SC_CH_X0
:
sc_ch_array_t
:
(
23
,
22
,
21
,
20
,
19
,
18
,
17
,
16
,
47
,
46
,
45
,
44
,
43
,
42
,
41
,
40
);
constant
SC_CH_X1
:
sc_ch_array_t
:
(
8
,
9
,
10
,
11
,
12
,
13
,
14
,
15
,
48
,
49
,
50
,
51
,
52
,
53
,
54
,
55
);
end
top_decl
;
projects/8ch/firmware/hdl/top_decl.vhd
View file @
9be153cf
...
...
@@ -11,7 +11,7 @@ package top_decl is
constant
MAC_ADDR
:
std_logic_vector
(
47
downto
0
)
:
=
X"020ddba11503"
;
constant
IP_ADDR
:
std_logic_vector
(
31
downto
0
)
:
=
X"c0a8eb00"
;
constant
FW_REV
:
std_logic_vector
(
15
downto
0
)
:
=
X"001
3
"
;
constant
FW_REV
:
std_logic_vector
(
15
downto
0
)
:
=
X"001
5
"
;
constant
N_CHAN
:
integer
:
=
8
;
constant
BLK_RADIX
:
integer
:
=
8
;
-- 256 sample blocks
...
...
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