initial commit

This commit is contained in:
2025-08-02 06:09:31 +03:00
commit 00015ffc03
85 changed files with 62051 additions and 0 deletions

13
FIRMWARE/test_rdcycle.c Normal file
View File

@@ -0,0 +1,13 @@
#include "perf.h"
int main() {
for(int i=0; i<100; ++i) {
uint64_t cycles = rdcycle();
uint64_t instret = rdinstret();
printf("i=%d cycles=%d instret=%d\n", i, (int)cycles, (int)instret);
}
uint64_t instret = rdinstret();
uint64_t cycles = rdcycle();
printf("cycles=%d instret=%d 100CPI=%d\n", (int)cycles, (int)instret, (int)(100*cycles/instret));
}