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.

Conversion Error with conv_signed

Status
Not open for further replies.

ghostridergr

Member level 1
Joined
Nov 22, 2011
Messages
41
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,590
Can anyone help me in that:
Code:
 read_inp: for k in 0 to N-1 loop
             a(k)<=to_stdulogic(a_var(k));
           end loop;
              wait for 1 ms;
            inp1(1,1)<=conv_signed(a,N-1);

where it is:
Code:
signal a,b: std_logic_vector(N-1 downto 0):= (others=>'0');
The compiler complains "No feasible entries for conv_signed". But as i see in std_logic_arith it can take as argument an std_ulogic. What i 've done wrong?
 
Last edited:

dont use std_logic_arith, use numeric_std.

Then it will be a bit clearer.
Any reason you need a std_ulogic rather than a std_logic?
 

dont use std_logic_arith, use numeric_std.

Then it will be a bit clearer.
Any reason you need a std_ulogic rather than a std_logic?
yes but if i use numeric_std which the function to_signed doesn't as an argument std_logic_vector. Thats why i used ulogic, so as to do the conversion with conv_signed. What changes do you propose?

These are my imports:
Code:
library IEEE;
use IEEE.std_logic_1164.all;
use STD.TEXTIO.all;
use IEEE.std_logic_unsigned.all;
use IEEE.std_logic_arith.all;
 

you easily convert between std_logic_vector, signed type and integer with numeric_std
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top