Skip to content

Commit

Permalink
cleaned software
Browse files Browse the repository at this point in the history
  • Loading branch information
0BAB1 committed Apr 26, 2024
1 parent a55f5dc commit c72b1ef
Showing 1 changed file with 3 additions and 20 deletions.
23 changes: 3 additions & 20 deletions sw/app/mnist/NetworkPropagate.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,9 @@ static void macsOnRange(const UDATA_T* __restrict inputs,
{
// SUM_T transitionValue;
for (int iter = 0; iter < nb_iterations; ++iter) {
/*
asm volatile ("lb x0, 0(%0)"
:
: "r" (weights+iter)
);
asm volatile ("lbu x0, 0(%0)"
:
: "r" (inputs+iter)
);
*/

//*weightedSum = inputs[iter] * weights[iter];

asm volatile ("lbcu x0, %0"
:
: "m" (inputs[iter])
Expand All @@ -55,15 +47,6 @@ static void macsOnRange(const UDATA_T* __restrict inputs,
:
: "m" (weights[iter])
);
/*
asm volatile ("mul %0, %1, %2"
: "=r" (transitionValue)
: "r" (inputs[iter]), "r" ((signed)weights[iter]));
asm volatile ("add %0, %1, %2"
: "=r" (*weightedSum)
: "r" (*weightedSum), "r" (transitionValue));
*/
}

asm volatile ("mac %0, %0, %1, x0"
Expand Down

0 comments on commit c72b1ef

Please sign in to comment.