• F-I-L
  • Wiki
  • Source
  • Contact
  • Simulation

    Modified by 2015.05.07

    Simulations are used for showing every module's function and getting a PSNR(Peak Signal-to-Noise Ratio) between software simulation and HDL functional simulation, the PSNR can show you the quality of images after processing by this IPCore.

    Steps for simulations

    Well, every IPCore has a file "README.md" for showing steps for simulation, and at first the instruction will tell you the range of parameters for simulation, like:

    Simulations for this module just support RGB and gray-scale images !

    Preparing

    Open "ImageForTest".
    Put images which you want to use for simulations.
    Edit the "conf.json" for setting the configurations for simulations.

    Software simulation

    Open "SoftwareSim".
    Run "sim.py".
    Open "SimResCheck", check your results.

    Creat preparing data for HDL functional simulation

    Open "HDLSimDataGen".
    Run "creat.py".

    HDL functional simulation

    Functional simulation just support for modelsim 10.1 up.
    Above all, you must compile all xilinx vivado library to modelsim.

    Open "FunSimForHDL".
    Run "ContrastTranslate.mpf" with modelsim.

    Do these:

    Run this commond at first time in modelsim tcl:

    vlib work
    

    Then, compile all your source file:

    modelsim gui -> Compile -> Compile all
    

    Then, run this:

    do Run.do
    

    If you just want to get the finally result, and don't want to watch the waveform, run this:

    do RunOver.do
    

    Comparing

    Open "SimResCheck".
    Run "covert.py", then you can get the results form functional simulation.
    Run "compare.py" for creating a report for software simulation and functional simulation.