Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > VHDL > code error

Reply
Thread Tools

code error

 
 
srinukasam
Guest
Posts: n/a
 
      06-29-2005
hello
iam writing a code for comparing the array with input vector parallely.
could you please see once . is this code will work ( i mean it work for my
above mentioned requirement or not). and the function iam using in my code
is described in package.

ENTITY nest_addr IS
generic(pstate_width:integer :=8;
mem_width:integer:=128; --out from mem..in to logic
no_of_ns: integer:=16; --for array size .this block
index: integer :=4);
port( clk :in std_logic;
diff_states: in std_logic_vector(mem_width-1 downto 0 );
pstate: in std_logic_vector(pstate_width-1 downto 0);
data ut std_logic_vector(index-1 downto 0));
--
ARCHITECTURE nest_addr_beh OF nest_addr IS
type temp is array ( o to no_of_ns-1) of std_logic_vector(0 to
pstate_width-1);
signal temp_c:temp;
signal temp_vect :std_logic_vector (no_of_ns-1 downto 0);
signal data_temp:integer:=0;
begin

assignrocess(clk)
variable first:integer:=1;
variable second:integer:=0;
begin
for i in 0 to no_of_ns loop
if i =0 then
temp_c(i)<=diff_states(0 to pstate_width-1);
else
first:=first+pstate_width;
second:=first+(pstate_width-1);
temp_c(i)<= diff_states(first to second);
end if;
end loop;
end process assign;


ns:for i in 0 to no_of_ns-1 generate
if temp_c(i)= pstate then --here its showing error
data_temp<=i;
end if;
end generate ns;
conv: process(data_temp)
begin
data<=int_to_vect(4,data_temp);
end process;

end ARCHITECTURE nest_addr_beh;

thank you


 
Reply With Quote
 
 
 
 
ALuPin@web.de
Guest
Posts: n/a
 
      06-30-2005
Hi,

>if temp_c(i)= pstate then


temp_c(i) is defined as std_logic_vector(0 to ...) whereas pstate
is defined as (7 downto 0)

downto <--> to

See the difference ?

Rgds
André

 
Reply With Quote
 
 
 
 
Klaus Falser
Guest
Posts: n/a
 
      06-30-2005
In article
<(E-Mail Removed) outprogramming.com>,
http://www.velocityreviews.com/forums/(E-Mail Removed) says...
> hello
> iam writing a code for comparing the array with input vector parallely.
> could you please see once . is this code will work ( i mean it work for my
> above mentioned requirement or not). and the function iam using in my code
> is described in package.
>


....
You should download a free simulator (VHDL Simili for example).

This way you can check yourself if your design does what you want.

Best regards
Klaus Falser

 
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
what is the difference between code inside a <script> tag and code in the code-behind file? keithb ASP .Net 1 03-29-2006 01:00 AM
A tool returned an error code from "Performing registration" error Wes Stebbins ASP .Net 1 07-15-2005 08:05 PM
Fire Code behind code AND Javascript code associated to a Button Click Event =?Utf-8?B?Q2FybG8gTWFyY2hlc29uaQ==?= ASP .Net 4 02-11-2004 07:31 AM
Compiler Error Message: The compiler failed with error code 128. Yan ASP .Net 0 07-21-2003 10:49 PM
Re: Code Behind vs. no code behind: error Ben Miller [msft] ASP .Net 1 06-28-2003 01:46 AM



Advertisments