Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
NanoSoC Tech
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SoCLabs
NanoSoC Tech
Commits
f783f487
Commit
f783f487
authored
11 months ago
by
Daniel Newbrook
Browse files
Options
Downloads
Patches
Plain Diff
Add fast loader option to testbench
parent
80433754
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v
+27
-16
27 additions, 16 deletions
verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v
with
27 additions
and
16 deletions
verif/trace/verilog/nanosoc_axi_stream_io_8_txd_from_file.v
+
27
−
16
View file @
f783f487
...
...
@@ -18,7 +18,8 @@
module
nanosoc_axi_stream_io_8_txd_from_file
#(
parameter
TXDFILENAME
=
"adp.cmd"
,
parameter
CODEFILENAME
=
"image.hex"
,
parameter
VERBOSE
=
0
)
parameter
VERBOSE
=
0
,
parameter
FAST_LOAD
=
1
)
(
input
wire
aclk
,
input
wire
aresetn
,
...
...
@@ -104,21 +105,31 @@ localparam BUFSIZE = (64 * 1024);
adpbuf
[
9
]
=
"0"
;
//
adpbuf
[
10
]
=
"0"
;
//
adpbuf
[
11
]
=
8'h0a
;
// newline
adpbuf
[
12
]
=
"U"
;
// set upload filesize (N bytes)
adpbuf
[
13
]
=
" "
;
// only up to 1Mbyte for now!
adpbuf
[
14
]
=
FNmap_hex_digit
(
codesize
[
19
:
16
]);
//
adpbuf
[
15
]
=
FNmap_hex_digit
(
codesize
[
15
:
12
]);
//
adpbuf
[
16
]
=
FNmap_hex_digit
(
codesize
[
11
:
8
]);
//
adpbuf
[
17
]
=
FNmap_hex_digit
(
codesize
[
7
:
4
]);
//
adpbuf
[
18
]
=
FNmap_hex_digit
(
codesize
[
3
:
0
]);
//
adpbuf
[
19
]
=
8'h0a
;
// newline
$
readmemh
(
CODEFILENAME
,
adpbuf
,
20
);
adpbuf
[
clen
+
20
]
=
"C"
;
// control
adpbuf
[
clen
+
21
]
=
" "
;
adpbuf
[
clen
+
22
]
=
"2"
;
// (gpio bit set)
adpbuf
[
clen
+
23
]
=
"0"
;
adpbuf
[
clen
+
24
]
=
"1"
;
// assert reset to reboot
adpbuf
[
clen
+
25
]
=
8'h0a
;
// newline
if
(
FAST_LOAD
==
0
)
begin
adpbuf
[
12
]
=
"U"
;
// set upload filesize (N bytes)
adpbuf
[
13
]
=
" "
;
// only up to 1Mbyte for now!
adpbuf
[
14
]
=
FNmap_hex_digit
(
codesize
[
19
:
16
]);
//
adpbuf
[
15
]
=
FNmap_hex_digit
(
codesize
[
15
:
12
]);
//
adpbuf
[
16
]
=
FNmap_hex_digit
(
codesize
[
11
:
8
]);
//
adpbuf
[
17
]
=
FNmap_hex_digit
(
codesize
[
7
:
4
]);
//
adpbuf
[
18
]
=
FNmap_hex_digit
(
codesize
[
3
:
0
]);
//
adpbuf
[
19
]
=
8'h0a
;
// newline
$
readmemh
(
CODEFILENAME
,
adpbuf
,
20
);
adpbuf
[
clen
+
20
]
=
"C"
;
// control
adpbuf
[
clen
+
21
]
=
" "
;
adpbuf
[
clen
+
22
]
=
"2"
;
// (gpio bit set)
adpbuf
[
clen
+
23
]
=
"0"
;
adpbuf
[
clen
+
24
]
=
"1"
;
// assert reset to reboot
adpbuf
[
clen
+
25
]
=
8'h0a
;
// newline
end
else
begin
clen
=
0
;
adpbuf
[
12
]
=
"C"
;
// control
adpbuf
[
13
]
=
" "
;
adpbuf
[
14
]
=
"2"
;
// (gpio bit set)
adpbuf
[
15
]
=
"0"
;
adpbuf
[
16
]
=
"1"
;
// assert reset to reboot
adpbuf
[
17
]
=
8'h0a
;
// newline
end
// append any ADP command file to the code memory preload
flen
=
0
;
fd
=
$
fopen
(
TXDFILENAME
,
"r"
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment