Error control coding (Encoder) in digital communication for Tsunami Early warning System using verilog
This repository contains Verilog implementations and testbenches for hardware blocks used in an LDPC-like encoding flow for disaster-management communication systems.
The project focuses on:
- One-hot phase generation
- Termination bit generation
- Code bit generation
- Information register control
These files are designed for functional simulation using Icarus Verilog and waveform inspection with GTKWave.
src/information_register.vcode_bit_generation.vone_hot_encoded_phase_generation.vtermination.v
test/information_register_tb.vcode_bit_generation_tb.vone_hot_encoded_phase_generation_tb.vtermination_tb.v
README.md- waveform and simulation files generated by running the tests.
Install these tools before running the simulations:
-
Icarus Verilog
- Windows installer: https://iverilog.org
- Linux:
sudo apt install iverilog
-
GTKWave (optional, for waveform viewing)
- Windows installer: http://gtkwave.sourceforge.net/
Open a terminal in and enter PBL and run the following commands for each module.
iverilog -o information_register.vvp src/information_register.v test/information_register_tb.v
vvp information_register.vvpIf the testbench generates wave.vcd, open it with:
gtkwave wave.vcdiverilog -o code_bit_generation.vvp src/code_bit_generation.v test/code_bit_generation_tb.v
vvp code_bit_generation.vvpIf the testbench writes a VCD file (for example code_bit_gen.vcd), open it with:
gtkwave code_bit_gen.vcdiverilog -o one_hot_encoded_phase_generation.vvp src/one_hot_encoded_phase_generation.v test/one_hot_encoded_phase_generation_tb.v
vvp one_hot_encoded_phase_generation.vvpOpen the generated waveform file if available:
gtkwave dump.vcdiverilog -o termination.vvp src/termination.v test/termination_tb.v
vvp termination.vvpIf the testbench produces a VCD file such as termination.vcd, open it with:
gtkwave termination.vcdRun the simulations in this order for a logical progression through the design:
- Information register
- Code bit generation
- One-hot encoded phase generation
- Termination bit generation
- Run the simulation.
- Confirm the
.vcdfile exists in the repository root. - Open it with
gtkwave:
gtkwave <filename>.vcdIf gtkwave is not installed, download and install it first.
- If a testbench does not generate a VCD file, use the printed
vvpoutput to verify behavior. - If you need waveform output, add
$dumpfile("<name>.vcd");and$dumpvars(0, <testbench_module>);to the testbench.
- This repository is intended for simulation and functional verification.
- FPGA implementation and real-time input sources are not included.
- Some modules may require additional development for synthesis or deployment.