关键词 > EngineeringSoftware
Engineering Software 3
发布时间:2025-10-13
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit
Engineering Software 3
Introduction to the Assignment 1
Assignment introduction
The key aims of this assignment are:
• To enable students to translate industrial software specifications to efficient software meeting the spec.
• To help students better understand and explore different methods of code optimisation in embedded industrial programming environment (using C language in this case).
• Understand how to write professional industrial software that is optimised and reusable by others in your team.
• Present your software solution to others (such as management or customers) .
• Produce appropriate documentation that allow other engineers to understand and use your software.
• Explore and learn about an important function used in many industrial applications (data processing, AI ..etc.).
The software algorithm
• This assignment will based on 2D convolution. A basic 2D convolution algorithm will be provided. Students are required to optimise the efficiency of the convolution algorithm.
• In short: use a sequence of optimisation methods to maximise code's performance (reduce runtime) as much as possible while keeping the code functionality unchanged.
How to optimise:
We will provide the complete code, which will already include functions for automatic testing, measuring runtime, and comparison. See figure below for the assignment code structure.
There will be a file named "Conv2D_student" in the code. This is the part that requires your optimisation.
The other files are for automatic testing and baseline comparison—do not modify them!
After optimisation, connect the Basys3 board, then build the conv2d main program, and run it. Just as done in the lab. The terminal in the lower right corner (using the same startup and connection method as in the lab) will display the results of this optimisation.
Nots for using the code
1. Assignment code folder includes a top.xsa file, which you can directly open in Vitis to import and create a new application project. Ensure you use the correct xsa file. You do not need to enter Vivado.
2. We provide only one set of code. This means that when you need to try different optimization methods, you must revert your previous optimisations. Restore the conv2d_student.c file to its original state before attempting new optimisations. Please use the conv2d_reference.txt file provided, which is identical to the original conv2d_student.c. You can directly copy and replace the entire content of conv2d_student.c. This allows you to start fresh.
The process:
First, you should analyse the existing code (in conv2d_student) and identify its shortcomings and areas for improvement. Then, optimise the code accordingly.
It is important to note that, to ensure the automated tests run correctly, do not modify the code's declarations or input/output formats. (Maintaining compatibility with other code while optimising existing code is also an essential practice when collaborating with others or working in a team.)
Optimisation: There are many code optimisation methods and examples. Some introduced in this course. You can choose several of these to apply separately for optimisation. We encourage you to use multiple different optimisation approaches, run the code to observe the optimisation effects brought by each method, and then summarise and analyse the results.
You can apply individual optimisation techniques or use combined optimisation approaches (applying multiple methods simultaneously). However, you should try as many different optimization methods and combinations as possible to better analyse which optimisation approaches (or combinations) produce best performance for this code (the conv2d algorithm).
In this assignment, please build the code using Debug mode (compiler optimization at -O0 level). Focused on the effects brought by manual optimisation. This will minimize the uncertainty in code performance caused by automatic compiler optimisations.
You will ultimately upload the most efficient version of the code you can obtain.
However, the other optimisation methods (or combinations) you attempt are still important, as you need to include the optimisation process and analysis in the documentation and video. We will elaborate on this in more detail in next slides.
How to check if you are using the Debug mode
The grading of the assignment will primarily be based on three components:
1. Video
2. Code
3. Documentation
Video:
You will be required to upload a video (could be in the form of a presentation for example) to demonstrate your optimisation process and results.
We recommend that the video content includes, but is not limited to:
1. Analysis of potential optimisation directions in the existing code
2. Describe all attempted optimisation methods
3. Analyse the performance improvements brought by different optimisation approaches
The maximum duration of the video is 5 minutes. Any content exceeding this time limit will not be considered in the evaluation (meaning we will not watch any part of the video beyond 5 minutes).
The score will be evaluated based on the structure and completeness of the video, video quality (clarity, readability, the intrusiveness of voice-over, etc.), and the specific content within the video.
Code:
You will be required to submit the complete project files, including the optimised code. You are responsible for ensuring that your project files can be properly opened and run on any Vitis 2022.2 version. If the project files cannot be executed, corresponding points will be deducted.
The evaluation will be conducted based on Code structure, Code robustness, Code efficiency, Coding practices (such as appropriate commenting), Code portability and maintainability, and the Efficiency improvement of the code relative to the initial version.
Good code optimisation is not just about achieving efficient performance in a single run on your own computer. It should be easily reproducible and readily adopted by other teams to contribute effectively within larger projects. This requires good coding practices. Improving both the quality and efficiency of the code itself is equally important.
