{"id":18637572,"url":"https://github.com/justin-marian/cla-16bits-adder","last_synced_at":"2025-11-04T14:30:29.233Z","repository":{"id":227735328,"uuid":"771345086","full_name":"justin-marian/cla-16bits-adder","owner":"justin-marian","description":"Carry-Lookahead 16-bits Adder (CLA16) computes sums by rapidly determining carry bits through parallel processing.","archived":false,"fork":false,"pushed_at":"2024-03-14T22:14:15.000Z","size":826,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-27T09:12:24.141Z","etag":null,"topics":["16bits","4bits","carry-look-ahead-adder","cpp","xilinx-vitis"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justin-marian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-13T06:02:29.000Z","updated_at":"2024-10-14T20:20:03.000Z","dependencies_parsed_at":"2024-03-14T22:59:50.599Z","dependency_job_id":"e8c7b8f9-c3b1-4fe8-9b46-17acdff5b505","html_url":"https://github.com/justin-marian/cla-16bits-adder","commit_stats":null,"previous_names":["justin-marian/cla-16bits-adder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fcla-16bits-adder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fcla-16bits-adder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fcla-16bits-adder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justin-marian%2Fcla-16bits-adder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justin-marian","download_url":"https://codeload.github.com/justin-marian/cla-16bits-adder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239433910,"owners_count":19637806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["16bits","4bits","carry-look-ahead-adder","cpp","xilinx-vitis"],"created_at":"2024-11-07T05:36:49.519Z","updated_at":"2025-11-04T14:30:29.199Z","avatar_url":"https://github.com/justin-marian.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Carry-Lookahead Adder](./CLA16.pdf)\r\n\r\nThe **Carry-Lookahead Adder (CLA) 16-bits Adder** is a type of digital circuit that improves upon the performance of a standard ripple-carry adder by reducing the propagation delay caused by carry bits.\r\n\r\n## [Full Adder](https://en.wikipedia.org/wiki/Adder_(electronics)#Full_adder)\r\n\r\nA full adder is the building block of a CLA, which performs the addition of three bits: two significant bits and one carry-in bit (`Cin`). It produces a sum bit and a carry-out bit (`Cout`), where:\r\n\r\n- $\\text{Sum} = A \\oplus B \\oplus C_{in}$\r\n- $C_{out} = (A \\land B) \\lor (B \\land C_{in}) \\lor (A \\land C_{in})$\r\n\r\n### [CLA4](https://en.wikipedia.org/wiki/Lookahead_carry_unit)\r\n\r\nA 4-bit CLA uses full adders by generating and propagating carry bits without waiting for carry-out from the previous stage. This is achieved by introducing two signals for each bit position:\r\n\r\n- **$G$ (Generate)**: Indicates if a carry bit will be generated.\r\n- **$P$ (Propagate)**: Indicates if a carry bit will be propagated.\r\n\r\nThe carry bits are calculated using these signals, which allows the CLA to determine carry bits in parallel.\r\n\r\n### [CLA16](https://en.wikipedia.org/wiki/Lookahead_carry_unit)\r\n\r\nFor the **16-bit CLA**, **four 4-bit CLA blocks** are interconnected, each block responsible for a group of 4 bits. The CLA16 extends the concept of carry generation and propagation across 16 bits, making it suitable for larger binary numbers.\r\n\r\n### Signals for 16-bit CLA\r\n\r\nThe key signals $G_i$ and $P_i$ are used for the ith group of bits, where:\r\n\r\n- **$G_i$**: True if the ith group generates a carry.\r\n- **$P_i$**: True if the ith group can propagate a carry.\r\n\r\nThese signals allow the calculation of the carry bits ($C_{i+1}$) for each group using logical equations.\r\n\r\n## Advantages of CLA\r\n\r\n- **Quick Carry Calculation**: Carry bits are determined without sequential dependency.\r\n- **Latency Reduction**: Parallel calculation of carry bits reduces overall latency.\r\n- **Scalability**: CLA scales efficiently for larger binary numbers.\r\n\r\n## Testing and Validation\r\n\r\nThe CLA circuit is tested using various input cases to ensure its correct operation under different conditions such as random values, boundary conditions, and specific binary patterns.\r\n\r\n**Implementation Details:**\r\n\r\n- **Product Family**: Target FPGA device family, e.g., \"artix7\".\r\n- **Target Device**: Specific FPGA model used for synthesis.\r\n- **Timing**: Design constraints for clock frequency and propagation delay.\r\n\r\n**Ports and Interface:**\r\n\r\n- **a and b**: Operand inputs for the addition operation.\r\n- **cin**: Input carry bit (carry-in).\r\n- **sum**: Output port for the result of addition.\r\n- **cout**: Output carry bit (carry-out).\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-marian%2Fcla-16bits-adder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustin-marian%2Fcla-16bits-adder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustin-marian%2Fcla-16bits-adder/lists"}