Unsized Literal in Concatenation
A status register combines a 4-bit hardware flag and a fixed 4-bit prefix into an 8-bit status code.
Expected behavior:
| Flags | Status (Binary) | Status (Decimal) | |---------|-------------------|--------------------| | 0000 | 10100000 | 160 | | 0101 | 10100101 | 165 | | 1111 | 10101111 | 175 |
The compilation fails with a syntax error indicating that an unsized number is not allowed in concatenations. The synthesis tool cannot determine the final width of the output bus. Inspect the code and correct the fault.
Constraints
- The output
Statusmust be exactly 8 bits wide. - All literal values inside a concatenation block must have an explicitly declared bit width.
Topics
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.
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.