Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

more thn one UseClause imports declaration of simple name "unsigned" none of the dec

Status
Not open for further replies.

tryingsth

Junior Member level 2
Junior Member level 2
Joined
Nov 21, 2012
Messages
23
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,458
more thn one UseClause imports declaration of simple name "unsigned" none of the dec

hello again,

I need your helps.I couldn't find solution of this error: Error (10621): VHDL Use Clause error at Projem_With_adder.vhd(39): more than one Use Clause imports a declaration of simple name "unsigned" -- none of the declarations are directly visible

I search on the internet but i couldn't find.I attach my code.


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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
library ieee;
use ieee.std_logic_1164.all;
use ieee.std_logic_arith.all;
use ieee.std_logic_unsigned.all;
USE work.my_data_types.all;
use ieee.std_logic_arith;
use ieee.numeric_std.all;
 
 
ENTITY Projem_With_adder IS
        
 GENERIC (n : INTEGER := 4);
 
 
PORT(   clk         : IN STD_LOGIC;
        --matris_in : IN integer_array(0 TO n+1);
        matris_out  : OUT int_arr_out;
        we          : in std_logic
        
        
);
end Projem_With_adder;
 
architecture behv of Projem_With_adder is 
 
SIGNAL matris_in :integer_array :=((0,0,0,0,0,0), (0,25,69,54,30,0), (0,215,14,3,98,0), (0,51,150,117,200,0), (0,100,13,82,9,0), (0,0,0,0,0,0)); 
SIGNAL s1,s2,s3,s4,s5,s6,s7,summary : std_logic_vector(7 downto 0);
VARIABLE counter : INTEGER;
 
TYPE state IS (st0,st1,st2,st3,st4);
SIGNAL pr_state,nx_state: state;
 
 
 
function adder (A,B : in integer) return unsigned is 
      
      variable tmp: unsigned(8 downto 0);
      variable SUM: unsigned(7 downto 0);
   begin
            
     --tmp :=  (conv_unsigned(A,8) + conv_unsigned(B,8) );
      
       -- G1 : FOR i IN 0 TO 7 LOOP
    --  if (A(i) XOR ( B(i) XOR CI )) =1 then
        --tmp(i) := '1';
 
        --else  tmp(i) := 0;
        
        --end if;
        --end LOOP;
      
      
        --SUM:=tmp (7 downto 0);
        --co:=tmp(8);
 
   return SUM; 
    
 end adder;
 
 
 
 BEGIN
 
 PROCESS(clk,we)
 
 BEGIN
 if(we='1') then
 pr_state <=st0;
 
 elsif(clk'event and clk = '1') then
 
 pr_state <= nx_state;
 
 end if;
 END PROCESS;
 
 PROCESS(pr_state,counter)
 
 BEGIN
  counter := 0;
   
  FOR i IN 1 TO n  LOOP
  FOR j IN 1 TO n  LOOP
 
 
 CASE pr_state IS
        WHEN st0 =>
        
        IF(counter = 0) THEN
 
        s1<=conv_integer(adder(matris_in(i-1,j-1),matris_in(i-1,j)));
        s2<=adder(matris_in(i-1,j+1),matris_in(i,j-1));
        s3<=adder(matris_in(i,j),matris_in(i,j+1));
        s4<=adder(matris_in(i+1,j-1),matris_in(i+1,j));
  
        counter:=counter + 1;
        nx_state <= st1;
        
        end if;
        
        WHEN st1 =>
        
        IF(counter = 1) then
        
        s5<=adder(s1,s2);
        s6<=adder(s3,s4);
        
        counter:=counter + 1;
        nx_state <= st2;
 
        end if;
        
        WHEN st2 =>
        
        IF(counter = 2) THEN
        
        s7<=adder(s5,s6);
        
        counter:=counter + 1;
        nx_state <= st3;
        
        end if;
        
        WHEN st3 =>
        
        IF(counter = 3) THEN 
        
        summary<=(s7,matris_in(i+1,j+1));
        matris_out(i,j)<=conv_integer(summary);
        
        end if;
        
        END CASE;
        
        
    
    
 
    
 
 end loop;
 end loop;
 end process;
 
 
 end behv;


- - - Updated - - -

the error at this line:

function adder (A,B : in integer) return unsigned is
 
Last edited by a moderator:

Re: more thn one UseClause imports declaration of simple name "unsigned" none of the

both std_logic_unsigned and numeric_std libraries define "unsigned".

You'll have to use either std_logic_unsigned or numeric_std.
 
Re: more thn one UseClause imports declaration of simple name "unsigned" none of the

thank you so much.it looks work
 

Re: more thn one UseClause imports declaration of simple name "unsigned" none of the

The conflict is actually numeric_std and std_logic_arith. std_logic_unsigned just defines arithmetic functions for std_logic_vector (and treats them as unsigned).

So std_logic_arith should be removed (it isnt standard VHDL anyway). You'll have to replace the conv_unsigned function too, as this comes from the std_logic_arith library and use the numeric_std equivalent to_unsigned.
 

Re: more thn one UseClause imports declaration of simple name "unsigned" none of the

Hello

I'm using altera Cyclone3 FPGA and i get an error.
Do you know How I can solve the error :

Error: Can't place 514 pins with 2.5 V I/O standard because Fitter has only 342 such free pins available for general purpose I/O placement
 

Re: more thn one UseClause imports declaration of simple name "unsigned" none of the

looks like you are using 2.5V I/O - are you?
In that case, you'll need a bigger package with more available I/O
otherwise, you will need to have a look at your I/O constraints and move the 3.3V inputs and outputs
 

Re: more thn one UseClause imports declaration of simple name "unsigned" none of the

Yes I used 2.5V I'm trying to set 3.3V but . I try to chnage values at assignments editor and I select the the column and I set them 3.3V LCMOS or others. But It doesn't work.I can do incorrectly. Could you explain this,please?
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top