This is the repository for the Final Test (Prova Finale) of Logic Networks (Reti Logiche) in the academic year 2022/2023 at Polytechnic of Milan.
Subject: 054441 - Prova Finale (Progetto di Reti Logiche)
Professor: Fornaciari William
Academic Year: 2022/2023
The project requires implementing a hardware module in VHDL that interfaces with a memory and directs the data read from memory to one of the four available output channels (Z0, Z1, Z2, Z3).
The module receives as input a serial bit stream, organized as follows:
- 2 header bits → identify the output channel:
00→ Z001→ Z110→ Z211→ Z3
- N address bits (0 ≤ N ≤ 16) → specify the memory address to read an 8-bit data value from.
- If N < 16, the address is extended with leading zeros.
The module then reads the memory content at the given address and outputs the value to the selected channel.
For further details, please review the full description.
The system uses a Finite State Machine (FSM) with six distinct states:
- INIT_READ_W0 - Initial state, reads first selection bit
- READ_W1 - Reads second selection bit
- READ_ADDRESS - Reads 16-bit memory address serially
- ASK_MEM - Requests memory access
- READ_MEM - Reads data from memory
- SHOW_OUT - Outputs results and signals completion
- Initialization: System starts in
INIT_READ_W0state - Selection Reading: Reads 2-bit selection pattern serially
- Address Reading: Reads 16-bit memory address serially
- Memory Access: Requests memory read operation
- Data Storage: Stores retrieved data in selected output register
- Output: Presents all four output registers and asserts
o_done - Completion: Returns to initial state for next operation
The system acts as a memory controller with the following characteristics:
- Always operates in read mode (
o_mem_we= '0') - Address is presented on
o_mem_addr - Data is read from
i_mem_data - Memory is enabled during access phases (
o_mem_en= '1')
Asserting i_rst (high) will:
- Clear all internal registers
- Return the FSM to the
INIT_READ_W0state - Set all outputs to zero
- Deassert all control signals
- Serial-to-Parallel Conversion: Efficiently converts serial input to parallel data
- Registered Outputs: Maintains stable output values between operations
- Synchronous Design: All operations synchronized to clock edges
- Clear State Machine: Well-defined states with explicit transitions
For further details, please check Report, where you can find the complete description of the structure of the components and the results of all the tests used to verify robustness, consistency and behavior of the designed component.
Final Mark: 30/30
This Project was developed by:
- Francesco Di Giore @Digioref