Hardware implementation work.

Signed-off-by: Pavlo Manovi <pavlo.manovi@gmail.com>