Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > Big signal assignment

Reply
Thread Tools

Big signal assignment

 
 
Xin Xiao
Guest
Posts: n/a
 
      12-30-2007
I've created a type which is an array (63 downto 0) of std_logic_vector(15
downto 0).

Then I make a signal assigment like this:

Dest_sig <= Sourc_sig;

Both signals are of the type I described above.

The problem is that Dest_sig doesn't seem to get the desired values...

Maybe the problem is that I cannot assign such big signals? Should I loop
component by component?

Thanls,

 
Reply With Quote
 
 
 
 
Alvin Andries
Guest
Posts: n/a
 
      12-30-2007

"Xin Xiao" <> wrote in message
news:fl9768$d26$...
> I've created a type which is an array (63 downto 0) of std_logic_vector(15
> downto 0).
>
> Then I make a signal assigment like this:
>
> Dest_sig <= Sourc_sig;
>
> Both signals are of the type I described above.
>
> The problem is that Dest_sig doesn't seem to get the desired values...
>
> Maybe the problem is that I cannot assign such big signals? Should I loop
> component by component?
>
> Thanls,


Hi,

Your statement is perfectly valid and shouldn't cause any troubles by
itself. You should tell us more of what you're seeing and expecting and give
a bit of the code surrounding this statement.

Regards,
Alvin.


 
Reply With Quote
 
 
 
 
Xin Xiao
Guest
Posts: n/a
 
      12-30-2007

i think it is working now. i'm happy.

i think the problem was dest_sig. it was an inout port, so i divided it into
two in and out ports and it's working.

i'm investigating this further maybe i missed something...

thanks

"Alvin Andries" <> wrote in
message news:47782430$0$18792$...
>
> "Xin Xiao" <> wrote in message
> news:fl9768$d26$...
>> I've created a type which is an array (63 downto 0) of
>> std_logic_vector(15
>> downto 0).
>>
>> Then I make a signal assigment like this:
>>
>> Dest_sig <= Sourc_sig;
>>
>> Both signals are of the type I described above.
>>
>> The problem is that Dest_sig doesn't seem to get the desired values...
>>
>> Maybe the problem is that I cannot assign such big signals? Should I loop
>> component by component?
>>
>> Thanls,

>
> Hi,
>
> Your statement is perfectly valid and shouldn't cause any troubles by
> itself. You should tell us more of what you're seeing and expecting and
> give
> a bit of the code surrounding this statement.
>
> Regards,
> Alvin.
>
>


 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      12-30-2007

"Xin Xiao" <> wrote in message
news:fl9768$d26$...
> I've created a type which is an array (63 downto 0) of std_logic_vector(15
> downto 0).
>
> Then I make a signal assigment like this:
>
> Dest_sig <= Sourc_sig;
>
> Both signals are of the type I described above.
>
> The problem is that Dest_sig doesn't seem to get the desired values...
>
> Maybe the problem is that I cannot assign such big signals? Should I loop
> component by component?
>
> Thanls,


What you've described is fine. Post your code and what exactly you think is
not correct and what sim tool you're using.

KJ


 
Reply With Quote
 
Xin Xiao
Guest
Posts: n/a
 
      12-30-2007
thanks kj, the problam was that dest_sig was an inout port. I divided into
in and out ports and it's working now. is my problem a common mistake that
happen with inout ports?

What i saw is that the port was full of 'U's, not the 0's of Source_sig.

"KJ" <> wrote in message
news:98Wdj.214$.. .
>
> "Xin Xiao" <> wrote in message
> news:fl9768$d26$...
>> I've created a type which is an array (63 downto 0) of
>> std_logic_vector(15 downto 0).
>>
>> Then I make a signal assigment like this:
>>
>> Dest_sig <= Sourc_sig;
>>
>> Both signals are of the type I described above.
>>
>> The problem is that Dest_sig doesn't seem to get the desired values...
>>
>> Maybe the problem is that I cannot assign such big signals? Should I loop
>> component by component?
>>
>> Thanls,

>
> What you've described is fine. Post your code and what exactly you think
> is not correct and what sim tool you're using.
>
> KJ
>


 
Reply With Quote
 
KJ
Guest
Posts: n/a
 
      12-31-2007

"Xin Xiao" <> wrote in message
news:fl9b6v$m9o$...
> thanks kj, the problam was that dest_sig was an inout port. I divided into
> in and out ports and it's working now. is my problem a common mistake that
> happen with inout ports?


Can't really say since you didn't post any code to look at. By itself,
driving an inout is not a problem, but I suspect that the way you were using
the port caused the signal to drive to loop back and drive itself which
would cause it to be unable to get out of the 'U' state since 'U' trumps
everything.

>
> What i saw is that the port was full of 'U's, not the 0's of Source_sig.
>

'U' is what you'll get if there is some driver on the net that is undriven
(the 'U' means uninitialized, which is the default for any signal that is
not explicitly initialized in the code somewhere).

KJ



 
Reply With Quote
 
Brian Drummond
Guest
Posts: n/a
 
      12-31-2007
On Mon, 31 Dec 2007 00:48:22 +0100, "Xin Xiao" <> wrote:

>
>i think it is working now. i'm happy.
>
>i think the problem was dest_sig. it was an inout port, so i divided it into
>two in and out ports and it's working.


And that may be the solution to your problem.

>i'm investigating this further maybe i missed something...
>

Having got it working with separate ports, you may want to go back and
learn how to do it with an Inout port.

If Source is outside the unit with the port, driving IN to the port, you
have to remember that the unit is also driving OUT on the same port, and
the result is the combination of both those signals according to the
resolution function.

So, to drive IN, you have to make sure the unit drives
(others =>(others=>'Z')) onto the port. In other words it turns its own
drivers OFF to allow the external signal in.

And to drive out from the port, you will have to drive 'Z' into it, from
your external source.

Also bear in mind that internal signals in FPGAs are best implemented as
separate In and Out ports, because tristate drivers (capable of driving
'Z') no longer exist in modern FPGAs. The logic will still work; but the
tools will effectively replace the tristate drivers with logic gates.

The place you need to use InOut ports is external signals, e.g. to
memory or processors or other FPGAs connected to your FPGA.

- Brian

 
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
Assignment to output signal from internal signal not istantaneous dibacco73 VHDL 1 02-12-2009 11:28 PM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net 0 12-26-2008 09:29 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net Web Controls 0 12-26-2008 06:11 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Python 0 12-24-2008 07:35 AM
"Target of signal assignment is not a signal" Nicolas Moreau VHDL 9 07-25-2007 04:21 PM



Advertisments
 



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