{"id":37670,"date":"2026-05-18T15:58:52","date_gmt":"2026-05-18T07:58:52","guid":{"rendered":"http:\/\/hazlina-backup-37670"},"modified":"2026-05-18T15:58:52","modified_gmt":"2026-05-18T07:58:52","slug":"bhe3233-bts4433-week-10-project-semi-completed-programming","status":"publish","type":"post","link":"\/hazlina-blog\/2026\/05\/18\/bhe3233-bts4433-week-10-project-semi-completed-programming\/","title":{"rendered":"BHE3233 BTS4433 \u2013 Week 10 Project Semi Completed Programming"},"content":{"rendered":"<p class=\"p1\"><span class=\"s1\">Hi everyone, <\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">After successfully navigating code comprehension and hardware debugging in Stages 1 and 2, our journey through digital system design enters its most advanced phases. This week, we focused on <b>Stage 3: Semi-Completed Programming<\/b> and <b>Stage 4: New Programming Task (Comparative Optimization)<\/b>.<\/span><\/p>\n<p class=\"p2\"><span class=\"s2\">These stages push us beyond merely &#8220;making it work&#8221; to actually architecting complete systems and evaluating trade-offs like true digital design engineers. Here is a breakdown of our milestones and the core learning outcomes for each project.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\"><b>Stage 3: Semi-Completed Programming (Architectural Completion)<\/b><b><\/b><\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">In Stage 3, we took foundational components and integrated them into complete, functioning architectures.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\"><b>Project 1: AES Cryptography (The Logic-Optimized S-Box)<\/b><b><\/b><\/span><\/p>\n<ul class=\"ul1\">\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li3\"><span class=\"s1\"><b>The Challenge:<\/b> Transitioning away from a memory-heavy Look-Up Table (LUT) to a logic-optimized approach using Galois Field (<\/span><span class=\"s3\"><i>GF<\/i><\/span><span class=\"s4\">(2<\/span><span class=\"s4\">)<\/span><span class=\"s1\">) composite arithmetic. We had to complete the missing Boolean equations for multiplicative inversion.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<ul class=\"ul1\">\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li3\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>Mastering Mathematical Hardware.<\/b> We learned how complex cryptography math (like Galois Fields) is synthesized into pure Boolean logic (XOR, AND, OR gates), demonstrating how a &#8220;calculation&#8221; approach saves memory at the cost of logic depth.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"p1\"><span class=\"s1\"><b>Project 2: The Multiplier (Pipelining for Speed)<\/b><b><\/b><\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li3\"><span class=\"s1\"><b>The Challenge:<\/b> We upgraded a combinational multiplier by inserting registers into the middle of the logic &#8220;fences&#8221; to create a <b>Pipelined Multiplier<\/b>.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<li class=\"li3\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>Increasing Throughput.<\/b> By breaking a long combinational path into smaller stages, we learned how pipelining allows a new multiplication to start every clock cycle, drastically increasing the system&#8217;s Max Frequency (<\/span><span class=\"s3\"><i>fmax)<\/i><\/span><i><\/i><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><span class=\"s1\"><b>Project 3: FIR Filter (Structural Integration)<\/b><b><\/b><\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li3\"><span class=\"s1\"><b>The Challenge:<\/b> We integrated our verified Multiply-Accumulate (MAC) units and Delay Lines to build a complete <b>Direct Form FIR Filter<\/b>.<\/span><\/li>\n<li class=\"li3\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>Preventing Arithmetic Overflow.<\/b> The crucial lesson here was calculating exact bit-widths for signal growth. We learned that multiplying two 4-bit inputs yields an 8-bit output, and accumulating three of these 8-bit partial products requires a 10-bit final output to prevent overflow.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"p1\"><span class=\"s1\"><b>Project 4: UART Controller (The Transmitter FSM)<\/b><b><\/b><\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li2\"><span class=\"s1\"><b>The Challenge:<\/b> Wrapping raw serial data into a standardized UART frame by building a Finite State Machine (FSM) that transitions through IDLE, START, DATA, and STOP states based on precise &#8220;ticks&#8221; from our Baud Rate Generator.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<li class=\"li4\"><span class=\"s2\"><b>Learning Outcome:<\/b> <b>Protocol Synchronization.<\/b> We learned how to reliably sequence hardware operations using FSMs, ensuring that communication lines are held HIGH during idle and strictly synchronized to a predetermined baud rate for data integrity.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-37672 size-large\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-2-e1779090133349-580x1024.png\" alt=\"\" width=\"580\" height=\"1024\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-2-e1779090133349-580x1024.png 580w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-2-e1779090133349-170x300.png 170w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-2-e1779090133349-768x1357.png 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-2-e1779090133349-1200x2120.png 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-2-e1779090133349.png 1534w\" sizes=\"auto, (max-width: 580px) 85vw, 580px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-37673\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.30-PM-1024x575.jpeg\" alt=\"\" width=\"840\" height=\"472\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.30-PM-1024x575.jpeg 1024w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.30-PM-300x169.jpeg 300w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.30-PM-768x432.jpeg 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.30-PM-1200x674.jpeg 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.30-PM.jpeg 1600w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-37674\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.45-PM-1024x575.jpeg\" alt=\"\" width=\"840\" height=\"472\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.45-PM-1024x575.jpeg 1024w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.45-PM-300x169.jpeg 300w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.45-PM-768x432.jpeg 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.45-PM-1200x674.jpeg 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.27.45-PM.jpeg 1600w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-37675\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.54-PM-1024x333.jpeg\" alt=\"\" width=\"840\" height=\"273\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.54-PM-1024x333.jpeg 1024w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.54-PM-300x98.jpeg 300w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.54-PM-768x250.jpeg 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.54-PM-1200x391.jpeg 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.54-PM.jpeg 1330w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-37676\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.37-PM.jpeg\" alt=\"\" width=\"840\" height=\"318\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.37-PM.jpeg 883w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.37-PM-300x113.jpeg 300w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.29.37-PM-768x291.jpeg 768w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-37677\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.46.35-PM-1024x400.jpeg\" alt=\"\" width=\"840\" height=\"328\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.46.35-PM-1024x400.jpeg 1024w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.46.35-PM-300x117.jpeg 300w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.46.35-PM-768x300.jpeg 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.46.35-PM-1200x469.jpeg 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.46.35-PM.jpeg 1567w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-37678\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.45.58-PM-1024x552.jpeg\" alt=\"\" width=\"840\" height=\"453\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.45.58-PM-1024x552.jpeg 1024w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.45.58-PM-300x162.jpeg 300w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.45.58-PM-768x414.jpeg 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.45.58-PM-1200x647.jpeg 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/WhatsApp-Image-2026-05-18-at-3.45.58-PM.jpeg 1600w\" sizes=\"auto, (max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>Moving on<\/p>\n<p class=\"p1\"><span class=\"s1\"><b>Stage 4: Comparative Optimization (New Programming Tasks)<\/b><b><\/b><\/span><\/p>\n<p class=\"p1\"><span class=\"s1\">Stage 4 is where engineering design trade-offs shine. We escalated our designs and used Quartus tools (like the Timing Analyzer and Resource utilization reports) to scientifically compare competing architectures.<\/span><\/p>\n<p class=\"p1\"><span class=\"s1\"><b>Project 1: AES Cryptography (LUT vs. Logic Trade-offs)<\/b><b><\/b><\/span><\/p>\n<ul class=\"ul1\">\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li2\"><span class=\"s1\"><b>The Challenge:<\/b> We integrated both the Stage 1 (Table-based) and Stage 3 (Logic-based) architectures onto the DE10-Lite FPGA, using a hardware switch to &#8220;toggle&#8221; between them.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<li class=\"li2\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>Resource vs. Speed Optimization.<\/b> By running a Static Timing Analysis (STA), we learned to scientifically deduce which architecture to use depending on the application\u2014evaluating why a LUT is better for a high-speed cryptographic processor while Boolean logic is superior for a low-area IoT device.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"p1\"><span class=\"s1\"><b>Project 2: The Multiplier (16-bit Escalation)<\/b><b><\/b><\/span><\/p>\n<ul>\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li2\"><span class=\"s1\"><b>The Challenge:<\/b> We escalated our multiplier from 4-bit to 16-bit and compared all three architectures: Behavioral, Sequential, and Pipelined.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<li class=\"li2\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>Evaluating Complex Architectural Trade-offs.<\/b> We learned how expanding bit-widths exponentially deepens the logic tree. The outcome was understanding how to choose an architecture based on strict constraints (e.g., choosing sequential for space-constrained handhelds vs. pipelined for high-performance CPU ALUs).<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"p1\"><span class=\"s1\"><b>Project 3: FIR Filter (Direct vs. Transposed Form)<\/b><b><\/b><\/span><\/p>\n<ul class=\"ul1\">\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li2\"><span class=\"s1\"><b>The Challenge:<\/b> We redesigned our filter into the <b>Transposed Form<\/b>, a mathematically identical structure that places delay registers <i>between<\/i> the adders rather than at the input.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<li class=\"li2\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>Shortening the Critical Path.<\/b> We learned a major DSP optimization technique: by separating combinational adders with registers, we shortened the critical path delay. Even though this uses slightly more Logic Elements, it dramatically boosts the <\/span><span class=\"s3\"><i>f max <\/i><span class=\"s1\">making it ideal for high-speed audio\/sensor processing.<\/span><\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p class=\"p1\"><span class=\"s1\"><b>Project 4: UART Controller (FSM Encoding &amp; Parity)<\/b><b><\/b><\/span><\/p>\n<ul class=\"ul1\">\n<li style=\"list-style-type: none\">\n<ul class=\"ul1\">\n<li class=\"li2\"><span class=\"s1\"><b>The Challenge:<\/b> We expanded the UART to 16-bit with Even Parity error checking and compared two FSM architectures: <b>Binary Encoding<\/b> versus <b>One-Hot Encoding<\/b>.<\/span><span class=\"s2\"><br \/>\n<\/span><\/li>\n<li class=\"li2\"><span class=\"s1\"><b>Learning Outcome:<\/b> <b>FSM Encoding Trade-offs.<\/b> We gained hands-on experience in how the Quartus compiler assigns flip-flops. We discovered that Binary Encoding saves area (fewer flip-flops) but requires heavier decoding logic, whereas One-Hot Encoding uses more flip-flops but simplifies decoding, resulting in better setup slack and a faster maximum frequency.<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-37671 size-large\" src=\"\/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-3-e1779090188786-578x1024.png\" alt=\"\" width=\"578\" height=\"1024\" srcset=\"\/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-3-e1779090188786-578x1024.png 578w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-3-e1779090188786-169x300.png 169w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-3-e1779090188786-768x1360.png 768w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-3-e1779090188786-1200x2125.png 1200w, \/hazlina\/wp-content\/uploads\/2026\/05\/unnamed-3-e1779090188786.png 1534w\" sizes=\"auto, (max-width: 578px) 85vw, 578px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi everyone, After successfully navigating code comprehension and hardware debugging in Stages 1 and 2, our journey through digital system design enters its most advanced phases. This week, we focused on Stage 3: Semi-Completed Programming and Stage 4: New Programming Task (Comparative Optimization). These stages push us beyond merely &#8220;making it work&#8221; to actually architecting &hellip; <a href=\"\/hazlina\/2026\/05\/18\/bhe3233-bts4433-week-10-project-semi-completed-programming\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;BHE3233 BTS4433 \u2013 Week 10 Project Semi Completed Programming&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[9],"class_list":["post-37670","post","type-post","status-publish","format-standard","hentry","category-information","tag-academia-esd"],"_links":{"self":[{"href":"\/hazlina-blog\/wp-json\/wp\/v2\/posts\/37670","targetHints":{"allow":["GET"]}}],"collection":[{"href":"\/hazlina-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"\/hazlina-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"\/hazlina-blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"\/hazlina-blog\/wp-json\/wp\/v2\/comments?post=37670"}],"version-history":[{"count":0,"href":"\/hazlina-blog\/wp-json\/wp\/v2\/posts\/37670\/revisions"}],"wp:attachment":[{"href":"\/hazlina-blog\/wp-json\/wp\/v2\/media?parent=37670"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"\/hazlina-blog\/wp-json\/wp\/v2\/categories?post=37670"},{"taxonomy":"post_tag","embeddable":true,"href":"\/hazlina-blog\/wp-json\/wp\/v2\/tags?post=37670"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}