Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
14
Issues
14
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
Simple VME FMC Carrier SVEC
Commits
9bde4b57
Commit
9bde4b57
authored
Jul 01, 2020
by
Tristan Gingold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vmecore_test: add interrupt status.
parent
6521663b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
8 deletions
+29
-8
vmecore_test.vhd
hdl/top/vmecore_test/vmecore_test.vhd
+29
-8
No files found.
hdl/top/vmecore_test/vmecore_test.vhd
View file @
9bde4b57
...
...
@@ -57,9 +57,11 @@ architecture rtl of vmecore_test is
-- 0x1004: nbr of write errors in pattern ram
-- 0x1005: generates bus error.
-- 0x2000: counter (4B). Generate an interrupt when 0 is reached.
-- 0x2001: irq status (read to clear)
-- 0x3000: pattern ram (0x1000 * 4B)
-- 0x4000 - 0x3ff000: pattern ram
signal
counter
:
unsigned
(
31
downto
0
);
signal
irq_status
:
std_logic
;
signal
leds
:
std_logic_vector
(
15
downto
0
);
signal
last_trans
:
std_logic_vector
(
28
downto
0
);
...
...
@@ -111,10 +113,17 @@ begin
nbr_read
<=
(
others
=>
'0'
);
nbr_write
<=
(
others
=>
'0'
);
nbr_write_errors
<=
(
others
=>
'0'
);
irq_status
<=
'1'
;
int_o
<=
'0'
;
else
int_o
<=
'0'
;
-- Decrementer
if
counter
/=
(
counter
'range
=>
'0'
)
then
counter
<=
counter
-
1
;
if
counter
=
1
then
int_o
<=
'1'
;
irq_status
<=
'1'
;
end
if
;
end
if
;
if
slave_i
.
stb
=
'1'
and
slave_i
.
cyc
=
'1'
then
...
...
@@ -161,12 +170,17 @@ begin
null
;
end
case
;
when
"10"
=>
for
i
in
3
downto
0
loop
if
slave_i
.
sel
(
i
)
=
'1'
then
counter
(
8
*
i
+
7
downto
8
*
i
)
<=
unsigned
(
slave_i
.
dat
(
8
*
i
+
7
downto
8
*
i
));
end
if
;
end
loop
;
case
slave_i
.
adr
(
2
downto
0
)
is
when
"000"
=>
for
i
in
3
downto
0
loop
if
slave_i
.
sel
(
i
)
=
'1'
then
counter
(
8
*
i
+
7
downto
8
*
i
)
<=
unsigned
(
slave_i
.
dat
(
8
*
i
+
7
downto
8
*
i
));
end
if
;
end
loop
;
when
others
=>
null
;
end
case
;
when
"11"
=>
pattern_write
;
when
others
=>
...
...
@@ -205,7 +219,15 @@ begin
null
;
end
case
;
when
"10"
=>
slave_o
.
dat
<=
std_logic_vector
(
counter
);
case
slave_i
.
adr
(
2
downto
0
)
is
when
"000"
=>
slave_o
.
dat
<=
std_logic_vector
(
counter
);
when
"001"
=>
slave_o
.
dat
<=
(
0
=>
irq_status
,
others
=>
'0'
);
irq_status
<=
'0'
;
when
others
=>
slave_o
.
dat
<=
(
others
=>
'0'
);
end
case
;
when
"11"
=>
slave_o
.
dat
<=
pattern
;
when
others
=>
...
...
@@ -222,7 +244,6 @@ begin
end
process
;
leds_o
<=
leds
;
int_o
<=
'1'
when
counter
=
1
else
'0'
;
-- drive unused WB slave_o outputs
slave_o
.
stall
<=
'0'
;
...
...
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