Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Killer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
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
Show more breadcrumbs
Vytor Calixto
Killer
Commits
92f26f25
Commit
92f26f25
authored
10 years ago
by
Roberto Hexsel
Browse files
Options
Downloads
Patches
Plain Diff
two fixes to UART experiments
parent
1ba27cc9
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cMIPS/include/handlers.s
+11
-8
11 additions, 8 deletions
cMIPS/include/handlers.s
cMIPS/tests/extCounter.c
+1
-2
1 addition, 2 deletions
cMIPS/tests/extCounter.c
cMIPS/tests/uarttx.c
+1
-1
1 addition, 1 deletion
cMIPS/tests/uarttx.c
with
13 additions
and
11 deletions
cMIPS/include/handlers.s
+
11
−
8
View file @
92f26f25
...
...
@@ -12,6 +12,7 @@
.
bss
.
align
2
.
set
noreorder
.
global
_counter_val
#
accumulate
number
of
interrupts
.
comm
_counter_val
4
.
comm
_counter_saves
8
*
4
#
area
to
save
up
to
8
registers
...
...
@@ -31,7 +32,8 @@ extCounter:
#----------------------------------
#
save
additional
registers
#
la
$k1
,
_counter_saves
#
lui
$k1
,
%
hi
(
_counter_saves
)
#
ori
$k1
,
$k1
,
%
lo
(
_counter_saves
)
#
sw
$a0
,
0
*
4
(
$k1
)
#
sw
$a1
,
1
*
4
(
$k1
)
#----------------------------------
...
...
@@ -48,8 +50,9 @@ extCounter:
sw
$k1
,
0
(
$k0
)
#----------------------------------
#
and
then
restore
same
registers
#
la
$k1
,
_counter_saves
#
and
then
restore
those
same
registers
#
lui
$k1
,
%
hi
(
_counter_saves
)
#
ori
$k1
,
$k1
,
%
lo
(
_counter_saves
)
#
lw
$a0
,
0
*
4
(
$k1
)
#
lw
$a1
,
1
*
4
(
$k1
)
#----------------------------------
...
...
@@ -69,6 +72,7 @@ extCounter:
.
bss
.
align
2
.
set
noreorder
.
global
rx_queue
,
rx_hd
,
rx_tl
#
reception
queue
and
pointers
.
comm
rx_queue
16
.
comm
rx_hd
4
...
...
@@ -201,4 +205,3 @@ cmips_delay:
nop
.
end
cmips_delay
#----------------------------------------------------------------
\ No newline at end of file
This diff is collapsed.
Click to expand it.
cMIPS/tests/extCounter.c
+
1
−
2
View file @
92f26f25
...
...
@@ -14,13 +14,12 @@ void main(void) {
int
i
,
increased
,
new
,
old
,
newValue
;
newValue
=
CNT_VALUE
;
startCounter
(
newValue
,
0
);
// no interrupts
for
(
i
=
0
;
i
<
N
;
i
++
)
{
// repeat N rounds
print
(
i
);
// print number of round
newValue
=
CNT_VALUE
+
(
i
<<
3
);
startCounter
(
newValue
,
0
);
// num cycles increases with i
startCounter
(
newValue
,
0
);
// num cycles increases with i
, no interrupts
increased
=
TRUE
;
old
=
0
;
...
...
This diff is collapsed.
Click to expand it.
cMIPS/tests/uarttx.c
+
1
−
1
View file @
92f26f25
...
...
@@ -44,7 +44,7 @@ typedef struct serial {
#define LONG_STRING 1
#if LONG_STRING
char
*
dog
=
"
\
n\
t
the quick brown fox jumps over the lazy dog
\n
"
;
char
*
dog
=
"
\t
the quick brown fox jumps over the lazy dog"
;
char
s
[
32
];
#else
char
s
[
32
];
// = "123";
...
...
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