EEL4837 Spring 2024 - Excursion 2 Due Date: April 29, 2024
1
EEL4837 Programming for Electrical Engineering II – Spring 2024
Excursion 2: Technology Mapping
Due Date: April 29, 2024
Submission Instructions
Submit your code to Gradescope. You need to submit the following files separately (not as an
archive):
1. One or several source code files.
● Your program should read an input file named input.txt located in the same
directory as your source code.
● Your output should be a single integer, which should be written to a file named
output.txt and located in the same directory.
2. A documentation named readme.txt.
● Explicitly indicate if you are claiming bonus points.
● (Optional) Any other descriptions of your program if you wish to provide.
Description
The goal is to implement an elementary tool for technology mapping, which will:
1. Transform the original logical expressions into a NAND-NOT tree;
2. Calculate the minimum cost of the transformed structure.
Input: a Boolean model specified in the format as shown in the Excursion 2 slides.
Output: a single integer, which is the calculated minimum cost of the transformed structure.
You may assume:
1. Each node of the input netlist is a single AND, OR, and NOT function.
2. In each test case, there will be one output node only. That is, your circuit will be a tree.
3. A Technology Library is available, which consists of the components listed in Table 1.
EEL4837 Spring 2024 - Excursion 2 Due Date: April 29, 2024
2
Table 1. Technology Library
Name Cost
NOT 2
NAND2 3
AND2 4
NOR2 6
OR2 4
AOI21 7
AOI22 7
Guidelines
1. Read a netlist as input. You can assume that all inputs are legal.
2. Parse the netlist to construct a tree based on the provided expressions.
3. Convert the tree into a NAND-NOT tree.
4. Refer to the Technology Library (Table 1) and recursively compute the minimum cost at
each node.
5. Write the final minimum cost to the output file.
Grading
Total points: 100
1. Automated grading (75 pts)
a. Correctness (60 pts): correct results for normal inputs.
b. Robustness (15 pts): correct results for edge cases, such as very simple and very
complex inputs.
2. Manual grading (25 pts)
a. Efficiency: The time and space complexities are decent. No brute force is
allowed.
EEL4837 Spring 2024 - Excursion 2 Due Date: April 29, 2024
3
b. Elegance: tidy code style, understandable comments for key steps as needed,
meaningful functions, etc.
3. Bonus points (20 pts): implement dynamic programming traversing the tree bottom-up
and saving the intermediate costs for subtrees.
Late Policies
● Late due date: May 3, 2024
● 5% off per late day. No further extension will be permitted due to the UF grading policy
regarding grade report at the end of each semester.
Notes
1. Your code should be in C++ only. We encourage splitting up your code into multiple
files/functions/classes.
2. Your program should compile and run successfully on both the ECE Linux server and
Gradescope.
3. You can only use C++ standard libraries (including STL). Do not use libraries that
implement circuits, trees, or graphs for you. If you are not sure whether a library is
allowed, please reach out to TA.
请加QQ:99515681 邮箱:99515681@qq.com WX:codinghelp
-
Zymeworks Announces FDA Clearance of Investigational New Drug Application for ZW171, a novel 2+1 T-cVANCOUVER, British Columbia, June 17, 2024 (GLOBE NEWSWIRE) -- Zymeworks Inc. (Nasdaq: ZYME), a clinical-stage biotechnology company developing a di2024-06-17
-
Indonesia Stock Exchange Partners with Nasdaq to Upgrade Market InfrastructureTechnology partnership will further enhance overall resilience and integrity of the exchange, while supporting the rapid deployment of new products2024-06-17
-
Adalvo 的 Liraglutide 預充式注射筆成為歐盟首款獲得批准的仿製藥馬爾他聖瓜安, June 17, 2024 (GLOBE NEWSWIRE) -- Adalvo 宣布 Liraglutide 預充式注射筆成功取得 DCP 批准,成為歐盟首款獲得批准的仿製藥。 根據 IQVIA 的報2024-06-17
-
促进生育,助力三胎——“三胎免费生”联合公益行动正式启动为积极响应国家号召实施三胎生育政策,扩大妇幼服务健康供给,在云南省优生优育妇幼保健协会指导下,昆明广播电视台联合昆明安琪儿妇产医院,于6月13日在昆明广播2024-06-17
-
学党史传承红色精神 守党纪筑牢自律防线——平安养老险湖南分公司党支部开展主题党日活动七一前夕,平安养老险湖南分公司党支部全体成员走进“千年学府、百年师范”——湖南第一师范,开展了一次学史明理、学史增信、学史崇德、学史力行的主题党日活动。重2024-06-17