Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stud-support
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
Container 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
Yuan, Weize
stud-support
Commits
c5043359
Commit
c5043359
authored
1 year ago
by
Yuan, Weize
Browse files
Options
Downloads
Patches
Plain Diff
Update fibo-hazards-template.S
parent
4280638a
Branches
master
No related tags found
No related merge requests found
Pipeline
#64323
failed
1 year ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
seminaries/qtrvsim/fibo-hazards/fibo-hazards-template.S
+39
-28
39 additions, 28 deletions
seminaries/qtrvsim/fibo-hazards/fibo-hazards-template.S
with
39 additions
and
28 deletions
seminaries/qtrvsim/fibo-hazards/fibo-hazards-template.S
+
39
−
28
View file @
c5043359
//
fibo
-
hazards.S
file
template
,
rename
and
implement
the
algorithm
//
Test
algorithm
in
qtrvsim_gui
program
//
Select
the
CPU
core
configuration
to
//
Pipelined
without
hazard
unit
and
cache
//
This
option
select
version
where
RAW
dependencies
which
leads
//
to
hazards
are
not
resolved
in
hardware
,
you
need
to
schedule
//
instruction
execution
according
to
the
pipeline
structure
//
(
classical
5
-
stage
RISC
-
V
)
such
way
,
that
no
dependency
results
//
in
a
hazard
//
copy
directory
with
the
project
to
your
repository
to
//
the
directory
work
/
fibo
-
hazards
//
critical
is
location
of
the
file
work
/
fibo
-
hazards
/
fibo
-
hazards
.
S
//
which
is
checked
by
the
scripts
//
The
script
loads
number
of
the
last
Fibonacci
series
element
to
compute
//
into
fibo_limit
variable
and
expects
computed
series
in
memory
starting
//
at
address
fibo_series
,
the
series
has
to
be
followed
by
at
least
//
one
zero
element
//
Directives
to
make
interesting
windows
visible
#pragma qtrvsim show registers
#pragma qtrvsim show memory
...
...
@@ -31,27 +11,58 @@
.
globl
_start
_start
:
la
a1
,
fibo_limit
la
a1
,
fibo_limit
la
a0
,
fibo_series
la
a0
,
fibo_series
addi
a1
,
a1
,
8
nop
addi
a0
,
a0
,
8
lw
a1
,
0
(
a1
)
li
t0
,
0
nop
nop
sw
t0
,
0
(
a0
)//
21
c
li
t0
,
1
nop
nop
sw
t0
,
4
(
a0
)
//
228
li
t1
,
2
addi
a2
,
a0
,
8
la
a0
,
fibo_series
la
a1
,
fibo_limit
lw
a1
,
0
(
a1
)
//
number
of
elements
in
the
array
fibo
:
beq
t1
,
a1
,
end_loop
nop
lw
t2
,
-
4
(
a2
)
lw
t3
,
-
8
(
a2
)
nop
nop
add
t4
,
t2
,
t3
nop
nop
sw
t4
,
0
(
a2
)
addi
a2
,
a2
,
4
addi
t1
,
t1
,
1
j
fibo
nop
//
Insert
your
code
there
//
Final
infinite
loop
end_loop
:
fence
//
flush
cache
memory
ebreak
//
stop
the
simulator
j
end_loop
nop
.
data
//
.
align
2
//
not
supported
by
QtRVSim
yet
fibo_limit
:
.
word
1
5
.
word
1
2
fibo_series
:
.
skip
1000
*
4
//
Specify
location
to
show
in
memory
window
#pragma qtrvsim focus memory fibo_limit
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