K
Khashishi
Guest
If I have a signals a and b, how can I make another signal c === a &
b.
I want to be able to assign c, and automatically update a and b.
In addition, I want to be able to assign a, and update c. I want them
to physically refer to the same signal. This is for convenience and
maintainability reasons.
I can't use assigment, because vhdl assignment operators are
directional, which makes no real physical sense to me.
So if I do
c <= a & b;
I can't assign c to update a & b, because then it would be multiple
drivers.
Verilog has a wire command which does what I want. I'm constrained to
vhdl.
Aliases don't have the full flexibility of signals in vhdl. I can't
seem to build an alias like this:
alias c(1) is b;
alias c(0) is a;
(You'll tell me, it's not allowed in VHDL. Well, I can't see any
reason why it shouldn't be allowed.)
I could do:
alias a is c(0);
alias b is c(1);
; however, this method won't allow me to set a as a port out variable
which I want to define in an upper level.
I think it might be possible to instantiate some component and route
a, b, c through the port mapping somehow, but this just seems tortuous
and contra my goal of convenience and maintainability.
Is VHDL inadequate to provide a solution to this? Or am I just missing
something?
b.
I want to be able to assign c, and automatically update a and b.
In addition, I want to be able to assign a, and update c. I want them
to physically refer to the same signal. This is for convenience and
maintainability reasons.
I can't use assigment, because vhdl assignment operators are
directional, which makes no real physical sense to me.
So if I do
c <= a & b;
I can't assign c to update a & b, because then it would be multiple
drivers.
Verilog has a wire command which does what I want. I'm constrained to
vhdl.
Aliases don't have the full flexibility of signals in vhdl. I can't
seem to build an alias like this:
alias c(1) is b;
alias c(0) is a;
(You'll tell me, it's not allowed in VHDL. Well, I can't see any
reason why it shouldn't be allowed.)
I could do:
alias a is c(0);
alias b is c(1);
; however, this method won't allow me to set a as a port out variable
which I want to define in an upper level.
I think it might be possible to instantiate some component and route
a, b, c through the port mapping somehow, but this just seems tortuous
and contra my goal of convenience and maintainability.
Is VHDL inadequate to provide a solution to this? Or am I just missing
something?