CodiodeCodiode
Home
Problem Solving
Skill Tracks
My Assignments
Contests
Leaderboard
Community
Settings
Codiode/Problems/Combinational Logic

Expensive Operator in a Loop

HardLogic CircuitDebug

A hardware checksum module calculates the running sum of a data stream to verify data integrity during transmission.

Expected behavior: The module must accumulate an 8-bit Data input into an 8-bit Checksum output on every rising edge of Clk when Enable is high. The accumulation must clear to zero when Reset is high.

Simulation shows the circuit fails the maximum area constraint. The synthesis report lists sixteen instantiated 8-bit adders instead of the allowed one. Furthermore, the sequential test bench fails: when Enable is high and Data is provided over consecutive clock cycles, the output Checksum remains static and does not accumulate the incoming values.

Inspect the circuit and correct the fault.

Constraints

  • The design must use exactly one 8-bit adder.
  • The Checksum output must be driven by a sequential register.
  • Do not use combinational unrolled loops to process the data.

Topics

arithmeticaccumulatorsynthesisarea-optimization

Solve this problem

Place the gates, wire them up and watch the signals settle. Every submission runs on the same simulation engine that grades it.

This problem is part of Codiode Pro. The statement above is free to read.

Sign in to solveSee what Pro unlocks

The circuit builder and code editor need a desktop screen. On a phone, read the problem here and open it on a laptop to solve.

Related problems

  • Binary to HexEasy
  • 1-to-4 Demultiplexer from AND and NOT GatesEasy
  • 2-to-4 Line Decoder with Active-High EnableEasy
  • Hex Nibble to BinaryEasy
  • Odd Parity Bit Generator for 3-bit DataEasy
  • Full Adder from Half AddersEasy
  • Modulo ArithmeticMedium
  • Two's Complement: Encode a Negative DecimalEasy

Browse all problems · Learning tracks