# Replication in assignment pattern not working on queue of structure

**URL:** <https://verificationacademy.com/forums/t/replication-in-assignment-pattern-not-working-on-queue-of-structure/34558>\
**Category:** SystemVerilog\
**Tags:** SystemVerilog, Queues\
**Created:** [June 10, 2018, 8:04pm UTC](https://verificationacademy.com/forums/t/replication-in-assignment-pattern-not-working-on-queue-of-structure/34558 "2018-06-10T20:04:35Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![sharvil111](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/sharvil111/32/3790_2.png) [@sharvil111](https://verificationacademy.com/forums/u/sharvil111)\
**Post date:** [June 11, 2018, 3:45am UTC](https://verificationacademy.com/forums/t/replication-in-assignment-pattern-not-working-on-queue-of-structure/34558/4 "2018-06-11T03:45:58Z")

</div>

_In reply to [rishikpillai90](https://verificationacademy.com/forums/t/replication-in-assignment-pattern-not-working-on-queue-of-structure/34558/3):_

Can you show your code somewhat more accurately? The above one works fine for me. I guess there might be some package import/scope resolution issue. The below code works fine for me with the use of package.

```verilog
package mypkg;
  typedef enum {H_ENUM,A_ENUM} A;
  typedef enum {I_ENUM,B_ENUM} B;
  typedef enum {J_ENUM,C_ENUM} C;
  typedef enum {K_ENUM,D_ENUM} D;
 
  typedef struct {
 A a;
 B b;
 C c;
 D d;
} lp_s; //A,B,C,D : integer enums
 
lp_s vari[$] = '{ //No difference in result even with unpacked array concatenation
 '{a:A_ENUM, b: B_ENUM, default:0}
};
endpackage

module top();
  import mypkg::*;
  initial begin
    #1;
    $display("%0p",mypkg::vari);
  end
endmodule

```

---

_[View the full topic](https://verificationacademy.com/forums/t/replication-in-assignment-pattern-not-working-on-queue-of-structure/34558)._
