99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

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

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程序設計代做
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
    合肥機場巴士2號線
    合肥機場巴士2號線
    合肥機場巴士1號線
    合肥機場巴士1號線
  • 短信驗證碼 豆包 幣安下載 AI生圖 目錄網

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

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

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                国产午夜亚洲精品午夜鲁丝片| 精品国产乱码久久久久久夜甘婷婷 | 精品欧美一区二区久久| 激情综合色综合久久| 国产午夜精品福利| 欧美视频自拍偷拍| 国产精品一区二区免费不卡| 亚洲女厕所小便bbb| 精品国产精品一区二区夜夜嗨| 91亚洲精品一区二区乱码| 日本成人在线看| 亚洲人成小说网站色在线| 日韩美女天天操| 色偷偷久久人人79超碰人人澡| 一区二区中文字幕在线| 91色在线porny| 另类成人小视频在线| 国产精品大尺度| 欧美videossexotv100| 欧美一a一片一级一片| 国产精品99久久久久久久女警| 一区二区三区美女| 欧美极品xxx| 欧美一二三四区在线| 91在线观看视频| 国内精品自线一区二区三区视频| 亚洲综合在线五月| 国产精品久久久久久久久晋中 | 成人免费观看男女羞羞视频| 丝袜美腿亚洲一区二区图片| 中文字幕在线一区| 精品日韩一区二区三区免费视频| 91国产丝袜在线播放| 国产传媒欧美日韩成人| 蜜臀av一区二区在线观看| 亚洲人精品午夜| 中文字幕视频一区| 精品久久久久一区二区国产| 日本韩国欧美三级| 成人黄色av网站在线| 韩国av一区二区三区四区| 日本午夜精品一区二区三区电影| 亚洲欧美日韩国产一区二区三区| 国产色一区二区| 久久精品一区四区| 精品国产伦一区二区三区观看体验 | 欧美日韩国产天堂| 91国偷自产一区二区开放时间| 成人av先锋影音| 国产成人啪免费观看软件 | 6080yy午夜一二三区久久| 欧美亚洲自拍偷拍| 在线观看www91| 色婷婷综合激情| 色菇凉天天综合网| 99re视频精品| 国产一区二区精品久久| 免费观看30秒视频久久| 一区二区三区四区在线免费观看| 国产精品卡一卡二卡三| 欧美精彩视频一区二区三区| 国产区在线观看成人精品| 国产日韩欧美精品电影三级在线 | 偷拍亚洲欧洲综合| 午夜精品免费在线观看| 亚洲韩国一区二区三区| 视频一区国产视频| 美女脱光内衣内裤视频久久影院| 免费欧美在线视频| 亚洲成人免费视频| 国产精品888| 日韩免费一区二区| 亚洲一区二区三区四区五区中文| 欧美精品xxxxbbbb| 亚洲人成精品久久久久| 不卡一区二区中文字幕| 国产日本亚洲高清| 播五月开心婷婷综合| 韩国成人在线视频| 蜜臀久久久久久久| 亚洲国产精品99久久久久久久久 | 福利91精品一区二区三区| 日韩一区二区免费视频| 国产精品美女一区二区| 一区二区三区日韩欧美| 国产三级精品在线| 欧美专区日韩专区| 亚洲国产欧美日韩另类综合| 日韩欧美你懂的| 91在线视频播放| 麻豆免费看一区二区三区| 91精品久久久久久蜜臀| 91丝袜国产在线播放| 久久99国产乱子伦精品免费| 日韩精品中文字幕一区二区三区| 一本大道久久a久久综合| 亚洲免费观看在线观看| 久久精品人人做人人综合 | 日韩欧美一区二区不卡| 91精品麻豆日日躁夜夜躁| 亚洲国产视频在线| 色先锋aa成人| 精品欧美乱码久久久久久1区2区| 久久综合国产精品| 日韩精品在线一区| 无码av免费一区二区三区试看 | 久久久www免费人成精品| 天涯成人国产亚洲精品一区av| 一区二区免费在线| 免费成人在线播放| 国产高清亚洲一区| 色呦呦网站一区| 制服.丝袜.亚洲.另类.中文| 日韩欧美一级二级三级久久久| 91麻豆精品国产91久久久久久久久 | 91亚洲午夜精品久久久久久| 欧美日韩在线不卡| 日韩一区二区中文字幕| 国产女人水真多18毛片18精品视频| 国产性做久久久久久| 亚洲黄色小说网站| 国产精品一区二区你懂的| 欧美日韩精品欧美日韩精品一| 宅男在线国产精品| 欧美一级淫片007| 2021久久国产精品不只是精品| 欧美激情一区二区在线| 日韩视频免费直播| 欧美综合视频在线观看| 欧美成人三级电影在线| 亚洲三级免费观看| 欧美网站大全在线观看| 日本欧美在线看| 一区二区成人在线视频| 国产精品一区二区你懂的| 欧美久久久久久蜜桃| 亚洲三级理论片| 成人免费av资源| 久久精品欧美日韩精品| 美洲天堂一区二卡三卡四卡视频| 欧美性极品少妇| 亚洲欧洲日韩在线| 成人av网站免费观看| 国产视频一区二区在线| 国产在线乱码一区二区三区| 日韩一区二区三区在线视频| 日韩和欧美的一区| 91精品蜜臀在线一区尤物| 国产精品久久国产精麻豆99网站 | 91网站在线播放| 中文字幕第一区二区| 国产福利不卡视频| 国产欧美一区二区精品仙草咪| 国产在线观看免费一区| 久久亚洲二区三区| 国产裸体歌舞团一区二区| 精品国产电影一区二区| 国内外成人在线| 久久精品亚洲麻豆av一区二区| 国产黑丝在线一区二区三区| 国产日韩v精品一区二区| 国产精品一区专区| 国产日韩欧美一区二区三区综合| 成人午夜激情片| 亚洲色图视频网| 欧美性色欧美a在线播放| 亚洲超丰满肉感bbw| 91精品国产综合久久久蜜臀粉嫩| 久久福利资源站| 国产精品欧美久久久久一区二区| 成人性生交大片免费看中文网站| 亚洲视频一区二区在线| 欧美影片第一页| 首页欧美精品中文字幕| 欧美成人伊人久久综合网| 国产精品自拍一区| 国产精品麻豆网站| 午夜日韩在线电影| 色琪琪一区二区三区亚洲区| 国产精品美女久久久久高潮| 国产成人免费av在线| 中文字幕中文字幕一区二区 | 日韩avvvv在线播放| 6080午夜不卡| 国内精品久久久久影院一蜜桃| 国产日韩欧美精品一区| 色先锋资源久久综合| 日本午夜精品视频在线观看| 国产午夜精品美女毛片视频| 成人高清在线视频| 亚洲欧美日韩国产手机在线| 欧美一区二区三区喷汁尤物| 高清不卡一二三区| 亚洲一区电影777| 欧美va亚洲va| 99久久综合色| 秋霞电影网一区二区| 中文字幕一区二区三区乱码在线| 在线观看亚洲精品| 激情图片小说一区|