Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Connecting std_ulogic_vector to std_logic_vector

Reply
Thread Tools

Connecting std_ulogic_vector to std_logic_vector

 
 
Roel
Guest
Posts: n/a
 
      01-30-2004
Hi

A bi-directional bus from type std_ulogic_vector (from a model from
fmf) has to be connected to a bidirectional bus from type
std_logic_vector. I created a type-conversion block for the conversion
but the simulator/compiler keeps complaining: multiple driver.

ENTITY:

data : inout std_logic_vector(31 downto 0);
udata : inout std_ulogic_vector(31 downto 0);

ARCHITECTURE:

data <= to_stdlogicvector(udata);
udata <= to_stdulogicvector(data);

How should I implement a kind of RESOLVE function to go from one type
to another?

Thank you,

Roel
 
Reply With Quote
 
 
 
 
Egbert Molenkamp
Guest
Posts: n/a
 
      01-31-2004

"Roel" <(E-Mail Removed)> schreef in bericht
news:(E-Mail Removed) om...
> Hi
>
> A bi-directional bus from type std_ulogic_vector (from a model from
> fmf) has to be connected to a bidirectional bus from type
> std_logic_vector. I created a type-conversion block for the conversion
> but the simulator/compiler keeps complaining: multiple driver.


I don't know which model you are trying to use. But if the inout port is
of type std_Ulogic_vector (which is un unresolved type) it will be rather
difficult to solve your problem. I would expect that if it is was really
the intention of the model to use it as a bidirectional bus that the type
should be std_logic_vector.
(It could be that the designer of the model uses INOUT because an
output signal of the model is also internally needed.)

Egbert Molenkamp


 
Reply With Quote
 
 
 
 
Roel
Guest
Posts: n/a
 
      02-01-2004
"Egbert Molenkamp" <(E-Mail Removed)> wrote in message news:<bvg5vi$mfv$(E-Mail Removed)>...
> "Roel" <(E-Mail Removed)> schreef in bericht
> news:(E-Mail Removed) om...
> > Hi
> >
> > A bi-directional bus from type std_ulogic_vector (from a model from
> > fmf) has to be connected to a bidirectional bus from type
> > std_logic_vector. I created a type-conversion block for the conversion
> > but the simulator/compiler keeps complaining: multiple driver.

>
> I don't know which model you are trying to use. But if the inout port is
> of type std_Ulogic_vector (which is un unresolved type) it will be rather
> difficult to solve your problem. I would expect that if it is was really
> the intention of the model to use it as a bidirectional bus that the type
> should be std_logic_vector.
> (It could be that the designer of the model uses INOUT because an
> output signal of the model is also internally needed.)
>
> Egbert Molenkamp


The model I'm usign is the
http://www.eda.org/fmf/fmf_public_mo...am29lv512n.vhd

All the signals of the DQ bus are INOUT and of std_ulogic. The signals
should be bidirectional, you should read and write to the model.

Is it not possible to interface this in some way to std_logic INOUT
signals?

Best regards,
Roel
 
Reply With Quote
 
Mike Treseler
Guest
Posts: n/a
 
      02-01-2004
Roel wrote:

>>>A bi-directional bus from type std_ulogic_vector (from a model from
>>>fmf) has to be connected to a bidirectional bus from type
>>>std_logic_vector. I created a type-conversion block for the conversion
>>>but the simulator/compiler keeps complaining: multiple driver.

>>
>>I don't know which model you are trying to use. But if the inout port is
>>of type std_Ulogic_vector (which is un unresolved type) it will be rather
>>difficult to solve your problem. I would expect that if it is was really
>>the intention of the model to use it as a bidirectional bus that the type
>>should be std_logic_vector.
>>(It could be that the designer of the model uses INOUT because an
>>output signal of the model is also internally needed.)
>>
>>Egbert Molenkamp

>
>
> The model I'm usign is the
> http://www.eda.org/fmf/fmf_public_mo...am29lv512n.vhd
>
> All the signals of the DQ bus are INOUT and of std_ulogic. The signals
> should be bidirectional, you should read and write to the model.
>
> Is it not possible to interface this in some way to std_logic INOUT
> signals?


It is possible since the std_ulogic bit type of the model is directly
compatible with std_logic.

You could instance am29lv512n.vhd in your test bench
something like the example below.


-- Mike Treseler


architecture sim of test_AM29LV512N is

-- component generics
constant tipd_A0 : VitalDelayType01 := VitalZeroDelay01;
constant tipd_A1 : VitalDelayType01 := VitalZeroDelay01;
-- etc. etc.

-- component ports
signal A24_s : std_ulogic := 'U'; -- [IN]
signal A23_s : std_ulogic := 'U'; -- [IN]
-- etc. etc.
signal A0_s : std_ulogic := 'U'; -- [IN]

signal DQ15_s : std_ulogic := 'U'; -- [INOUT]
-- etc etc
signal DQ0_s : std_ulogic := 'U'; -- [INOUT]
signal CENeg_s : std_ulogic := 'U'; -- [IN]
signal OENeg_s : std_ulogic := 'U'; -- [IN]
signal WENeg_s : std_ulogic := 'U'; -- [IN]
signal RESETNeg_s : std_ulogic := 'U'; -- [IN]
signal WPNeg_s : std_ulogic := 'U'; -- [IN]
signal BYTENeg_s : std_ulogic := 'U'; -- [IN]
signal RY_s : std_ulogic := 'U'; -- [OUT]

signal tb_dbus : std_logic_vector(15 downto 0); -- my testbench signal
-- resolved type
begin -- architecture sim

-- model instantiation
DUT: entity work.AM29LV512N
generic map (tipd_A0 => tipd_A0,
tipd_A1 => tipd_A1,
-- etc. etc.
LongTimming => LongTimming,
TimingModel => TimingModel)

port map (A24 => A24_s, -- [IN]
-- etc. etc.
A0 => A0_s, -- [IN]

DQ15 => DQ15_s, -- [INOUT]
-- etc. etc.
DQ0 => DQ0_s, -- [INOUT]

CENeg => CENeg_s, -- [IN]
OENeg => OENeg_s, -- [IN]
WENeg => WENeg_s, -- [IN]
RESETNeg => RESETNeg_s, -- [IN]
WPNeg => WPNeg_s, -- [IN]
BYTENeg => BYTENeg_s, -- [IN]
RY => RY_s); -- [OUT]


tb_dbus <= (

DQ15_s,
DQ14_s,
DQ13_s,
DQ12_s,
DQ11_s,
DQ10_s,
DQ9_s,
DQ8_s,
DQ7_s,
DQ6_s,
DQ5_s,
DQ4_s,
DQ3_s,
DQ2_s,
DQ1_s,
DQ0_s); -- bus to model

tb_dbus <= (tb_dbus'range => 'Z'); -- bus to testbench etc. etc.





end architecture sim;
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding SVA to VHDL std_ulogic_vector guarana5 VHDL 0 07-25-2008 12:28 PM
inout std_logic_vector to array of std_logic_vector of generic length conversion... Thomas Rouam VHDL 6 11-09-2007 11:49 AM
driving bidirectional std_ulogic_vector deepae VHDL 0 11-09-2006 02:13 PM
Conversion: String to std_ulogic_vector Stefan Duenser VHDL 2 12-15-2004 12:03 PM
Concurrent assignments to std_ulogic_vector slice is OK with ModelSim Nicolas Matringe VHDL 9 06-14-2004 10:10 PM



Advertisments