Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
Gennum GN4124 core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
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
Gennum GN4124 core
Commits
2a23d551
Commit
2a23d551
authored
Jul 03, 2020
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hdl: wip, do not use this commit
parent
73cb5a89
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
80 additions
and
126 deletions
+80
-126
l2p_dma_master.vhd
hdl/rtl/l2p_dma_master.vhd
+72
-86
main.sv
hdl/sim/example_tb/main.sv
+8
-40
No files found.
hdl/rtl/l2p_dma_master.vhd
View file @
2a23d551
This diff is collapsed.
Click to expand it.
hdl/sim/example_tb/main.sv
View file @
2a23d551
...
...
@@ -179,7 +179,7 @@ module main;
initial
begin
automatic
int
ntest
=
1
;
const
int
tests
=
9
;
const
int
tests
=
8
;
uint32_t
addr
,
val
,
expected
;
...
...
@@ -211,38 +211,6 @@ module main;
$
write
(
"PASS
\n
"
)
;
/* -----\/----- EXCLUDED -----\/-----
$write("Test %0d/%0d: 128B read over DMA, abort after first read: ",
ntest++, tests);
if (dma_irq != 1'b0)
$fatal(1, "dma irq should be 0");
acc.write('h14, 'h80); // count
acc.write('h00, 'h01); // start
// Check values read from memory
@(posedge i_gn4124.l2p_valid); // skip header
repeat(2) @(posedge i_gn4124.l2p_clk_p);
expected = 32'h8000001f;
val = i_gn4124.l2p_data;
@(posedge i_gn4124.l2p_clk_n);
val |= i_gn4124.l2p_data << 16;
val_check("DMA read-back", 'h20, val, expected);
repeat(2) @(posedge clk_125m);
// Test abort feature
acc.write('h00, 'h02);
reg_check('h04, 'h03);
acc.write('h00, 'h00);
repeat(2) @(posedge clk_125m);
$write("PASS\n");
-----/\----- EXCLUDED -----/\----- */
$
write
(
"Test %0d/%0d: 2x128B chained reads over DMA: "
,
ntest
++,
tests
)
;
...
...
@@ -347,26 +315,26 @@ module main;
#
1u
s
;
end
$
write
(
"Test %0d/%0d:
8K
B read over DMA with 32bit host address overflow: "
,
$
write
(
"Test %0d/%0d:
256
B read over DMA with 32bit host address overflow: "
,
ntest
++,
tests
)
;
acc
.
write
(
'h14
,
'h
20
00
)
;
// count
acc
.
write
(
'h14
,
'h
1
00
)
;
// count
acc
.
write
(
'h20
,
'h00
)
;
// attrib
acc
.
write
(
'h0c
,
'hfffff
00
0
)
;
// hstartL
acc
.
write
(
'h0c
,
'hfffff
f8
0
)
;
// hstartL
acc
.
write
(
'h10
,
'h00000000
)
;
// hstartH
acc
.
write
(
'h00
,
'h01
)
;
// start
// Transfer will be split internally by L2P DMA master in two requests, the first
// one with a 32-bit adress starting at ffff_f
00
0 and the next one with a 64-bit
// one with a 32-bit adress starting at ffff_f
f8
0 and the next one with a 64-bit
// address starting at 1_0000_0000
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_dframe
)
;
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
sys_clk
)
;
val_check
(
"Host address overflow header"
,
1
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
'h02ff00
0
0
)
;
val_check
(
"Host address overflow header"
,
1
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
'h02ff00
2
0
)
;
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
sys_clk
)
;
val_check
(
"Host address overflow address"
,
1
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
'hfffff
00
0
)
;
val_check
(
"Host address overflow address"
,
1
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
'hfffff
f8
0
)
;
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_dframe
)
;
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
sys_clk
)
;
val_check
(
"Host address overflow header"
,
2
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
'h03ff00
0
0
)
;
val_check
(
"Host address overflow header"
,
2
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
'h03ff00
2
0
)
;
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
sys_clk
)
;
val_check
(
"Host address overflow address high"
,
2
,
DUT
.
cmp_wrapped_gn4124
.
ldm_arb_data
,
1
)
;
@
(
posedge
DUT
.
cmp_wrapped_gn4124
.
sys_clk
)
;
...
...
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