Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question occurs when i run qsort example program on e203 #2

Open
zhvn100 opened this issue Mar 9, 2021 · 2 comments
Open

question occurs when i run qsort example program on e203 #2

zhvn100 opened this issue Mar 9, 2021 · 2 comments

Comments

@zhvn100
Copy link

zhvn100 commented Mar 9, 2021

subprogram can‘t return main function through ret instr. For example, verify_qsort funct can't return main, when executing 0x80001074 pc directly jumps to 0x00000000 ,then jumps to interrupt funct - trap_entry(0x80000120) ,as shown in the figure below。
image
image

According to my understanding,the right process is that verify_qsot returns to main , main returns to _init , _init returns to exit.
So , please tell me whether qsort program can run on e203 , or where does problem maybe occur ?

@hucan7
Copy link
Contributor

hucan7 commented Mar 29, 2021

Actually,I tried to run a test which contains qsort func on hbirdv2 SoC, and finally the result was successful.
For your case,I suggest you may check whether the "ret" is executed correctly through checking more related signals at first.

@zhvn100
Copy link
Author

zhvn100 commented Mar 31, 2021

qsort func is under the benchmark dir. whether you use objcopy to get verilog(bin) file from original riscv(elf) file. Then through tb.v , dump instuction into imem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants