added swap types to common
added hw R/W/ memory functions