contributed by < padaray >
開發環境
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ lscpu
contributed by < padaray >
quiz3
測驗 1
計算平方根
版本一:
對輸入的參數 N 以 2 為底數取 log,意義是當我們將 N 取 log2 時,可以得到 most significant bit (msb)。
對 1 左移 msb 個位元後存入變數 a ,意義是找出一個必定大於 N 的平方根的數,利用此數來逼近找到 N 的平方根。
最後使用 while 迴圈,計算 a + result 的平方是否大於 N,若小於 N 則將此數存入 result 變數,對 a 右移 1 bit,繼續計算,直到 a = 0。
contributed by < RayChen >
Environment Issue
When executing the sbt -version command in the terminal of VSCode, the response is correct.
sbt version in this project: 1.9.7
sbt script version: 1.9.7
When executing sbt test the following error occurs.
[error] /home/ray870317/java/jdk/ca2023-lab3/src/main/scala/riscv/core/ALU.scala:6:8: not found: object chisel3
contributed by < RayChen >
Selected Question
I chose the Find Leftmost 0-byte using CLZ as my assignment from 陳川曜.
The motivation is because I'm interested in his project, especially since my HW1 also involved the application of CLZ. I didn't realize there could be this kind of application, and I'd like to gain a deeper understanding of his code. I want to explore if there are ways to enhance its efficiency and contribute to his project.
Analysis Origin Code
Checking cycle counts from C code
1. C code
Jim Huang changed a year agoView mode Like Bookmark