Thanks kaz. I agree on your approach on the register level. Not sure how this will work on dual port inferred memory tho. I have seen it work as long as the memory array has both its ports accessed within the same entity, but it seems to fail if I wire the array outside and access 2nd port from somewhere else. Maybe its just a minor bug that never got caught.
btw, off topic, it was interesting to see your profile pic. I was visiting your land and some oil fields late last year. It was an interesting and peaceful visit and I know there are lots of interesting politics going on there right now. The Kurds seems to do very well in contrast to surrounding areas. I wish you and your people good luck! :) (PS:I do have economical interest in the oil business there)