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

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務合肥法律

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

時間:2025-03-22  來源:合肥網(wǎng)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程序
  • 無相關(guān)信息
    合肥生活資訊

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

    關(guān)于我們 | 打賞支持 | 廣告服務 | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    日本欧美不卡| 欧美1区2区3| 无遮挡爽大片在线观看视频| 久久国产欧美| 日韩精品免费一区二区夜夜嗨| 美女视频在线免费| 免播放器亚洲| 亚洲调教视频在线观看| 精品三级国产| 国内在线观看一区二区三区| 日韩在线视频精品| 噜噜噜91成人网| 久久综合av| 亚洲不卡视频| 日韩精品福利一区二区三区| 国产精品大片免费观看| 国产乱子精品一区二区在线观看| 成人影院天天5g天天爽无毒影院| 国产高清欧美| 91精品精品| 极品尤物一区| 色妞ww精品视频7777| 在线欧美激情| 免费在线播放第一区高清av| 日韩三区免费| 三级在线看中文字幕完整版| 天堂av在线一区| 尤物在线精品| 不卡一区2区| 欧美手机在线| 国产91一区| 欧洲在线一区| 亚洲a在线视频| 鲁大师精品99久久久| 好吊妞视频这里有精品| 麻豆国产一区| av日韩精品| 一区二区三区免费在线看| 日韩欧美中文在线观看| 亚洲欧美成人vr| 亚洲精品3区| 亚洲自拍电影| 日韩综合一区二区三区| 免费精品一区| 99久久免费精品国产72精品九九 | 91麻豆精品国产综合久久久| 久久精品一区二区国产| 免费在线亚洲欧美| 日韩精品亚洲专区| 麻豆精品视频在线观看视频| 日韩精品三区四区| 欧美激情视频一区二区三区在线播放| 日本美女一区二区三区视频| 亚洲欧美在线专区| 久久99视频| 日韩精品一级| 台湾亚洲精品一区二区tv| 久久精品国产大片免费观看| 久久日文中文字幕乱码| 亚洲精品一二三区区别| 最新国产拍偷乱拍精品| 蜜桃视频一区| 人在线成免费视频| 91p九色成人| 日本视频免费一区| 国产精品一区二区av交换| 日韩精品91亚洲二区在线观看| 日韩高清一区| 久久综合国产| 亚洲欧美视频一区二区三区| 9999国产精品| 国产原创一区| 亚洲字幕久久| 69精品国产久热在线观看| 久久成人综合| 久久国产66| 欧美一级网址| 一区二区三区网站| 97视频一区| 欧美日韩国产高清| 神马久久午夜| 亚洲区第一页| 在线日韩成人| 亚洲成人三区| 日韩欧美午夜| 亚洲色图国产| 成人综合久久| 亚洲一区二区三区四区五区午夜| 天堂av在线| 久久人人爽人人爽人人片av不| 日本中文字幕一区二区视频| 99久久夜色精品国产亚洲1000部| 美女黄网久久| 久久精品国产亚洲高清剧情介绍 | 亚洲第一精品影视| 鲁大师成人一区二区三区 | 韩国精品主播一区二区在线观看| 日韩国产精品久久久久久亚洲| 日韩av影院| 综合色就爱涩涩涩综合婷婷| 午夜欧美巨大性欧美巨大| 中文av一区| 久久狠狠婷婷| av在线播放资源| 亚洲一区导航| 日韩精品四区| 激情视频网站在线播放色| 亚洲天天影视网| 99视频精品视频高清免费| 97在线精品| 国产成人一区| 红桃视频欧美| 欧美激情不卡| 999精品视频在这里| 免费观看日韩av| 久久亚州av| 久久密一区二区三区| 日韩欧美综合| 午夜a一级毛片亚洲欧洲| 希岛爱理一区二区三区| 精品极品在线| 99国产精品久久一区二区三区| 免费视频久久| 欧美韩国一区| 一区免费视频| 亚洲国产午夜| 黑丝一区二区| 麻豆成人在线观看| 欧美高清不卡| 欧美亚洲在线| 韩日一区二区三区| 日韩综合在线视频| av一区二区高清| 久久精品国产第一区二区三区| 欧美国产不卡| 欧美午夜三级| 99tv成人| 国产成人a视频高清在线观看| 成人中文在线| 深夜福利亚洲| 欧美日韩在线播放视频| 国产一区精品福利| 欧美一级精品片在线看| 久久精品一本| 黄色av一区| 国产精品一区二区三区www| 宅男噜噜噜66一区二区| 欧美视频精品全部免费观看| 一本不卡影院| 少妇精品久久久一区二区三区| 日韩精品一二区| 日韩精品一级| 四虎4545www国产精品 | 伊人久久影院| 日韩中字在线| 91精品蜜臀一区二区三区在线| 精品久久福利| 亚洲激情网址| 亚洲区小说区图片区qvod按摩| 蜜桃视频免费观看一区| 视频一区日韩精品| 成人亚洲免费| 欧美精选视频在线观看| 精品一区二区三区中文字幕视频| 日本欧美肥老太交大片| 99热这里只有精品首页| 粉嫩av一区二区三区四区五区 | 亚洲伊人影院| 日韩黄色在线| 亚洲视频成人| 综合久久成人| 日韩福利视频网| 蜜桃视频免费观看一区| 国产+成+人+亚洲欧洲在线| 欧美亚洲自偷自偷| 三级在线观看一区二区 | 欧美影院在线| 日韩中字在线| 欧美日韩国产欧| 日韩av在线免费观看不卡| 99欧美精品| 亚洲免费综合| 精品日产乱码久久久久久仙踪林| 美女视频第一区二区三区免费观看网站 | 国产成人精品一区二区三区视频| 偷偷www综合久久久久久久| a一区二区三区亚洲| 成人va天堂| 亚洲综合好骚| 精品精品久久| 久久av免费| 日韩国产高清影视| 极品美女一区| 99在线精品视频在线观看| 91精品久久久久久综合五月天 | 日本特黄久久久高潮| 91欧美国产| 自拍偷拍欧美专区| 欧美高清视频看片在线观看| 国产精品亚洲一区二区在线观看|