kkkkk1109

@kkkkk1109

Joined on Nov 24, 2022

  • contributed by < kkkkk1109 > 安裝 Ubuntu-22.04 下載 Ubuntu 22.04.4 LTS (Jammy Jellyfish) 安裝完後在開機時卡住,網站 說明可能是獨顯啟動時造成黑屏,因此前往 recovery mode,修改 /etc/default/grub GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
     Like  Bookmark
  • Todo : 閱讀 https://hackmd.io/@sysprog/concurrency 並紀錄問題 Todo : quiz9/quiz10/quiz12 (or newer) 閱讀並行和多執行緒設計 概念 Concurrency(並行) : 將各個程式拆成多個可獨立運作的 process/thread 來執行,並分配在不同時間點做不同的事 Parallelism(平行) : 在多核或多處理器的架構中,將任務分配給不同的硬體來同時處理,注重在規劃。 上述兩種方式都會遇到同個問題,資料的 Sychronization(同步處理)。其作用是確保各個處理單元在運作時,不會因為處理的先後順序不同而造成錯誤。
     Like  Bookmark
  • contributed by < kkkkk1109 > Reviewed by Kuanch 未完成 lib/list_sort.c 部分 研讀論文〈Dude, is my code constant time?〉我傾向至少將程式碼一一和文章對應,譬如它是如何計算執行時間、怎麼做後處理、如何計算統計量等等;或參考 vax-r 同學,他以記錄自身的問題以及解答撰寫本節 Git 部分 都在 master 上開發,並沒有開新分支,故無法練習使用 git rebase或其他操作;建議可以先試試看新增新分支後只提交一個 commit 再試著 git rebase;可以用一些圖形管理去看 git tree,stackoverflow 也有命令列的使用方法。 另外,一些 commit message 可以再補充,如 commit 1568416,可以參考 commit a0b17c1 既然你認為同學做不好,示範一次好的做法,並說明為何你的方式較好,這樣才有程式碼審查的效果。 :notes: jserv
     Like 1 Bookmark
  • contributed by < kkkkk1109 > 閱讀 因為自動飲料機而延畢的那一年 看了這個故事覺得很有感觸,起初對於自動飲料機,想像中的其實很簡單,只要寫個程式,做個模具,一切都會順其自然地完成了。但事實則不然,從 3D 印表機導致的公差錯誤,冰塊分配器的製作和運送,電路的焊接,到最後的第一杯飲料,過程都是複雜及瑣碎的。我覺得對我來說最大的啟發應該就是不懂裝懂這件事。在尚未實作或是實踐之前,都以為這個方法可行、簡單。但事實上,實際執行才會遇到實際會發生的問題。 在思考如何解決冰塊分配器的問題時,老師回答道 我相信這個問題絕對不會沒有人碰過,一定有人解決過,所以你不該卡在這裡,因為這件事卡在這裡是相當不值得的。 這句話非常打動我,無論是研究或是計畫中,常常遇到突然出現的問題,但這些事一定有人也有遇過,若台灣沒有,那其他國家可能會有。而真正該花心思的是如何去達成別人沒有達成的事,並且失敗是不可恥的,可恥的是無法接受失敗。
     Like  Bookmark
  • contributed by < kkkkk1109 > 2024q1 第一周測驗題 測驗 1 此題主要為參考Optimized QuickSort — C Implementation (Non-Recursive)的方式,來實作非遞迴的快速排序法。 傳統的快速排序法: void sort(int arr[], int beg, int end) {
     Like  Bookmark
  • contributed by < kkkkk1109 > 2024q1 第3周測驗題 測驗 1 測驗一主要為使用 bitwise 的方式來進行平方根的計算,以下為版本一 #include <math.h> int i_sqrt(int N) { int msb = (int) log2(N);
     Like  Bookmark
  • contributed by < kkkkk1109 > Introduction In this assignment, we are asked to learn Chisel and implement a single-cycle RISC-V CPU. By following the steps in Lab3, I complete mycpu, which is the object mentioned above, and test my assembly code from Assignment 2.In addition, there are explanations for the signals at different stages of mycpu along with evidence of successful tests. Hello World in Chisel class Hello extends Module { val io = IO(new Bundle { val led = Output(UInt(1.W)) })
     Like 1 Bookmark
  • contributed by < kkkkk1109 > Rewrite Reducing memory usage with bfloat and bfloat multiplication I choose the problem Reducing memory usage with bfloat and bfloat multiplication from <Brian Cheng>. In assignment 1 ,I ultilized CLZ to implement the square root. Since there were division and addition of floatint point, I want to learn some more floating point operation. Also, I think the topic is quite interesting by merging two bf16 to one register, and I'm wondering the accuracy between bf16 and IEEE754. Therefore, I choose this subject in assignment 2. Original C code: #include<stdio.h> float fp32_to_bf16(float x)
     Like  Bookmark
  • contributed by < kkkkk1109 > Rewrite Reducing memory usage with bfloat and bfloat multiplication go to .s cd target.s address to run the elf file build/rv32emu address/target.elf to compile c code
     Like  Bookmark
  • contributed by < kkkkk1109 > Using Newton-Raphson to find square root The Newton-Raphson method is a numerical iteration technique used to approximate the root of a function. The method starts with an initial guess for the root and then uses the tangent line at that guess to find the x-intercept. This x-intercept is taken as the next estimated root, and the process is repeated iteratively to obtain an approximate value for the root. \begin{gather*}x_{n+1}=x_n-\dfrac{f(x_n)}{f^{'}(x_n)}\end{gather*} To find the square root of a integer number, the function can be defined as \begin{gather*}{f(x_n)=x_n^2-a}\end{gather*} where $a$ is the integer number
     Like  Bookmark