Go Back   Velocity Reviews > Newsgroups > VHDL
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

VHDL - problem in my code

 
Thread Tools Search this Thread
Old 06-30-2005, 09:17 AM   #1
Default problem in my code


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, please give some hints . that are useful for my design.





srinukasam
  Reply With Quote
Old 06-30-2005, 08:28 PM   #2
Andy Peters
 
Posts: n/a
Default Re: problem in my code
srinukasam wrote:
> 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.


Rather than asking the group to decipher your code and determine if it
will work, did you bother to write a test bench and run a simulation?

-a



Andy Peters
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
need code problem gaurav_kant Software 0 09-29-2007 01:31 PM
Problem in building code with Solaris 9 and g++ compiler dileepd Software 0 07-18-2007 03:05 PM
Problem in VHDL code. caylakprogramci Hardware 2 05-07-2007 07:30 PM
problem with code for random number generation sandeep_sp7 Hardware 0 04-12-2007 04:59 PM
Re: Serious Computer Problem hootnholler A+ Certification 1 11-24-2003 12:18 PM




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

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