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.

how to write it in vhdl?

Status
Not open for further replies.

sandy.vb

Newbie level 5
Joined
Mar 3, 2010
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Location
India
Activity points
1,339
hi
i've got his expression from verilog

a <= {(sig_width+1){'1'}} where sig_width is a parameter.

how do i write the same thing in vhdl?

thanx in advance.
 

Unlike verilog, vhdl is strongly typed, so you can't implicitly define the length of "a" by its assignment. Assuming signal "a" is a vector of defined width sig_width+1 in its declaration then

....
signal a : std_logic_vector(sig_width downto 0);
....
begin
....
a <= (others => '1');
....

"others" applies to all unspecified elements of a vector, so you can also play tricks like

a <= (0 => '0', 1 => '0', others => '1'); to make pattern "111...111100" etc.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top