Ali_louati
Newbie level 4
Hello,
I'm working with DFTadvisor. I am having a problem when I apply the command
b04 is a benchmark design of Itc99.
The error message is
Did any one had this problem before.
You will find below the VHDL file of this design because I think the problem is with the expression integer range x down to x...
Did I need to convert this type of expression to std_logic_vector before synthesys.
Thank you
I'm working with DFTadvisor. I am having a problem when I apply the command
Code:
[B]read_verilog b04_gate.v[/B]
b04 is a benchmark design of Itc99.
The error message is
Error: File: b04_gate.v, Line: 55: Bit-select of undeclared variable 'DATA_IN' used in module 'b04'.
Did any one had this problem before.
You will find below the VHDL file of this design because I think the problem is with the expression integer range x down to x...
Did I need to convert this type of expression to std_logic_vector before synthesys.
Thank you
Code VHDL - [expand] 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 LIBRARY IEEE; USE IEEE.std_logic_1164.all; USE IEEE.std_logic_arith.all; entity b04 is port( RESTART : in bit; AVERAGE : in bit; ENABLE : in bit; DATA_IN : in integer range 127 downto -128; DATA_OUT : out integer range 127 downto -128; RESET : in bit; CLOCK : in bit ); end b04; architecture BEHAV of b04 is constant sA : integer := 0; constant sB : integer := 1; constant sC : integer := 2; begin process(CLOCK,RESET) variable stato : integer range 2 downto 0; variable RMAX, RMIN, RLAST, REG1, REG2, REG3, REG4, REGD : integer range 127 downto -128; variable temp : integer; variable RES, AVE, ENA : bit; begin if RESET = '1' then stato := sA; RMAX := 0; RMIN := 0; RLAST := 0; REG1 := 0; REG2 := 0; REG3 := 0; REG4 := 0; DATA_OUT <= 0; elsif CLOCK'event and CLOCK='1' then RES := RESTART; ENA := ENABLE; AVE := AVERAGE; case stato is when sA => stato := SB; when sB => RMAX := DATA_IN; RMIN := DATA_IN; REG1 := 0; REG2 := 0; REG3 := 0; REG4 := 0; RLAST := 0; DATA_OUT <= 0; stato := sC; when sC => if (ENA = '1') then RLAST := DATA_IN; end if; if (RES = '1') then REGD := (RMAX+RMIN)mod 128; temp := RMAX+RMIN; if (temp >= 0) then DATA_OUT <= REGD/2; else DATA_OUT <= -((-REGD)/2); end if; elsif (ENA = '1') then if (AVE = '1') then DATA_OUT <= REG4; else REGD := (DATA_IN+REG4) mod 128; temp := DATA_IN+REG4; if (temp >= 0) then DATA_OUT <= REGD/2; else DATA_OUT <= -((-REGD)/2); end if; end if; else DATA_OUT <= RLAST; end if; if DATA_IN > RMAX then RMAX := DATA_IN; elsif DATA_IN < RMIN then RMIN := DATA_IN; end if; REG4 := REG3; REG3 := REG2; REG2 := REG1; REG1 := DATA_IN; stato := sC; end case; end if; end process; End BEHAV;
Last edited by a moderator: