Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FPGA Configuration Space
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
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
Projects
FPGA Configuration Space
Commits
5c34c585
Commit
5c34c585
authored
13 years ago
by
Manohar Vanga
Browse files
Options
Downloads
Patches
Plain Diff
simulation: fw: fix endianness of all fields
Signed-off-by:
Manohar Vanga
<
manohar.vanga@cern.ch
>
parent
85d9d94b
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
simulation/fw/wb_cfggen.c
+11
-11
11 additions, 11 deletions
simulation/fw/wb_cfggen.c
with
11 additions
and
11 deletions
simulation/fw/wb_cfggen.c
+
11
−
11
View file @
5c34c585
...
...
@@ -60,8 +60,8 @@ struct sdwb_head *sdwb_create_header(uint64_t wbid_addr, uint64_t wbd_addr)
memset
(
head
,
0
,
sizeof
(
struct
sdwb_head
));
head
->
magic
=
SDWB_HEAD_MAGIC
;
head
->
wbid_address
=
wbid_addr
;
head
->
wbd_address
=
wbd_addr
;
head
->
wbid_address
=
htonll
(
wbid_addr
)
;
head
->
wbd_address
=
htonll
(
wbd_addr
)
;
return
head
;
}
...
...
@@ -93,15 +93,15 @@ struct sdwb_wbd *sdwb_create_device(uint8_t major, uint8_t minor,
return
NULL
;
dev
->
wbd_magic
=
SDWB_WBD_MAGIC
;
dev
->
wbd_version
=
(((
major
&
0xFF
)
<<
8
)
|
((
minor
)
&
0xFF
));
dev
->
vendor
=
vendor
;
dev
->
device
=
device
;
dev
->
hdl_base
=
base
;
dev
->
hdl_size
=
size
;
dev
->
wbd_flags
=
flags
;
dev
->
hdl_class
=
class
;
dev
->
hdl_version
=
version
;
dev
->
hdl_date
=
date
;
dev
->
wbd_version
=
htonl
(
(((
major
&
0xFF
)
<<
8
)
|
((
minor
)
&
0xFF
))
)
;
dev
->
vendor
=
htonll
(
vendor
)
;
dev
->
device
=
htonl
(
device
)
;
dev
->
hdl_base
=
htonll
(
base
)
;
dev
->
hdl_size
=
htonll
(
size
)
;
dev
->
wbd_flags
=
htonl
(
flags
)
;
dev
->
hdl_class
=
htonl
(
class
)
;
dev
->
hdl_version
=
htonl
(
version
)
;
dev
->
hdl_date
=
htonl
(
date
)
;
strncpy
(
dev
->
vendor_name
,
vname
,
16
);
strncpy
(
dev
->
device_name
,
dname
,
16
);
dev
->
vendor_name
[
15
]
=
'\0'
;
...
...
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