加勒比久久综合,国产精品伦一区二区,66精品视频在线观看,一区二区电影

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

CSC3050代做、C++程序設計代寫
CSC3050代做、C++程序設計代寫

時間:2024-11-21  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CSC3050 Project 3: RISC-V Simulator with RVV
1 Background
RISC-V, an open standard instruction set architecture (ISA), has rapidly become a
pivotal force in academic research and industrial development due to its flexibility
and open-source nature. Unlike proprietary ISAs, RISC-V offers the freedom for
developers to customize and extend the architecture, making it an ideal platform
for innovation in research, education, and the design of specialized hardware. One
of its most impactful extensions is the RISC-V Vector Extension (RVV), which
introduces efficient vector processing capabilities—a cornerstone of modern high performance computing. This is especially critical for applications like machine
learning, cryptography, and scientific simulations, where parallel data processing is
essential for improving computational speed and efficiency.
In this project, you are tasked with extending the QTRVSim RISC-V simulator
to support vector operations by implementing some of the RVV instructions.
After reviewing the number of cycles, you will get a feeling of how this is faster
than conducting element-wise operations.
Start early, this project can be time-consuming if you are not familiar with
simulators.
2 QTRVSim
QTRVSim is a RISC-V CPU simulator for education, where you can try its online
version on this link. Just in case you want to try different instructions, you can refer
to this page: RISC-V Instruction Set Specifications. A helpful video about using
QTRVSim can be found on Youtube
After familiarizing yourself with the QtRVSim manual, you can begin planning how
to integrate RVV instructions into the existing implementation. The simulator’s
source code, written in C++ and including both the core simulation functions and
graphical user interfaces (GUIs), can be found in the repository at this link. To test
your modifications, QtRVSim offers two methods for simulating assembly code: GUI
or command-line prompts.
Note: For this project, you are not required to modify any of the GUI components.
Your primary goal is to ensure that the RVV instructions function correctly when
using command-line prompts. Another objective in this project is to save the number
of cycles; the smaller the number you get, the better the score you get.
1
2.1 How to run
We give the example of running QTRVSim on Ubuntu with the terminal. You can
follow these steps:
1. We assume you already have the necessary packages for compiling cpp. If
not, you can easily find tutorial for them on the internet.
2. Install QT6 (QT5 does not work in most cases) with sudo apt install qt6-
base-dev. You might need sudo apt update first, and make sure you are
installing QT6, not QT5.
3. Download QTRVSim from the given repository.
4. Make a new directory for building files (mkdir build; cd build)
5. cmake -DCMAKE BUILD TYPE=Release /path/to/qtrvsim
6. make -j X, where X is the number of threads you want to use
7. If everything goes correctly, you can use ./target/qtrvsim cli –asm XXXXX.S
to run your .S file.
8. Via ./target/qtrvsim cli –help, you can check all helpful arguments.
3 RVV Instructions
In this assignment, you are required to implement the following RVV instructions
(suppose max vector size is **):
1. vsetvl rd, rs1, rs2: sets the length register vl to rs1 and rd, also sets the
register holding the type of vector to rs2 (8/16/**).
2. vadd.vv vd, vs2, vs1: adds two vectors vs2 and vs1, and stores the result
in vd
3. vadd.vx vd, vs2, rs1: adds rs1 to each element of vector vs2, and stores
the result in vd
4. vadd.vi vd, vs2, imm: adds the scalar value imm to each element of vector
vs2, and stores the result in vd
5. vmul.vv vd, vs2, vs1: conducts dot production on two vectors vs2 and vs1,
and stores the result in vd
6. vlw.v vd, (rs1): loads elements stored starting at rs1 into vector vd. The
length to load is dependent on the length stored at vl and the unit length
specified earlier.
7. vsw.v vs3, (rs1): stores vector elements of vs3 into memory starting at rs1.
The length to load is dependent on the length stored at vl and the unit length
specified earlier.
2
Figure 1: Matrix stored as vector
The whole point of this project is that, through the implementation, you will
understand why are vector operations is much faster than manipulate each ele ment individually. For example, writing 100 elements into memory will require 100
individual store instructions if in an element-wise manner. However, using vector
write, you only need to do one vector store instruction.
A detailed explanation of RVV instructions can be found at this manual. Reminder:
Do not forget to update vl when switching to operate on vectors with different
lengths.
4 Matrix Multiplication
After implementing and testing the aforementioned functionalities, you are required
to write a .S file that conduct matrix to matrix multiplication.
Ci,j =
X Ai,kBk,j
k
The actual matrix will be stored as a vector in memory, as shown in Figure 1. In
order to conduct vector multiplication, the size of the matrix n × m will be given.
We require you to generate two random matrices with sizes of 20 × 46 and
46 × 50 where elements can be of your own choice.
5 Tricks
There are several tricks you can apply to reduce cycle counts.
1. Reduction (required): This is similar to calculate the summation of a
vector, but more efficiently. The basic requirement is that you conduct this
summation on each element one-by-one, which leads to excessive cycles.
Another approach is to do binary split, i.e. repeatedly decompose the a vector
of size n into 2 vectors of size n//2, and then conduct vadd. There are also
other trick for conducting reduction, and you can explore any of them.
3
Possible reduction:
(a) scalar loop
(b) vector shift
(c) reduction instruction
(d) ...
2. Chaining (Extra credit): When conducting vector operations, it is not nec essary to wait for the entire instruction to complete. As shown in Figure 2, it
is possible to conduct VADD on the first element, right after obtaining the
first element of VMUL. A much better illustration can be found at Prof.Hsu’s
slides at this link.
Figure 2: chaining
6 Instruction on Implementation
The code involved in QTRVSim is quite complicated. Luckily, you only need to
focus on few script files.
1. src/machine/instruction.cpp: Edit this file to add new instructions. The
boxed fields are:
• instruction name
• instruction enum type (you can edit this by yourself; no need to follow
the example)
• input types (you can go through instruction.cpp to see what char is for
what type)
• machine code (hexadecimal)
• mask for effective bits for instruction (hexadecimal)
• customize flags (you can edit this by yourself; no need to follow the
example)
2. src/machine/core.cpp: Main pipeline of the simulator. You can find fetch,
decode, execute, writeback, memory in it, and edit these codes for your con venience.
4
3. src/machine/execute/alu.cpp: specify what to do for each alu operation.
You can create/edit these codes for your own convenience.
Other files might also interest you, but we will not go through all of them here.
Feel free to modify any codes as long as they work.
Notice: you need to use state.cycle count++; in core.cpp when needed.
Notice2: If you want to use v1,v2... as the vector register, you can modify
parse reg from string() in instruction.cpp.
Notice3: You might want to check dt.num rt, dt.num rd, dt.num rs for specific
register indexing.
Notice4: The largest vector register length is **. Load instruction will have a
memory latency of **. Besides, the cycles for multiplication is 4. (This means that,
to load a vector of length 10, the total cycles will be 1 + 1 + ** + 10 + 1 + 1 = 46)
7 Grading Criteria
The maximum score you can get for this lab is 100 points. We will first exam ine the correctness of your outputs to test cases. Since hard-coding each opera tion is fairly easy in C++, we will check the execution information, such as the
number of cycles, and content in memories/registers. Using of ChatGPT to im prove writing/generate codes/provide ideas is allowed and highly-recommended
as ChatGPT has become one of the best productivity tools.
Conducting ”higher-level” reduction or finishing the task with less number of cycles
will be granted with extra credit.
You are also required to compose a report, where you should show the results
of your test case executions. Besides you also need to show the total number of
cycles and explain where those cycles come from. (few sentences, no need to be
super specific.)
The deadline of this project is 23:59, Tuesday, 2024/11/19. For each day after
the deadline, 10 points will be deducted from your final score up to 30 points, after
which you will get 0 points.
Besides, if anyone is interested in developing with QT, you are more than welcome
to implement GUI support for RVV instruction. If done properly, you will earn extra
credits, and might contribute to future contents of this class.
Feel free to ask questions if you find anything confusing.
5
8 Submission
You should make sure your code compiles and runs. Then, it should be compressed
into a .zip file and submitted to BlackBoard. Any necessary instructions to
compile and run your code should also be documented and included. Finally, you are
also required to include a report containing the results of your test case execution.
6

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp




 

掃一掃在手機打開當前頁
  • 上一篇:24LLP109代做、代寫c/c++編程語言
  • 下一篇:代寫MATH36031、Python程序設計代做
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    亚洲视频成人| 欧美日韩调教| 男女羞羞在线观看| 一区二区自拍| 精品久久久久久久久久久aⅴ| 国产精品v一区二区三区 | 日韩**一区毛片| 久久精品xxxxx| 国产美女高潮在线| 亚洲精品电影| 亚洲91精品| 日韩一区二区三区在线看| 日本特黄久久久高潮| 桃色一区二区| 97精品国产福利一区二区三区| 欧美99在线视频观看| 99精品在免费线中文字幕网站一区 | 亚洲宅男网av| 一区二区三区午夜探花| 欧美成人免费全部网站| 中文字幕人成乱码在线观看| 最新亚洲激情| 激情综合网站| 久久国产成人午夜av影院宅| 深夜福利一区| 西野翔中文久久精品字幕| 欧美国产高清| 在线观看亚洲| 青娱乐精品在线视频| 久久亚洲精品人成综合网| 手机看片久久| 蜜臀久久精品| 快播电影网址老女人久久| 97精品视频| 乱人伦视频在线| 蜜臀av一区二区在线免费观看| 亚洲一区激情| 免费日韩av片| 日韩精品一级二级 | 久久免费黄色| 麻豆精品99| 久久久精品久久久久久96| 群体交乱之放荡娇妻一区二区| 99久久人爽人人添人人澡| 久久爱www.| 欧美三级乱码| 精品日产乱码久久久久久仙踪林| 国产美女撒尿一区二区| 女同一区二区三区| 欧美日韩精品一区二区视频| 一本久久青青| 免费av一区| 伊人久久亚洲影院| 午夜在线精品| 成人在线丰满少妇av| 亚洲女同av| 成人精品国产| 日本少妇一区二区| 欧美黄视频在线观看| 欧美女王vk| 亚洲国产视频二区| 999成人精品视频线3| 欧美精品一区二区久久| 中国女人久久久| 91亚洲自偷观看高清| 日韩激情免费| 国产日韩欧美一区在线| 欧美激情偷拍| 日韩激情欧美| 91精品国产自产拍在线观看蜜| 不卡在线一区| 国产精品不卡| 国产一区二区三区国产精品| 日本成人在线电影网| 精品一区二区三区视频在线播放| 日韩精品社区| 亚洲国内精品| 亚洲综合欧美| 成人不卡视频| 亚洲国产婷婷| 中文一区二区三区四区| 1024日韩| 欧美韩日一区| 一区二区日韩免费看| 国产精一区二区| 欧美激情网址| 巨乳诱惑日韩免费av| se01亚洲视频| 精品一区二区三区中文字幕在线 | 在线精品国产| 欧美91看片特黄aaaa| 欧美一级久久| 精品中文字幕一区二区三区| 中文字幕av一区二区三区人 | 先锋欧美三级| 国产精品2区| 91精品婷婷色在线观看| 丝袜美腿亚洲综合| 精品三区视频| 亚洲欧美综合久久久| 欧美调教网站| 超碰高清在线| 亚洲色图网站| 欧美影院三区| 伊人久久综合一区二区| 欧美精品不卡| 亚洲韩日在线| 欧美天堂在线| 精品国产亚洲一区二区三区 | 人在线成免费视频| 中文无码久久精品| 林ゆな中文字幕一区二区| 欧美国产美女| 国产高清精品二区| 欧美va天堂| 国产综合色激情| 国产精品宾馆| 国产在线精彩视频| av日韩久久| 羞羞色午夜精品一区二区三区| 在线一区av| 日韩av一区二区在线影视| 99视频一区| 国产精品magnet| 免费精品国产的网站免费观看| 视频在线日韩| 99久久免费精品国产72精品九九 | 国产亚洲欧美日韩精品一区二区三区| 日本亚洲一区二区| 日本久久黄色| 亚洲影院天堂中文av色| 国产一区二区精品| 一区二区三区四区电影| 五月天久久网站| 男人亚洲天堂| 亚洲电影在线| 国产日韩1区| 欧美成人高清| 亚洲精品人人| 日韩视频免费| 国产精品国产三级在线观看| 黄色欧美日韩| 91精品在线免费视频| 一本久道久久综合婷婷鲸鱼| 亚洲伦理精品| 国产一区成人| 少妇精品久久久| 国产精品福利在线观看播放| 日韩极品在线| 午夜激情电影在线播放| 一区二区三区视频播放| 日韩大片在线观看| 人人狠狠综合久久亚洲婷| 欧美日韩五区| 九九久久成人| 成人免费91| 黄视频网站在线观看| 国内精品免费| 欧美一区视频| 尹人成人综合网| 亚洲男人都懂第一日本| 伊人久久av| 欧美在线色图| www一区二区三区| 国产精品久久久久久久久妇女| 秋霞一区二区| 欧美在线1区| 亚洲欧美日韩国产综合精品二区| 国产欧美日韩在线一区二区| 日韩伦理精品| 亚洲小说区图片区| 国产精品一区二区三区av麻| 韩日毛片在线观看| 国产在线成人| 国产一区二区亚洲| 午夜精品久久久久久久久久蜜桃| 99精品在线免费在线观看| 你懂的视频一区二区| 97人人精品| 极品日韩av| 日韩福利视频导航| 黑人一区二区三区| 免费日韩av片| 久久99精品久久久久久欧洲站| 亚洲国产精品一区| 欧洲一区精品| 雨宫琴音一区二区在线| 日本中文字幕在线一区| 美腿丝袜亚洲三区| 免费一级欧美片在线观看| 粉嫩一区二区三区四区公司1| 日日欢夜夜爽一区| 中国色在线日|韩| 红桃视频亚洲| 欧美精品国产白浆久久久久| 亚洲综合色站| 国产一区二区三区| 水蜜桃久久夜色精品一区| 国内激情久久| 99国产精品免费网站|