Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
Hydra - a radiation-tolerant SoC
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Projects
Hydra - a radiation-tolerant SoC
Commits
54bd3c37
Commit
54bd3c37
authored
2 years ago
by
Tristan Gingold
Browse files
Options
Downloads
Patches
Plain Diff
tomem: pad software, adjust envm config
parent
140833dc
Branches
Branches containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hdl/syn/sf2-test/envm.cfg
+1
-1
1 addition, 1 deletion
hdl/syn/sf2-test/envm.cfg
sw/sf2-test/Makefile
+1
-1
1 addition, 1 deletion
sw/sf2-test/Makefile
sw/sf2-test/tomem.py
+9
-1
9 additions, 1 deletion
sw/sf2-test/tomem.py
with
11 additions
and
3 deletions
hdl/syn/sf2-test/envm.cfg
+
1
−
1
View file @
54bd3c37
nvm_set_data_storage_client
\
-client_name
{code} \
-number_of_words
168
\
-number_of_words
256
\
-word_size
8 \
-use_for_simulation
{0} \
-content_type
{MEMORY_FILE} \
...
...
This diff is collapsed.
Click to expand it.
sw/sf2-test/Makefile
+
1
−
1
View file @
54bd3c37
...
...
@@ -21,7 +21,7 @@ main.o: main.c
${
OBJCOPY
}
-O
binary
$<
$@
%.mem
:
%.bin
./tomem.py
$<
>
$@
./tomem.py
$<
1024
>
$@
$(OUTPUT).elf
:
$(LDS) $(OBJS)
${
XCC
}
$(
CFLAGS
)
-o
$@
-nostartfiles
$(
OBJS
)
-T
$(
LDS
)
-Wl
,-Map
=
$(
OUTPUT
)
.map
...
...
This diff is collapsed.
Click to expand it.
sw/sf2-test/tomem.py
+
9
−
1
View file @
54bd3c37
...
...
@@ -4,15 +4,23 @@ import sys
def
main
():
if
len
(
sys
.
argv
)
<
2
:
sys
.
exit
(
"
Usage: {} FILE
"
.
format
(
sys
.
argv
[
0
]))
sys
.
exit
(
"
Usage: {} FILE
[LEN]
"
.
format
(
sys
.
argv
[
0
]))
filename
=
sys
.
argv
[
1
]
b
=
open
(
filename
,
'
rb
'
).
read
()
if
len
(
b
)
%
4
!=
0
:
sys
.
exit
(
"
length of {} is not a multiple of 4
"
.
format
(
filename
))
if
len
(
sys
.
argv
)
>
1
:
flen
=
int
(
sys
.
argv
[
2
])
if
len
(
b
)
>
flen
:
sys
.
exit
(
"
{} is longer than {}
"
.
format
(
filename
,
flen
))
else
:
flen
=
len
(
b
)
for
i
in
range
(
len
(
b
)):
v
,
=
struct
.
unpack
(
'
<B
'
,
b
[
i
])
print
(
'
{:08b}
'
.
format
(
v
))
for
i
in
range
(
len
(
b
),
flen
):
print
(
'
{:08b}
'
.
format
(
0
))
if
__name__
==
'
__main__
'
:
main
()
This diff is collapsed.
Click to expand it.
Preview
0%
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