Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics 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.

what causes this error?

Status
Not open for further replies.

shaiko

Advanced Member level 5
Joined
Aug 20, 2011
Messages
2,644
Helped
303
Reputation
608
Reaction score
297
Trophy points
1,363
Activity points
18,302
Code:
signal x : std_logic_vector ( 31 downto 0 ) ;
signal y : std_logic_vector ( 31 downto 0 ) ;
signal nibble: std_logic_vector ( 2 downto 0 ) ;

nibble <= x ( 30 downto 28 ) ;
y <= ( 30 downto 28 => nibble  , others => 'Z' ) ; -- compilation fails on this line
The above code fails compilation with the following error:
"Expression does not match type std_ulogic"

Why?
 

Vectors aggregate is only possible in vhdl 2008. In ealier versions u can aggregate only bits.

so
Code:
 y <= ( 30 => nibble(2)  , 29 => nibble(1), 28 => nibble(0), others => 'Z' ) ;
 
or instead write:

y(30 downto 28) <= nibble;
y(31) <= 'Z';
y(27 downto 0) <= (others => 'Z');
 
  • Like
Reactions: shaiko

    shaiko

    Points: 2
    Helpful Answer Positive Rating
By the way is there any free vhdl enviroment that support vhdl 2008 with PSL commands ?. I know about AHDL and Questa but both are quite expensive
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top