Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

Help with vhdl code

Hi,

I'm working on a vhdl project entitled : Study ,conception and implementation of INTRA H264/AVC video decoder channel in FPGA technology.

objective:

The performance is a major challenge in video compression. The decrease rate of complexity leads to an increase in performance. We must therefore try to reduce the level of complexity through reducing occupancy space of the target system to implement the chain of intra decoding.

To achieve our goal, we have developed an architecture that is a compromise between the intra 4x4 channel decoding and intra 16x16 channel decoding .

Simply add a multiplexer to disable and enable the modules of the channel according to the desired intra prediction mode 16x16 or 4x4.

this picture present the two mux

https://www.alteraforum.com/forum/attachment.php?attachmentid=7642

problem:

The problem is adding multiplexer in thetop level channel. I was not successful in developing a validated code.

top level channel code to modify by adding two Mux is on attachements file (top_level.vhdl).

sorry for my english.

Thank you for your help.

30 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    How about your component declaration for FSM_CHAINE in CHANE_TOP_LEVEL.vhd ?

    --- Quote End ---

    ------------------------------STATE MACHINE ---------------------------------
    -----------------------------------------------------------------------------
    E_FSM_CHAINE :FSM_CHAINE     
       PORT MAP
            ( 
              clk             	   => CLK,
              reset           	   => reset,
              start           	   => START,
              start_out           => START_out,
              START1              => START1,
              START2              => START2,
              START3              => START3,
              DONE_t0             => DONE_t0,
              DONE_t1             => DONE_t1,
              full                => full,
              usedw               => usedw,
              READ                => READ,
              DONE                => DONE_chaine_out ,
              sel                 => sel,
              Mode                => Mode,
              Mode_4              => Mode_4,
              Mode_16             => Mode_16
            );
       -------------------------------------------------------------------------
       -------------------------------------------------------------------------
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    no this is the component instantiation. You should have a declaration in your architecture, somewhere before the begin

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    no this is the component instantiation. You should have a declaration in your architecture, somewhere before the begin

    --- Quote End ---

    -----------------------------------------------------------
    ARCHITECTURE full1 OF CHAINE_TOP_LEVEL IS
    ----------------------------------------------------------- 
    TYPE tableau IS ARRAY ( 0 TO 15 ) OF STD_LOGIC_VECTOR( 15 DOWNTO 0);
    TYPE tableau1 IS ARRAY ( 0 TO 15 ) OF STD_LOGIC_VECTOR( 22 DOWNTO 0);
    SIGNAL Done,DONE_t1,DONE_t2,DONE_t0,DONE_t3 :STD_LOGIC;
    SIGNAL tab_residuel,tabDC,tabHadINV: tableau ;
    SIGNAL FIFO_OUT :STD_LOGIC_VECTOR( 344 DOWNTO 0);
    SIGNAL FIFO_IN  :STD_LOGIC_VECTOR(344 DOWNTO  0);
    SIGNAL coeff_DC :STD_LOGIC_VECTOR( 22 DOWNTO  0);
    SIGNAL usedw:STD_LOGIC_VECTOR(3 DOWNTO 0); 
    SIGNAL tabQTACinv,tabQTDCINV: tableau1 ;
    SIGNAL START1,START2,START3,START4:STD_LOGIC;
    SIGNAL READ ,full,empty:std_logic;
    SIGNAL cp : integer RANGE 0 TO 15;
    SIGNAL  Mode_16,Mode_4,sel  : STD_LOGIC;  
    SIGNAL Mode : STD_LOGIC;
       BEGIN 
    --------------------------------------------------------------
    ---------------------------------------------------------------
    
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    that doesnt show the component declaration. I guess you're missing it..

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    that doesnt show the component declaration. I guess you're missing it..

    --- Quote End ---

    Here is my 2 files FSM_CHAINE.vhd and CHAINE_TOP_LEVEL.vhd

    in attachments.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Yes - you're missing the component declaration for FSM_CHAINE ( you could have put it in intra_16x16_pkg, but you didnt post that, or you could use direct instantiation instead).

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Hi when i try to simulate my file CHAINE_TOP_LEVEL.vhd i get warrning like this

    # ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE#     Time: 0 ns  Iteration: 0  Instance: /chaine_top_level/e_dequant_ac4x4_top_level/e_dequantization_ac_top_level_13/inst_muxbill#  ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE#     Time: 0 ns  Iteration: 0  Instance: /chaine_top_level/e_dequant_ac4x4_top_level/e_dequantization_ac_top_level_13/inst_muxbill#  ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE#     Time: 0 ns  Iteration: 0  Instance: /chaine_top_level/e_dequant_ac4x4_top_level/e_dequantization_ac_top_level_13/inst_muxbill#  ** Warning: NUMERIC_STD."=": metavalue detected, returning FALSE
    . . . 
    . . . 
    

    My CHAINE_TOP_LEVEL.vhd file with attachment
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    The warning isnt in the top level - look where it is from the hierarchy. But all it is is that you didnt initialise inst_muxbill in the e_dequantization_ac_top_level_13 module. It's trying to compare "UUUUUUUU" to something else. It wont be a problem unless it doesnt go away. You can turn this warning off in the simulation/runtime options "Suppress messages from IEEE packages"

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    You can turn this warning off in the simulation/runtime options "Suppress messages from IEEE packages"

    --- Quote End ---

    I try this , also i try to modify modelsim.ini and remove comment before NumericStdNoWarnings = 1 , but still the same problem.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Its not a problem, just a warning that the signals are uninitialised. It shouldnt be a problem if the code is connected correctly.