- Minoo Sanjari
- Faezeh Misaghi
Welcome to the repository of my Custom Hash Generator hardware design. This project focuses on the hardware implementation of a cryptographic-style hash algorithm, developed in two distinct phases: Behavioral RTL Design and Gate-Level Structural Synthesis.
The system architecture is meticulously designed using the Huffman methodology, strictly separating the Datapath and the Control Unit (FSM) for optimal synchronization and resource management.
In this phase, the core hash generation algorithm was implemented at the Register Transfer Level (RTL) using Verilog.
- PRNG Module (Pseudo-Random Number Generator): Utilizes a 6-bit shift register with XOR feedback and a 3-bit counter to generate randomized selection indices.
- Hash Processor: Processes a 128-bit input message divided into four 32-bit words over 64 rounds. The datapath integrates a custom Register File, a ROM for algorithm constants, an Adder, and a dynamic Step Module featuring a Left Barrel Shifter.
- Control Unit: Designed as a FSM with explicit Handshaking signals (
start_rnd,done_rnd) to coordinate the PRNG and the main Hash processor.
This phase demonstrates low-level hardware synthesis by mapping the behavioral design onto fundamental programmable logic cells (C1, C2, S1, S2).
- Scaled Architecture: The datapath was scaled down to process 8-bit words for synthesis feasibility.
- Hardware Multiplier: The rotational shifter was replaced by a custom 4x4 Array Multiplier, built from scratch using cascaded Half Adders (HA) and Full Adders (FA).
- Gate-Level Optimization: The design was highly optimized to minimize the total gate count.
- š Comprehensive Technical Report: For an in-depth breakdown of how the behavioral modules were manually mapped to the fundamental logic cells, along with the complete synthesis results, schematic derivations, and mathematical models, please refer to the
report.pdffile included in this phase's directory.
.
āāā assets/ # Hardware architecture diagrams (Datapath, FSM)
āāā Behavioral-RTL/ # Phase 1: Behavioral RTL implementation
āāā Structural-Synthesis/ # Phase 2: Gate-level structural synthesis
ā āāā src
ā āāā report.pdf
āāā README.md
- Hardware Description Language: Verilog HDL
- Simulation & Verification: ModelSim
- Design Methodology: Huffman (Datapath + Controller separation), Handshaking, One-Hot State Encoding
- Gate-Level Optimization: Custom C++ scripts for logic cell counting and resource monitoring




