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.

Verilog equivalent of others

Status
Not open for further replies.

checkmate

Advanced Member level 3
Joined
Feb 25, 2004
Messages
832
Helped
178
Reputation
356
Reaction score
125
Trophy points
1,323
Location
Toilet Seat
Activity points
7,811
verilog others equivalent

Is there a verilog equivalent of the following vhdl code?
Code:
A <= (others => 'z')
 

verilog equivalent of others

Here is the equivalent code in verilog

Code:
`define SIZE_OF_A 64

A <= {`SIZE_OF_A {1'bz}};

if  SIZE_OF_A is less than or equal to 32 you can
directly write

A <= 'bz;

Hope this helps!
 

    checkmate

    Points: 2
    Helpful Answer Positive Rating
verilog others equivalent

`define SIZE_OF_A 64

A <= {`SIZE_OF_A {1'bz}};

if SIZE_OF_A is less than or equal to 32 you can
directly write

A <= 'bz;
Here is a simpler code:
Code:
A <= 'b Z //verilog automatically extends the RHS to the LHS size.

New verilog standards supports extension to 64 bits.

Regards,
Amr.
 

    checkmate

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top