Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FPGA Configuration Space
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
FPGA Configuration Space
Commits
5c34c585
Commit
5c34c585
authored
Nov 17, 2011
by
Manohar Vanga
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simulation: fw: fix endianness of all fields
Signed-off-by:
Manohar Vanga
<
manohar.vanga@cern.ch
>
parent
85d9d94b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
wb_cfggen.c
simulation/fw/wb_cfggen.c
+11
-11
No files found.
simulation/fw/wb_cfggen.c
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'
;
...
...
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