Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
AIDA-2020 TLU - Gateware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
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 - Gateware
Commits
8541e84d
Commit
8541e84d
authored
Oct 20, 2020
by
David Cussans
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding output of gendecoders
parent
e9f5032b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
0 deletions
+72
-0
ipbus_decode_TLUaddrmap.vhd
...projects/TLU_v1e/firmware/hdl/ipbus_decode_TLUaddrmap.vhd
+72
-0
No files found.
AIDA_tlu/projects/TLU_v1e/firmware/hdl/ipbus_decode_TLUaddrmap.vhd
0 → 100644
View file @
8541e84d
-- Address decode logic for ipbus fabric
--
-- This file has been AUTOGENERATED from the address table - do not hand edit
--
-- We assume the synthesis tool is clever enough to recognise exclusive conditions
-- in the if statement.
--
-- Dave Newbold, February 2011
library
IEEE
;
use
IEEE
.
STD_LOGIC_1164
.
all
;
use
ieee
.
numeric_std
.
all
;
package
ipbus_decode_TLUaddrmap
is
constant
IPBUS_SEL_WIDTH
:
positive
:
=
4
;
subtype
ipbus_sel_t
is
std_logic_vector
(
IPBUS_SEL_WIDTH
-
1
downto
0
);
function
ipbus_sel_TLUaddrmap
(
addr
:
in
std_logic_vector
(
31
downto
0
))
return
ipbus_sel_t
;
-- START automatically generated VHDL the Tue Oct 20 13:29:13 2020
constant
N_SLV_VERSION
:
integer
:
=
0
;
constant
N_SLV_DUTINTERFACES
:
integer
:
=
1
;
constant
N_SLV_SHUTTER
:
integer
:
=
2
;
constant
N_SLV_I2C_MASTER
:
integer
:
=
3
;
constant
N_SLV_EVENTBUFFER
:
integer
:
=
4
;
constant
N_SLV_EVENT_FORMATTER
:
integer
:
=
5
;
constant
N_SLV_TRIGGERINPUTS
:
integer
:
=
6
;
constant
N_SLV_TRIGGERLOGIC
:
integer
:
=
7
;
constant
N_SLV_LOGIC_CLOCKS
:
integer
:
=
8
;
constant
N_SLAVES
:
integer
:
=
9
;
-- END automatically generated VHDL
end
ipbus_decode_TLUaddrmap
;
package
body
ipbus_decode_TLUaddrmap
is
function
ipbus_sel_TLUaddrmap
(
addr
:
in
std_logic_vector
(
31
downto
0
))
return
ipbus_sel_t
is
variable
sel
:
ipbus_sel_t
;
begin
-- START automatically generated VHDL the Tue Oct 20 13:29:13 2020
if
std_match
(
addr
,
"----------------0000------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_VERSION
,
IPBUS_SEL_WIDTH
));
-- version / base 0x00000001 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0001------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_DUTINTERFACES
,
IPBUS_SEL_WIDTH
));
-- DUTInterfaces / base 0x00001000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0010------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_SHUTTER
,
IPBUS_SEL_WIDTH
));
-- Shutter / base 0x00002000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0011------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_I2C_MASTER
,
IPBUS_SEL_WIDTH
));
-- i2c_master / base 0x00003000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0100------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_EVENTBUFFER
,
IPBUS_SEL_WIDTH
));
-- eventBuffer / base 0x00004000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0101------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_EVENT_FORMATTER
,
IPBUS_SEL_WIDTH
));
-- Event_Formatter / base 0x00005000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0110------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_TRIGGERINPUTS
,
IPBUS_SEL_WIDTH
));
-- triggerInputs / base 0x00006000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------0111------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_TRIGGERLOGIC
,
IPBUS_SEL_WIDTH
));
-- triggerLogic / base 0x00007000 / mask 0x0000f000
elsif
std_match
(
addr
,
"----------------1000------------"
)
then
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLV_LOGIC_CLOCKS
,
IPBUS_SEL_WIDTH
));
-- logic_clocks / base 0x00008000 / mask 0x0000f000
-- END automatically generated VHDL
else
sel
:
=
ipbus_sel_t
(
to_unsigned
(
N_SLAVES
,
IPBUS_SEL_WIDTH
));
end
if
;
return
sel
;
end
function
ipbus_sel_TLUaddrmap
;
end
ipbus_decode_TLUaddrmap
;
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