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

    Modified by 2015.05.15

    Design

    Graying

    Version
    1.0


    Modified
    2015-05-12


    Source

    Graying


    IP-GUI

    Graying IP-GUI


    Function

    Covert RGB images to gray-scale images.Users can configure the multipliers by themselves.Give the first output after mul_delay + 2 cycles while the input enable.


    Files

    Name Function
    Graying.v Main module
    Graying_TB.sv Test bench
    MultiplierRedx0d299.xci Xilinx IPCore file.
    MultiplierRedx0d299_funcsim.v Model for functional simulation.
    MultiplierGreenx0d587.xci Xilinx IPCore file.
    MultiplierGreenx0d587_funcsim.v Model for functional simulation.
    MultiplierBluex0d114.xci Xilinx IPCore file.
    MultiplierBluex0d114_funcsim.v Model for functional simulation.


    Parameters

    Name Type Range Default Description
    work_mode unsigned 0 for Pipeline, 1 for Req-ack 0 This module's working mode.
    color_width unsigned 1 - 12 8 Color's bit width.
    mul_delay unsigned Depend your multilpliers' configurations 3 Delay for multiplier.


    Ports

    Name Port Type Range Default Description
    clk input unsigned None None Clock.
    rst_n input unsigned None None Reset, active low.
    in_enable input unsigned None None Input data enable, in pipeline mode, it works as another rst_n, in req-ack mode, only it is high will in_data can be changes.
    in_data input unsigned 3 * color_width - 1 : 0 None Input data, it must be synchronous with in_enable.
    out_ready output unsigned None None Output data ready, in both two mode, it will be high while the out_data can be read.
    out_data output unsigned color_width - 1 : 0 None Output data, it will be synchronous with out_ready.


    Instances

    Name Type Description
    MulRed MultiplierRedx0d299 Multiplier for Unsigned 12bits x 0.299, used for red channel.You can configure the multiplier by yourself, then change the "mul_delay".All Multiplier's pipeline stage must be same, you can not change the ports' configurations!
    MulGreen MultiplierGreenx0d587 Multiplier for Unsigned 12bits x 0.587, used for green channel.You can configure the multiplier by yourself, then change the "mul_delay".All Multiplier's pipeline stage must be same, you can not change the ports' configurations!
    MulBlue MultiplierBluex0d114 Multiplier for Unsigned 12bits x 0.114, used for blue channel.You can configure the multiplier by yourself, then change the "mul_delay".All Multiplier's pipeline stage must be same, you can not change the ports' configurations!


    Simulations

    Simulations for this module just support RGB images !

    Waves

    Pipeline mode

    Pipeline mode

    ReqAck mode

    ReqAck mode

    Original

    Original

    Results

    Results
    HDL functional simulation for pipeline mode is on the left, for req-ack mode is on the middle, and which on the right is the soft simulation

    PSNR

    1 2 3 Total
    46.73 46.96 46.83 46.84


    Utilization

    Slice LUTs* Slice Registers DSPs
    28 26 3


    Timing

    The max Data Path Delay is 2.265ns, so:

    FMax = 441.50MHz


    Thanks

    The sources of images for simulations:
    041-尾翼
    月岡月穂-星を呑む
    LM7-xxxまとめ