H.265 Video Encoder IP RTL Simulation 方法



  • RTL Simulation 方法

    文件结构

    .
    |-- rtl
    |   |-- cabac
    |   |-- db
    |   |-- enc_defines.v
    |   |-- fetch
    |   |-- fme
    |   |-- h265core.v
    |   |-- ime
    |   |-- intra
    |   |-- mc
    |   |-- mem
    |   |-- pre_i
    |   |-- top
    |   `-- tq
    `-- sim
        `-- h265core
    

    Modelsim

    # go to simulation directory
    cd ./sim/h265core
    # run simulation
    ./vsim.run
    

    NCsim

    # go to simulation directory
    cd ./sim/h265core
    # run simulation
    ./make ncsim
    

    Simulation result

    *** CHECK TOP ! ***
    
                     fime auto check is on
                     fme auto check is on
                     mvd auto check is on
                     db auto check is on
                     fetch auto check is on
                     bs auto check is on
    
    *** TEST P FRAMES ! ***
    
            at 00000600, Frame Number = 00, mb_x_first = 00, mb_y_first = 00
            at 00050065, Frame Number = 00, mb_x_first = 01, mb_y_first = 00
            at 00091015, Frame Number = 00, mb_x_first = 02, mb_y_first = 00
            ...
    		...
    		...
            at 10594605, Frame Number = 07, mb_x_first = 01, mb_y_first = 00
            at 10637335, Frame Number = 07, mb_x_first = 02, mb_y_first = 00
            at 10649965, Frame Number = 07, mb_x_first = 00, mb_y_first = 00
    
    *** TEST I FRAMES ! ***
    
            at 10660075, Frame Number = 00, mb_x_first = 00, mb_y_first = 00
            at 10778975, Frame Number = 00, mb_x_first = 01, mb_y_first = 00
            at 10876295, Frame Number = 00, mb_x_first = 02, mb_y_first = 00
    		...
    		...
    		...
            at 40551735, Frame Number = 09, mb_x_first = 06, mb_y_first = 03
            at 40638475, Frame Number = 09, mb_x_first = 00, mb_y_first = 00
            at 40680215, Frame Number = 10, mb_x_first = 00, mb_y_first = 00
    
    
    *** CHECK FNISHED ! ***
    
    Simulation complete via $finish(1) at time 40682215 NS + 0
    ./tb_top.v:578     $finish ;
    


  • 目前需要在Linux平台上仿真,Window下会报错,请知悉。



  • 由于本项目仿真一直在Linux下,如果采用Window平台仿真,可能会出现如下错误

    at 00000600, Frame Number = 00, mb_x_first = 00, mb_y_first = 00
    
    # at 00049380, Error!
    
    # (MV_X,MV_Y) should be (0c,0c), however is (04,0d)
    
    # at 00050020, Error!
    
    # FIME_PARTITION should be 000000000000000000000000000000000000000000, however is 001000000000000000000000000000001100000011
    
    #     at 00050065, Frame Number = 00, mb_x_first = 01, mb_y_first = 00
    
    # ** Note: $finish    : ./tb_top.v(783)
    
    #    Time: 50380 ns  Iteration: 0  Instance: /tb_top
    

    修改办法: 修改/sim/h265core/tb_top.v

    # 将所有的$fopen语句修改一下
    $fopen( XXXX ,"r" );    ->    $fopen( XXXX ,"rb" )
    


  • 范老师,您好,貌似代码中码率的设置是“0~51”,tb文件中设置的码率值是22。能介绍下这个设定的码率值和真实码率的对应关系么,谢谢!



  • @tomash 这个是QP值。目前版本代码没有码率控制,需要自行添加一个模块来实时改变QP就行



  • 范老师,您好。运行的系统是centos还是ubuntu?方便透漏是哪个版本么,谢谢!


Log in to reply
 

Looks like your connection to OpenASIC was lost, please wait while we try to reconnect.