Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
M
mock-turtle
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
hdl-core-lib
mock-turtle
Commits
2fcb1358
Commit
2fcb1358
authored
May 04, 2018
by
Dimitris Lampridis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sw:fw: properly implement trtl_get_core_id(), using wbgen offsets and masks
parent
36e000e4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
mockturtle-rt.h
software/firmware/lib/mockturtle-rt.h
+6
-2
No files found.
software/firmware/lib/mockturtle-rt.h
View file @
2fcb1358
...
...
@@ -331,11 +331,15 @@ static inline void trtl_notify_user(unsigned int id)
/**
* It returns the core ID on which the firmware is running
* @return the core ID
* @todo implement me
*/
static
inline
uint32_t
trtl_get_core_id
(
void
)
{
return
lr_readl
(
0
);
uint32_t
core_id
=
lr_readl
(
MT_CPU_LR_REG_STAT
);
core_id
&=
MT_CPU_LR_STAT_CORE_ID_MASK
;
core_id
>>=
MT_CPU_LR_STAT_CORE_ID_SHIFT
;
return
core_id
;
}
/**
...
...
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