Installation / User Guide

© 2025 Maktab-e-Digital Systems Lahore
Licensed under the Apache 2.0 License


Requirements

  • HDL Simulator (QuestaSim)
    Download from Siemens EDA

    Steps:

    1. Sign in with your Siemens EDA/Mentor account (your university/company usually provides this).

    2. Navigate to Downloads → Questa Advanced Simulator.

    3. Select version & OS, then download.

    4. Apply your organization’s license file.

  • Python 3.8+
    Download here
    (check “Add Python to PATH” during installation).

    python --version
    
  • Python Libraries
    Required: Pillow and NumPy

    python -m ensurepip --default-pip
    pip install pillow numpy
    

    If using python3:

    python -m pip install pillow numpy
    

    Verify installation:

    pip show pillow
    pip show numpy
    

Getting Started

Workflow Flowchart

JPEG Encoder Workflow Flowchart

Overall flow of JPEG Compression Steps

Step 1: Clone the Repository

git clone https://github.com/rmknae/JPEG--ENCODER.git
cd JPEG--ENCODER

Step 2: Place Input Image

Place your test image inside the script/ folder.
Supported formats: .jpg, .png, .jpeg.

Step 3: Run Simulation

Run the provided batch file:

  • Windows:
    Double-click run.bat

  • Linux/Mac:
    Run commands manually:

    python data_in.py
    vlog ./src/*.sv ./testbench/*.sv
    vsim -c -do "run -all; quit" tb_top
    python script/raw_jpeg_bitstream_to_image/jpeg.py
    

    Or create your own run_sim.sh shell script to automate.

Step 4: Output

The final JPEG image is saved inside the output_images/ folder.


Troubleshooting

Problem

Solution

Python cannot find Pillow or NumPy

Run pip install pillow numpy.

vsim not found

Add the QuestaSim win64 folder to your PATH.

Paths with spaces fail

Wrap in quotes: "C:\Users\HH Traders\Documents\JPEG--ENCODER".

CMD closes immediately

Run run.bat from an already open Command Prompt window.

Note: Always use native Windows paths. Avoid \\wsl.localhost\... or WSL paths as they may cause compatibility issues.


Licensed under the Apache License 2.0 Copyright © 2025 Maktab-e-Digital Systems Lahore