In reply to peterjin:
Cannot help you with an unsupported error, but your code would not work they way you want to anyways. A force sets up a continuous assignment from RHS to LHS, and the LHS cannot contain non-constant part selects. The LRM does not allow part selects to variables, But most tools allow it. Also, if you put this class in a package, you are not allowed to have hierarchical references to your DUT.
What I suggest you do is put the force into an interface that you bind inside your module mem_model. Then you can use a generate-for loop to create individual force statements.
interface insert_force;
bit enable;
for (genvar index=0;index<2048;index++)
always @(enable)
if (enable)
force mem[index][1:0] = 0;
else
release mem[index][1:0];
endinterface