Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Help Needed for VHDL expression Error

Status
Not open for further replies.

preet

Advanced Member level 4
Joined
Jan 10, 2005
Messages
112
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Activity points
900
signal cc_c : std_logic;

variable right_operand : word;
variable tmp_result : unsigned(word'length downto 0);

tmp_result := ('0' & GPR_r1) + ('0' & right_operand)+ resize(unsigned'('0' & cc_c), word'length + 1);

ERROR:HDLParsers:827: The above expression can not be qualified by type unsigned
ERROR:HDLParsers:3324: IN mode Formal NEW_SIZE of resize with no default value must be associated with an actual value.

Please guide me for the above error

Warm Regards
 

preet

Advanced Member level 4
Joined
Jan 10, 2005
Messages
112
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Activity points
900
subtype word is unsigned(31 downto 0);
 

sanju_

Full Member level 3
Joined
Mar 31, 2011
Messages
152
Helped
35
Reputation
70
Reaction score
33
Trophy points
1,318
Location
BANGALORE
Activity points
2,009
hi..
in resize(unsigned'('0' & cc_c)
cc_c is std_logic
tmp_result is unsigned
weather it matches both types??
well its my question.
 

TrickyDicky

Advanced Member level 5
Joined
Jun 7, 2010
Messages
7,025
Helped
2,058
Reputation
4,133
Reaction score
2,010
Trophy points
1,393
Activity points
38,605
sanju, that is not the problem. The unisnged' is a qualifier to tell the compiler it's an unsiged.

Preet - the 'length attribute is not defined for types. use right_operand'length instead.
 

childs

Member level 5
Joined
Apr 28, 2008
Messages
87
Helped
14
Reputation
28
Reaction score
11
Trophy points
1,288
Activity points
1,945
Am more interested on 2nd warning:
ERROR:HDLParsers:3324: IN mode Formal NEW_SIZE of resize with no default value must be associated with an actual value

Can you show the part you instantiate & declare "resize"? Thanks
 

preet

Advanced Member level 4
Joined
Jan 10, 2005
Messages
112
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Activity points
900
dear childs
both the error are pointing to same statement
 

FvM

Super Moderator
Staff member
Joined
Jan 22, 2008
Messages
47,470
Helped
14,044
Reputation
28,343
Reaction score
12,697
Trophy points
1,393
Location
Bochum, Germany
Activity points
276,070
Just an observation, the code compiles without errors in Altera Quartus, with IEEE.numeric_std.all imported for resize().
 

preet

Advanced Member level 4
Joined
Jan 10, 2005
Messages
112
Helped
7
Reputation
14
Reaction score
5
Trophy points
1,298
Activity points
900
Just an observation, the code compiles without errors in Altera Quartus, with IEEE.numeric_std.all imported for resize().

Dear FvM,

Will get back to you after synsthesizing thru Quartus

Thanks and Regards
Preet
 

Status
Not open for further replies.
Toggle Sidebar

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top