Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
rtic_f4xx_nucleo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
Ruben Asplund
rtic_f4xx_nucleo
Commits
5ba70578
Commit
5ba70578
authored
4 years ago
by
Ruben Asplund
Browse files
Options
Downloads
Patches
Plain Diff
Corrected rtt_timing.rs
parent
1e46e967
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
examples/rtt_timing.rs
+5
-5
5 additions, 5 deletions
examples/rtt_timing.rs
with
5 additions
and
5 deletions
examples/rtt_timing.rs
+
5
−
5
View file @
5ba70578
...
...
@@ -72,7 +72,7 @@ fn timed_loop() -> (u32, u32) {
//
// A.2) How many cycles per iteration?
//
// [4790154/1000 = 479
0
]
// [4790154/1000
0
= 479]
//
// A.3) Why do we need a wrapping subtraction?
//
...
...
@@ -91,7 +91,7 @@ fn timed_loop() -> (u32, u32) {
//
// What is the speedup (A/B)?
//
// [A/B = 479
0
/7 = 68
4
times]
// [A/B = 479/7 = 68 times]
//
// Why do you think it differs that much?
//
...
...
@@ -117,15 +117,15 @@ fn timed_loop() -> (u32, u32) {
// C.1) What is the cycle count for the loop?
// > cargo run --example rtt_timing --release --features nightly
//
// [909736501 - 909732500 = 4001]
// [909736501 - 909732500 = 400
0
1]
//
// C.2) How many cycles per iteration?
//
// [4001/1000 = 4]
// [400
0
1/1000
0
= 4]
//
// What is the speedup (A/C)?
//
// [479
0
/4 = 1198 times]
// [479/4 = 119
.
8 times]
//
// ------------------------------------------------------------------------
// D) Now lets have a closer look at the generated assembly.
...
...
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