title: Error "does map to unexpanded memory" in yosys verilog when using indexed part select
body: <p>I'm having trouble understanding this error I'm getting in Yosys.</p>
  <p>I copied the relevant (I think) code below.</p>
  <pre><code>reg signed [15:0] wb1 [0:131071]; 
  reg  signed [27:0] currentAttrWB [0:4094];
  
  always @(posedge clk)
  currentAttrWB &lt;= wb1[attrWBoffset +: 4094];
  </code></pre>
  <p>ERROR (on last line): &quot;currentAttrWB does map to an unexpanded memory!&quot;</p>
  <p>What I'm trying to do is select a sub-range of 4095 16bit words in a long array of 131072 16bit words, using indexed part select (+:).  This range would be offset within the long array using attrWBoffset. But obviously there is something I am not understanding. At first I thought this was because currentAttrWB was not large enough to contain 4095 16bit words. But I still get the error when bumping its register up to 28bits.</p>
  <p>I guess I need to understand what is meant by expanded and unexpanded.</p>
  <p>Thanks for your help.</p>