国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

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

CSC3050代做、Java/Python編程代寫
CSC3050代做、Java/Python編程代寫

時間:2025-03-22  來源:合肥網hfw.cc  作者:hfw.cc 我要糾錯



CSC3050 Project 3: RISC-V Simulator
1 Background
Efficient execution of instructions in a RISC-V pipeline relies on avoiding data hazards, where an instruction
depends on the result of a previous instruction that has not yet completed. Data hazards can cause stalls,
reducing the efficiency of the processor. To mitigate these hazards, instruction reordering and specialized fused
operations like fmadd (fused multiply-add) can be utilized.
This assignment has two parts:
• Implementing the fmadd Instruction In this part, you will implement the fused multiply-add (fmadd)
instruction, which performs a multiplication followed by an addition in a single step. This reduces
the number of instructions executed and can eliminate certain data hazards, leading to more efficient
computation.
• Reordering Instructions to Avoid Data Hazards You will be given a sequence of RISC-V instruc tions (add/mul) that suffer from data hazards. Your task will be to rearrange them while maintaining
correctness. This exercise will help you understand the importance of instruction scheduling in hazard
mitigation and performance optimization.
By completing this assignment, you will gain some basic hands-on experience with hazard avoidance
strategies in RISC-V, while learning how fmadd can be used to optimize multiplication-addition sequences and
how instruction reordering can improve pipeline execution efficiency.
2 RISC-V GNU Toolchain
RISC-V GNU Toolchain is already in your Docker, so you do not need to download it from the official link.
But we highly suggest that you open the official link and read the README.
To set up the RISC-V development environment, you need to compile and install the RISC-V GNU toolchain.
This toolchain supports the RISC-V 32I instruction set with M extension (integer multiplication and division),
based on the RISC-V Specification 2.2. Follow these steps to configure and compile the toolchain:
Create a build directory, configure the toolchain, and compile it with the following commands:
mkdir build; cd build
../configure --with-arch=rv32im --enable-multilib --prefix=/path/to/riscv32i
make -j$(nproc)
3 A Simple RISC-V64I Simulator
We use a modified version of Hao He‘s simulator. You can find the modified repository:
1
It is a simple RISC-V Emulator suppprting user mode RV64I instruction set, from PKU Computer Architecture
Labs, Spring 2019.
3.1 Compile
mkdir build
cd build
cmake ..
make
3.2 Usage
./Simulator riscv-elf-file-name [-v] [-s] [-d] [-b strategy]
3.3 Parameters
• -v for verbose output, can redirect output to file for further analysis.
• -s for single step execution, often used in combination with -v.
• -d for creating memory and register history dump in dump.txt.
• -b for branch prediction strategy (default BTFNT), accepted parameters are AT, NT, BTFNT, and BPB.
– AT: Always Taken
– NT: Always Not Taken
– BTFNT: Back Taken Forward Not Taken
– BPB: Branch Prediction Buffer (2-bit history information)
4 Part I: RISC-V32I Simulator
The first task in this assignment is to change the RISC-V64I simulator to be RISC-V32I simulator. This is an
easy job, but we suggest that you carefully read the code and know the logical structure of the simulator.
You can re-compile the sample test cases to test your RISC-V32I simulator. Take quicksort as an example:
riscv32-unknown-elf-gcc -march=rv32i \
test/quicksort.c test/lib.c -o riscv-elf/quicksort.riscv
You can change -march=rv32i to -march=rv32imf for the remain part of the assignment.
5 Part I: Fused Instructions
The fused instruction is part of the RISC-V ISA’s F (single-precision floating-point) and D (double-precision
floating-point) extensions. These extensions provide support for floating-point arithmetic operations. In this
project, you only need to implement the integer version.
2
Take fmadd.s instruction as an example.
This instruction performs a fused multiply-add operation for floating-point numbers, which means it computes
the product of two floating-point numbers and then adds a third floating-point number to the result, all in a
single instruction. Obviously, this operation is beneficial for both performance and precision, as it reduces the
number of rounding errors compared to performing the multiplication and addition separately.
In this assignment, you are required to implement the fused instruction for integer type. We used the same
format as the standard RISCV R4 instruction. We used the reserved custom opcode 0x0B as our opcode.
Inst Name funct2 funct3 Description
fmadd.i Fused Mul-Add 0x0 0x0 rd = rs1 * rs2 + rs3
fmadd.u Unsigned Fused Mul-Add 0x1 0x0 rd = rs1 * rs2 + rs3
fmsub.i Fused Mul-Sub 0x2 0x0 rd = rs1 * rs2 - rs3
fmsub.u Unsigned Fused Mul-Sub 0x3 0x0 rd = rs1 * rs2 - rs3
fmnadd.i Fused Neg Mul-Add 0x0 0x1 rd = -rs1 * rs2 + rs3
fnmsub.i Fused Neg Mul-Sub 0x1 0x1 rd = -rs1 * rs2 - rs3
5.1 R4 Instruction
R4 instructions, as in Figure 1, involve four registers (rs1, rs2, rs3, rd), which is different from those you are
familiar with. To use standard R4 format, you need to add F-extension when compiling. In other words you
should use -march=rv32if but NOT change the compiling commands of RISC-V GNU Toolchain. (Again,
we are not using floating-points.)
Figure 1: R4 format
5.2 Cycle counts
The fused instruction needs more cycles to process, so we define that our fused instruction needs 3 more
cycles to execute. Specifically, the number of cycles required to complete this instruction is +3 compared to
standard instructions. The mul instruction also incurs an additional 3 cycles, making fmadd more efficient in
terms of cycle count.
Suppose add instruction takes 5 cycles to complete, then we have:
add(1) + mul(3) = 4 > fmadd(3)
5.3 Other Important Information
We also provide some basic test cases for reference. Please refer to the README and /test-fused under
the root of the project.
Also, you can try to compare the number of cycles between fused instructions and basic mul and add instruc tions.
3
6 Part I: Disable Data Forwarding
Add an option -x to disable data forwarding.
You can modify the logical of parsing arguments in the method parseParmeters in MainCache.cpp.
7 Part II: Introduction
In this part of the assignment, you will analyze a given sequence of RISC-V instructions that suffer from data
hazards. (With forwarding turned off) Your task is to rearrange these instructions while maintaining correct ness, ensuring that the processor pipeline executes efficiently. Then, you should be able to further optimize it
by substituting add/mul operations with fmadd operations. By strategically reordering instructions, you will
learn how to reduce stalls, improve instruction throughput, and optimize execution flow in a pipelined RISC-V
architecture.
8 Part II: Rearrange
In the part2.s file, you will find a RISC-V program that contains several data hazards affecting pipeline
efficiency. Your task is to rearrange the instructions to minimize stalls while ensuring the program produces
the same output as the original. You should start by reviewing and running part2.s in the simulator to
understand its functionality and identify potential improvements. Your optimized version should preserve
correctness while reducing the number of stalled cycles. Grading will be based on both correctness and
execution efficiency (fewer cycles due to reduced hazards). Name your result with part2 p2.s
9 Part II: Using fmadd.i
After optimizing part2.s, you may identify opportunities to replace certain instruction sequences with the more
efficient fmadd.i instruction (based on either part2.s or part2 p2.s). The final optimized file, part2 p3.s,
should produce the same output as both part2.s and part2 p2.s while improving execution efficiency. Since
fmadd.i combines multiplication and addition into a single operation, the total cycle count should be further
reduced. Grading will be based on both correctness and execution efficiency. Name your optimized file
part2 p3.s before submission.
10 Grading Criteria
The maximum score you can get for this lab is 100 points, and it is composed by the following components:
• Part 1 correctness of implementation 55 pts
• Part 2 correctness of part2 p2.s 20 pts
• Part 2 efficiency of part2 p2.s 20 pts
• A short report about anything you have learn in this project 5 pts
• Part 2 correctness of part2 p3.s Extra Credit 1 pts
• Part 2 efficiency of part2 p3.s Extra Credit 1 pts
4
11 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 doc umented and included. Finally, you are also required to include a report containing the results of your test
case execution.


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

掃一掃在手機打開當前頁
  • 上一篇:46-886 Machine Learning Fundamentals
  • 下一篇:代寫MATH3030、代做c/c++,Java程序
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結構仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養 十大衛浴品牌排行 suno 豆包網頁版入口 wps 目錄網 排行網

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

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

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产欧美日韩丝袜精品一区| 成人欧美一区二区| 精品一区二区中文字幕| 久久久久久久久久久久久9999| 久久久久久国产| 国产天堂视频在线观看| 久久精品国产91精品亚洲| 日本高清一区| 97成人在线观看视频| 欧美激情久久久久| 国产欧美一区二区三区在线 | 青青草视频在线视频| 国产精品2018| 午夜探花在线观看| 99久久激情视频| 亚洲一区久久久| 国产精品自在线| 欧美精品成人91久久久久久久| 国产欧美一区二区在线播放| 国产精品久久久久久久天堂 | 国产奶头好大揉着好爽视频| 国产精品精品视频一区二区三区| 欧美一性一乱一交一视频| 久久久久久久久久久久久久一区| 日韩欧美精品在线不卡| 色偷偷88888欧美精品久久久| 欧美一级免费视频| 久久精品99| 人人妻人人添人人爽欧美一区| 久久偷窥视频| 日本中文字幕成人| 久久久www免费人成黑人精品| 亚洲区一区二区三区| 久久久亚洲综合网站| 日韩精品―中文字幕| 国产精品热视频| 国产欧美亚洲视频| 一本色道久久99精品综合 | 国产精品久久久久不卡| 国产综合香蕉五月婷在线| 美女av一区二区三区| 国产精品一区二区三区在线观| 亚洲伊人久久综合| 国产黄色一级网站| 欧美亚洲激情视频| 日韩专区在线播放| 国产在线播放一区二区| 亚洲影院污污.| 九色91视频| 精品无码一区二区三区爱欲 | 男人天堂新网址| 久久av在线看| 久久婷婷国产精品| 韩国三级日本三级少妇99| 精品免费日产一区一区三区免费 | 国产成人无码av在线播放dvd | 国产精品亚洲视频在线观看| 天堂资源在线亚洲资源| 久久精品2019中文字幕| 高清一区二区三区日本久| 人妻少妇精品久久| 欧美wwwxxxx| 国产精品1234| 免费看日b视频| 天堂а√在线中文在线| 国产精品男人爽免费视频1| 99在线高清视频在线播放| 欧洲黄色一级视频| 亚洲综合色激情五月| 国产成人精品一区二区| julia一区二区中文久久94| 欧美日韩免费精品| 中文字幕一区综合| 国产精品视频久久久久| 69av在线播放| 国产欧美日韩视频| 日韩免费视频在线观看| 毛片精品免费在线观看| 久久精品成人欧美大片| 91精品国产九九九久久久亚洲| 精品日韩在线播放| 青青视频免费在线| 午夜啪啪免费视频| 精品国产免费人成电影在线观...| 久久九九视频| 国产老熟妇精品观看| 欧美性猛交久久久乱大交小说| 亚洲免费av网| 欧美理论片在线观看| 精品国产依人香蕉在线精品| 国产精品99久久久久久久久| 国内精品视频一区| 欧美一级片免费观看| 一区二区三区四区免费视频| 国产精品免费一区二区三区四区 | 任我爽在线视频精品一| 欧美激情视频给我| 国产精品区一区| 国产夫妻自拍一区| 北条麻妃在线视频观看| 国产在线一区二| 精品日本一区二区| 欧美中文字幕精品| 日本精品一区二区三区不卡无字幕 | 久久精品亚洲一区| 久久久噜噜噜久久久| 久久久免费精品视频| 国产卡一卡二在线| 精品亚洲第一| 黄www在线观看| 欧美精品成人一区二区在线观看| 日韩久久不卡| 欧美日韩午夜爽爽| 欧美激情第一页在线观看| 青草成人免费视频| 欧美一级大片在线观看| 日本黄网站色大片免费观看| 亚洲一区久久久| 亚洲伊人第一页| 亚洲影院在线看| 亚洲一区中文字幕在线观看| 亚洲在线不卡| 亚洲高清不卡一区| 亚洲永久在线观看| 亚洲日本理论电影| 亚洲免费视频播放| 欧美一级在线看| 日韩人妻精品无码一区二区三区| 视频一区二区三| 日韩欧美亚洲精品| 欧美有码在线观看| 国内一区二区在线视频观看| 欧美精品一区二区三区三州| 欧美激情 国产精品| 欧美极品jizzhd欧美| 国产在线资源一区| 99精品视频播放| 68精品久久久久久欧美| 国产成人精品a视频一区www| 久久久久久久久久久福利| 久久精品国产综合| 精品国产乱码久久久久软件| 亚洲一区在线免费| 日韩日韩日韩日韩日韩| 男人舔女人下面高潮视频| 国产亚洲精品久久久久久久| yellow视频在线观看一区二区| 国产精品∨欧美精品v日韩精品| 久久久久久久久久亚洲| 国产精品日韩欧美| 欧美情侣性视频| 亚洲综合日韩在线| 日本午夜精品一区二区三区| 国内一区在线| yellow视频在线观看一区二区| 国产精品12345| 国产精品色婷婷视频| 欧美激情网站在线观看| 午夜视频在线瓜伦| 欧美日韩精品久久久免费观看| 国产一区二区精品在线| 91精品国产一区| 久久99久久99精品| 操人视频在线观看欧美| 都市激情久久久久久久久久久| 欧美精品无码一区二区三区| 成人羞羞国产免费| 日日摸夜夜添一区| 欧美极品在线播放| 日韩久久不卡| 高清国语自产拍免费一区二区三区| 久久国产精品一区二区三区四区| 久久香蕉国产线看观看网| 天天好比中文综合网| 精品一区二区国产| 国产福利视频一区| 九九热精品在线| 日韩av综合在线观看| 国产日韩精品一区观看| 久久国产亚洲精品无码| 久久久久久av| 欧美动漫一区二区| 久久久人成影片一区二区三区观看| 国产精品美女www| 日韩精品免费播放| 99久久国产宗和精品1上映| 国产精品入口日韩视频大尺度| 亚洲国产精品久久久久久女王| 精品无码一区二区三区爱欲| 久久99导航| 在线精品日韩| 免费99视频| 久久大香伊蕉在人线观看热2| 欧美精品做受xxx性少妇| 日本高清不卡在线| 成人国产一区二区| 精品国产免费av| 欧美激情亚洲天堂| 久久久久久九九| 无码人妻精品一区二区蜜桃百度 |