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.

generate signal assignment in vhdl

Status
Not open for further replies.

ali.329

Newbie level 2
Joined
Nov 4, 2016
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
20
I have a question. I want to use generate to signal assignment. but simulator takes me an error. the error is :
" Illegal target for signal assignment."
and
"Unknown identifier A0_i."
also i don't permit to change signal name.


Code VHDL - [expand]
1
2
3
4
5
6
7
8
9
10
11
architecure sss of fff is
signal A0_0 : bit ;
signal A0_1 : bit ;
signal A0_2 : bit ;
signal A0_3 : bit ;
 
begin
      U0 : for i in 0 to 3 generate
      U1 : A0_i <= a(i) and b(i) ;
      end generate;
end sss;



thanks.
 
Last edited by a moderator:

why wouldn't you make an array and use i to index? if you absolutely need all 4 A0 signals, you can make a temp array, work on it, and then feed the original signals.
 
Generate can access array elements but doesn't perform text manipulations of signal names. Need to define a bit_vector port signal.
 
Thanks a lot.
So there isn't any way to solve this problem with these signals name?
I must define array.
 

Thanks a lot.
So there isn't any way to solve this problem with these signals name?
I must define array.

You have already been told it's not possible, why does it need repeating?

VHDL is not a string manipulation language, and signal names are not strings that you can perform text manipulation on to construct new signal names. You can perhaps do this in some programing languages, but VHDL is less than a crummy programming language.
 

You can do it with a 3rd party pre-processor that generates a new file from a template. At one point I had one that let me embed python code in a VHDL/Verilog file for the purpose of code generation.
 
You can do it with a 3rd party pre-processor that generates a new file from a template. At one point I had one that let me embed python code in a VHDL/Verilog file for the purpose of code generation.
Yes, you can do that. But I presume the thread topic is learning valid VHDL syntax rather than using a non-portable method to solve a trivial coding problem.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top