---
+ Post New Thread
Results 1 to 3 of 3
  1. #1
    Advanced Member level 3
    Points: 7,416, Level: 20
    checkmate's Avatar
    Join Date
    Feb 2004
    Location
    Toilet Seat
    Posts
    833
    Helped
    176 / 176
    Points
    7,416
    Level
    20

    verilog others equivalent

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

    •   Alt30th August 2005, 09:18

      advertising

        
       

  2. #2
    Advanced Member level 3
    Points: 9,200, Level: 22

    Join Date
    Jul 2004
    Posts
    891
    Helped
    168 / 168
    Points
    9,200
    Level
    22

    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!


    1 members found this post helpful.

    •   Alt30th August 2005, 09:44

      advertising

        
       

  3. #3
    Advanced Member level 4
    Points: 9,782, Level: 23

    Join Date
    Aug 2004
    Location
    Egypt
    Posts
    1,185
    Helped
    145 / 145
    Points
    9,782
    Level
    23

    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.


    1 members found this post helpful.

+ Post New Thread
Please login