FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > VHDL

VHDL comp.lang.vhdl newsgroup / Usenet

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-12-2003, 06:54 PM
walala
Guest
 
Posts: n/a
Default shall I reuse a variable/signal or not?

Dear all,

Here is a fragment of my code... t1, t2, t3, t4, temp1, temp2, temp3,
temp4 are my temporary variables... Y0, Y7, Y1, Y6 are the actual
result I want to output...

I want to know if I can re-use t1, t2 and temp1 and temp2, that's to
say, don't use t3, t4, temp3 and temp4? What will be the impact of
that change to my circuit?

Less storage memory? Less adders?

Can anybody tell me?

Thanks a lot,

-Walala
----------------------------------------------------------------------------


t1:=91*ZZ(0)(count2)+118*ZZ(2)(count2)+91*ZZ(4)(co unt2)+49*ZZ(6)(count2);

t2:=126*ZZ(1)(count2)+106*ZZ(3)(count2)+71*ZZ(5)(c ount2)+25*ZZ(7)(count2);
temp1:=t1+t2;
temp2:=t1-t2;
Y0<=temp1(23 downto 16);
Y7<=temp2(23 downto 16);


t3:=91*ZZ(0)(count2)+49*ZZ(2)(count2)-91*ZZ(4)(count2)-118*ZZ(6)(count2);

t4:=106*ZZ(1)(count2)-25*ZZ(3)(count2)-126*ZZ(5)(count2)-71*ZZ(7)(count2);
temp3:=t3+t4;
temp4:=t3-t4;
Y1<=temp1(23 downto 16);
Y6<=temp2(23 downto 16);
Reply With Quote
  #2 (permalink)  
Old 09-14-2003, 08:46 PM
Jon
Guest
 
Posts: n/a
Default Re: shall I reuse a variable/signal or not?

Hi Walala,
There really is no hardware impact of reusing the variables but for
clarity and ease of debug keep them seperate.

Jon

[email protected] (walala) wrote in message news:<[email protected] com>...
> Dear all,
>
> Here is a fragment of my code... t1, t2, t3, t4, temp1, temp2, temp3,
> temp4 are my temporary variables... Y0, Y7, Y1, Y6 are the actual
> result I want to output...
>
> I want to know if I can re-use t1, t2 and temp1 and temp2, that's to
> say, don't use t3, t4, temp3 and temp4? What will be the impact of
> that change to my circuit?
>
> Less storage memory? Less adders?
>
> Can anybody tell me?
>
> Thanks a lot,
>
> -Walala
> ----------------------------------------------------------------------------
>
>
> t1:=91*ZZ(0)(count2)+118*ZZ(2)(count2)+91*ZZ(4)(co unt2)+49*ZZ(6)(count2);
>
> t2:=126*ZZ(1)(count2)+106*ZZ(3)(count2)+71*ZZ(5)(c ount2)+25*ZZ(7)(count2);
> temp1:=t1+t2;
> temp2:=t1-t2;
> Y0<=temp1(23 downto 16);
> Y7<=temp2(23 downto 16);
>
>
> t3:=91*ZZ(0)(count2)+49*ZZ(2)(count2)-91*ZZ(4)(count2)-118*ZZ(6)(count2);
>
> t4:=106*ZZ(1)(count2)-25*ZZ(3)(count2)-126*ZZ(5)(count2)-71*ZZ(7)(count2);
> temp3:=t3+t4;
> temp4:=t3-t4;
> Y1<=temp1(23 downto 16);
> Y6<=temp2(23 downto 16);

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable or signal is driven in more than one process or block nike Verilog 2 09-22-2008 05:22 PM
Variable or signal driven in more than one process or block nike Verilog 0 09-20-2008 03:08 PM
Re: Variable vs. Signal on indexing--verilog synthesis template Mike Treseler Verilog 0 02-11-2007 09:10 PM
difference of variable and signal YiQi FPGA 6 05-15-2006 03:22 PM
diffrence between signal, variable and wire, register mohammed rafi Verilog 3 05-07-2004 06:56 PM


All times are GMT +1. The time now is 12:00 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved