diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2DefaultFlowRuleTranslator.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2DefaultFlowRuleTranslator.java
new file mode 100644
index 0000000..1d93499
--- /dev/null
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2DefaultFlowRuleTranslator.java
@@ -0,0 +1,282 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.bmv2.translators;
+
+import com.google.common.annotations.Beta;
+import org.onlab.util.ImmutableByteSequence;
+import org.onosproject.bmv2.api.model.Bmv2Model;
+import org.onosproject.bmv2.api.model.Bmv2ModelField;
+import org.onosproject.bmv2.api.model.Bmv2ModelTable;
+import org.onosproject.bmv2.api.model.Bmv2ModelTableKey;
+import org.onosproject.bmv2.api.runtime.Bmv2Action;
+import org.onosproject.bmv2.api.runtime.Bmv2ExtensionSelector;
+import org.onosproject.bmv2.api.runtime.Bmv2ExtensionTreatment;
+import org.onosproject.bmv2.api.runtime.Bmv2LpmMatchParam;
+import org.onosproject.bmv2.api.runtime.Bmv2MatchKey;
+import org.onosproject.bmv2.api.runtime.Bmv2TableEntry;
+import org.onosproject.bmv2.api.runtime.Bmv2TernaryMatchParam;
+import org.onosproject.net.flow.FlowRule;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flow.TrafficTreatment;
+import org.onosproject.net.flow.criteria.Criterion;
+import org.onosproject.net.flow.criteria.EthCriterion;
+import org.onosproject.net.flow.criteria.EthTypeCriterion;
+import org.onosproject.net.flow.criteria.ExtensionCriterion;
+import org.onosproject.net.flow.criteria.ExtensionSelector;
+import org.onosproject.net.flow.criteria.ExtensionSelectorType.ExtensionSelectorTypes;
+import org.onosproject.net.flow.criteria.PortCriterion;
+import org.onosproject.net.flow.instructions.ExtensionTreatment;
+import org.onosproject.net.flow.instructions.ExtensionTreatmentType.ExtensionTreatmentTypes;
+import org.onosproject.net.flow.instructions.Instruction;
+import org.onosproject.net.flow.instructions.Instructions;
+import org.onosproject.net.flow.instructions.Instructions.ExtensionInstructionWrapper;
+
+/**
+ * Default Bmv2 flow rule translator implementation.
+ * <p>
+ * Flow rules are translated into {@link Bmv2TableEntry BMv2 table entries} according to the following logic:
+ * <ul>
+ * <li> table name: obtained from the Bmv2 model using the flow rule table ID;
+ * <li> match key: if the flow rule selector defines only a criterion of type {@link Criterion.Type#EXTENSION EXTENSION}
+ * , then the latter is expected to contain a {@link Bmv2ExtensionSelector Bmv2ExtensionSelector}, which should provide
+ * a match key already formatted for the given table; otherwise a match key is built using the
+ * {@link TranslatorConfig#fieldToCriterionTypeMap() mapping} defined by this translator configuration.
+ * <li> action: if the flow rule treatment contains only one instruction of type
+ * {@link Instruction.Type#EXTENSION EXTENSION}, then the latter is expected to contain a {@link Bmv2ExtensionTreatment}
+ * , which should provide a {@link Bmv2Action} already formatted for the given table; otherwise, an action is
+ * {@link TranslatorConfig#buildAction(TrafficTreatment) built} using this translator configuration.
+ * <li> priority: the same as the flow rule.
+ * <li> timeout: if the table supports timeout, use the same as the flow rule, otherwise none (i.e. permanent entry).
+ * </ul>
+ */
+@Beta
+public class Bmv2DefaultFlowRuleTranslator implements Bmv2FlowRuleTranslator {
+
+    // TODO: config is harcoded now, instead it should be selected based on device model
+    private final TranslatorConfig config = new Bmv2SimplePipelineTranslatorConfig();
+    private final Bmv2Model model = config.model();
+
+    private static Bmv2TernaryMatchParam buildTernaryParam(Bmv2ModelField field, Criterion criterion, int byteWidth)
+            throws Bmv2FlowRuleTranslatorException {
+
+        // Value and mask will be filled according to criterion type
+        ImmutableByteSequence value;
+        ImmutableByteSequence mask = null;
+
+        switch (criterion.type()) {
+            case IN_PORT:
+                // FIXME: allow port numbers of variable bit length (based on model), truncating when necessary
+                short port = (short) ((PortCriterion) criterion).port().toLong();
+                value = ImmutableByteSequence.copyFrom(port);
+                break;
+            case ETH_DST:
+                EthCriterion c = (EthCriterion) criterion;
+                value = ImmutableByteSequence.copyFrom(c.mac().toBytes());
+                if (c.mask() != null) {
+                    mask = ImmutableByteSequence.copyFrom(c.mask().toBytes());
+                }
+                break;
+            case ETH_SRC:
+                EthCriterion c2 = (EthCriterion) criterion;
+                value = ImmutableByteSequence.copyFrom(c2.mac().toBytes());
+                if (c2.mask() != null) {
+                    mask = ImmutableByteSequence.copyFrom(c2.mask().toBytes());
+                }
+                break;
+            case ETH_TYPE:
+                short ethType = ((EthTypeCriterion) criterion).ethType().toShort();
+                value = ImmutableByteSequence.copyFrom(ethType);
+                break;
+            // TODO: implement building for other criterion types (easy with DefaultCriterion of ONOS-4034)
+            default:
+                throw new Bmv2FlowRuleTranslatorException("Feature not implemented, ternary builder for criterion" +
+                                                                  "type: " + criterion.type().name());
+        }
+
+        if (mask == null) {
+            // no mask, all ones
+            mask = ImmutableByteSequence.ofOnes(byteWidth);
+        }
+
+        return new Bmv2TernaryMatchParam(value, mask);
+    }
+
+    private static Bmv2MatchKey getMatchKeyFromExtension(ExtensionCriterion criterion)
+            throws Bmv2FlowRuleTranslatorException {
+
+        ExtensionSelector extSelector = criterion.extensionSelector();
+
+        if (extSelector.type() == ExtensionSelectorTypes.P4_BMV2_MATCH_KEY.type()) {
+            if (extSelector instanceof Bmv2ExtensionSelector) {
+                return ((Bmv2ExtensionSelector) extSelector).matchKey();
+            } else {
+                throw new Bmv2FlowRuleTranslatorException("Unable to decode extension selector " + extSelector);
+            }
+        } else {
+            throw new Bmv2FlowRuleTranslatorException("Unsupported extension selector type " + extSelector.type());
+        }
+    }
+
+    private static Bmv2Action getActionFromExtension(Instructions.ExtensionInstructionWrapper inst)
+            throws Bmv2FlowRuleTranslatorException {
+
+        ExtensionTreatment extTreatment = inst.extensionInstruction();
+
+        if (extTreatment.type() == ExtensionTreatmentTypes.P4_BMV2_ACTION.type()) {
+            if (extTreatment instanceof Bmv2ExtensionTreatment) {
+                return ((Bmv2ExtensionTreatment) extTreatment).getAction();
+            } else {
+                throw new Bmv2FlowRuleTranslatorException("Unable to decode treatment extension: " + extTreatment);
+            }
+        } else {
+            throw new Bmv2FlowRuleTranslatorException("Unsupported treatment extension type: " + extTreatment.type());
+        }
+    }
+
+    private static Bmv2MatchKey buildMatchKey(TranslatorConfig config, TrafficSelector selector, Bmv2ModelTable table)
+            throws Bmv2FlowRuleTranslatorException {
+
+        Bmv2MatchKey.Builder matchKeyBuilder = Bmv2MatchKey.builder();
+
+        for (Bmv2ModelTableKey key : table.keys()) {
+
+            String fieldName = key.field().header().name() + "." + key.field().type().name();
+            int byteWidth = (int) Math.ceil((double) key.field().type().bitWidth() / 8.0);
+            Criterion.Type criterionType = config.fieldToCriterionTypeMap().get(fieldName);
+
+            if (criterionType == null || selector.getCriterion(criterionType) == null) {
+                // A mapping is not available or the selector doesn't have such a type
+                switch (key.matchType()) {
+                    case TERNARY:
+                        // Wildcard field
+                        matchKeyBuilder.withWildcard(byteWidth);
+                        break;
+                    case LPM:
+                        // LPM with prefix 0
+                        matchKeyBuilder.add(new Bmv2LpmMatchParam(ImmutableByteSequence.ofZeros(byteWidth), 0));
+                        break;
+                    default:
+                        throw new Bmv2FlowRuleTranslatorException("Match field not supported: " + fieldName);
+                }
+                // Next key
+                continue;
+            }
+
+            Criterion criterion = selector.getCriterion(criterionType);
+            Bmv2TernaryMatchParam matchParam = null;
+
+            switch (key.matchType()) {
+                case TERNARY:
+                    matchParam = buildTernaryParam(key.field(), criterion, byteWidth);
+                    break;
+                default:
+                    // TODO: implement other match param builders (exact, LPM, etc.)
+                    throw new Bmv2FlowRuleTranslatorException("Feature not implemented, match param builder: "
+                                                                      + key.matchType().name());
+            }
+
+            matchKeyBuilder.add(matchParam);
+        }
+
+        return matchKeyBuilder.build();
+    }
+
+    @Override
+    public Bmv2TableEntry translate(FlowRule rule)
+            throws Bmv2FlowRuleTranslatorException {
+
+        int tableId = rule.tableId();
+
+        Bmv2ModelTable table = model.table(tableId);
+
+        if (table == null) {
+            throw new Bmv2FlowRuleTranslatorException("Unknown table ID: " + tableId);
+        }
+
+        /* Translate selector */
+
+        TrafficSelector selector = rule.selector();
+        Bmv2MatchKey bmv2MatchKey = null;
+
+        // If selector has only 1 criterion of type extension, use that
+        Criterion criterion = selector.getCriterion(Criterion.Type.EXTENSION);
+        if (criterion != null) {
+            if (selector.criteria().size() == 1) {
+                bmv2MatchKey = getMatchKeyFromExtension((ExtensionCriterion) criterion);
+            } else {
+                throw new Bmv2FlowRuleTranslatorException("Unable to translate traffic selector, found multiple " +
+                                                                  "criteria of which one is an extension: " +
+                                                                  selector.toString());
+            }
+        }
+
+        if (bmv2MatchKey == null) {
+            // not an extension
+            bmv2MatchKey = buildMatchKey(config, selector, table);
+        }
+
+        /* Translate treatment */
+
+        TrafficTreatment treatment = rule.treatment();
+        Bmv2Action bmv2Action = null;
+
+        // If treatment has only 1 instruction of type extension, use that
+        for (Instruction inst : treatment.allInstructions()) {
+            if (inst.type() == Instruction.Type.EXTENSION) {
+                if (treatment.allInstructions().size() == 1) {
+                    bmv2Action = getActionFromExtension((ExtensionInstructionWrapper) inst);
+                } else {
+                    throw new Bmv2FlowRuleTranslatorException("Unable to translate traffic treatment, found multiple " +
+                                                                      "instructions of which one is an extension: " +
+                                                                      selector.toString());
+                }
+            }
+        }
+
+        if (bmv2Action == null) {
+            // No extension, use config to build action
+            bmv2Action = config.buildAction(treatment);
+        }
+
+        if (bmv2Action == null) {
+            // Config returned null
+            throw new Bmv2FlowRuleTranslatorException("Unable to translate treatment: " + treatment);
+        }
+
+        Bmv2TableEntry.Builder tableEntryBuilder = Bmv2TableEntry.builder();
+
+        tableEntryBuilder
+                .withTableName(table.name())
+                .withPriority(rule.priority())
+                .withMatchKey(bmv2MatchKey)
+                .withAction(bmv2Action);
+
+        if (!rule.isPermanent()) {
+            if (table.hasTimeouts()) {
+                tableEntryBuilder.withTimeout((double) rule.timeout());
+            }
+            //FIXME: add warn log or exception?
+        }
+
+        return tableEntryBuilder.build();
+    }
+
+    @Override
+    public TranslatorConfig config() {
+        return this.config;
+    }
+}
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2FlowRuleTranslator.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2FlowRuleTranslator.java
new file mode 100644
index 0000000..e81da0b
--- /dev/null
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2FlowRuleTranslator.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.bmv2.translators;
+
+import com.google.common.annotations.Beta;
+import org.onosproject.bmv2.api.model.Bmv2Model;
+import org.onosproject.bmv2.api.runtime.Bmv2Action;
+import org.onosproject.bmv2.api.runtime.Bmv2TableEntry;
+import org.onosproject.net.flow.FlowRule;
+import org.onosproject.net.flow.TrafficTreatment;
+import org.onosproject.net.flow.criteria.Criterion;
+
+import java.util.Map;
+
+/**
+ * Translator of ONOS flow rules to BMv2 table entries. Translation depends on a
+ * {@link TranslatorConfig translator configuration}.
+ */
+@Beta
+public interface Bmv2FlowRuleTranslator {
+
+    /**
+     * Returns a new BMv2 table entry equivalent to the given flow rule.
+     *
+     * @param rule a flow rule
+     * @return a BMv2 table entry
+     * @throws Bmv2FlowRuleTranslatorException if the flow rule cannot be
+     *                                         translated
+     */
+    Bmv2TableEntry translate(FlowRule rule) throws Bmv2FlowRuleTranslatorException;
+
+    /**
+     * Returns the configuration of this translator.
+     *
+     * @return a translator configuration
+     */
+    TranslatorConfig config();
+
+    /**
+     * BMv2 flow rules translator configuration. Such a configuration is used to
+     * generate table entries that are compatible with a given {@link Bmv2Model}.
+     */
+    @Beta
+    interface TranslatorConfig {
+        /**
+         * Return the {@link Bmv2Model} associated with this configuration.
+         *
+         * @return a BMv2 model
+         */
+        Bmv2Model model();
+
+        /**
+         * Returns a map describing a one-to-one relationship between BMv2
+         * header field names and ONOS criterion types. Header field names are
+         * formatted using the notation {@code header_name.field_name}
+         * representing a specific header field instance extracted by the BMv2
+         * parser (e.g. {@code ethernet.dstAddr}).
+         *
+         * @return a map where the keys represent BMv2 header field names and
+         * values are criterion types
+         */
+        Map<String, Criterion.Type> fieldToCriterionTypeMap();
+
+        /**
+         * Return a BMv2 action that is equivalent to the given ONOS traffic
+         * treatment.
+         *
+         * @param treatment a traffic treatment
+         * @return a BMv2 action object
+         * @throws Bmv2FlowRuleTranslatorException if the treatment cannot be
+         *                                         translated to a BMv2 action
+         */
+        Bmv2Action buildAction(TrafficTreatment treatment)
+                throws Bmv2FlowRuleTranslatorException;
+    }
+}
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2FlowRuleTranslatorException.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2FlowRuleTranslatorException.java
new file mode 100644
index 0000000..acc9377
--- /dev/null
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2FlowRuleTranslatorException.java
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.bmv2.translators;
+
+/**
+ * BMv2 flow rule translator exception.
+ */
+public class Bmv2FlowRuleTranslatorException extends Exception {
+
+    Bmv2FlowRuleTranslatorException(String msg) {
+        super(msg);
+    }
+}
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2SimplePipelineTranslatorConfig.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2SimplePipelineTranslatorConfig.java
new file mode 100644
index 0000000..13f27e6
--- /dev/null
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/Bmv2SimplePipelineTranslatorConfig.java
@@ -0,0 +1,139 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.bmv2.translators;
+
+import com.eclipsesource.json.Json;
+import com.eclipsesource.json.JsonObject;
+import com.google.common.annotations.Beta;
+import com.google.common.collect.Maps;
+import org.onlab.util.ImmutableByteSequence;
+import org.onosproject.bmv2.api.model.Bmv2Model;
+import org.onosproject.bmv2.api.runtime.Bmv2Action;
+import org.onosproject.net.flow.TrafficTreatment;
+import org.onosproject.net.flow.criteria.Criterion;
+import org.onosproject.net.flow.instructions.Instruction;
+import org.onosproject.net.flow.instructions.Instructions;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.Map;
+
+/**
+ * Implementation of a Bmv2 flow rule translator configuration for the
+ * simple_pipeline.p4 model.
+ */
+@Beta
+public class Bmv2SimplePipelineTranslatorConfig implements Bmv2FlowRuleTranslator.TranslatorConfig {
+
+    private static final String JSON_CONFIG_PATH = "/simple_pipeline.json";
+    private final Map<String, Criterion.Type> fieldMap = Maps.newHashMap();
+    private final Bmv2Model model;
+
+    /**
+     * Creates a new simple pipeline translator configuration.
+     */
+    public Bmv2SimplePipelineTranslatorConfig() {
+
+        this.model = getModel();
+
+        // populate fieldMap
+        fieldMap.put("standard_metadata.ingress_port", Criterion.Type.IN_PORT);
+        fieldMap.put("ethernet.dstAddr", Criterion.Type.ETH_DST);
+        fieldMap.put("ethernet.srcAddr", Criterion.Type.ETH_SRC);
+        fieldMap.put("ethernet.etherType", Criterion.Type.ETH_TYPE);
+    }
+
+    private static Bmv2Action buildDropAction() {
+        return Bmv2Action.builder()
+                .withName("_drop")
+                .build();
+    }
+
+    private static Bmv2Action buildFwdAction(Instructions.OutputInstruction inst)
+            throws Bmv2FlowRuleTranslatorException {
+
+        Bmv2Action.Builder actionBuilder = Bmv2Action.builder();
+
+        actionBuilder.withName("fwd");
+
+        if (inst.port().isLogical()) {
+            throw new Bmv2FlowRuleTranslatorException(
+                    "Output logic port numbers not supported: " + inst);
+        }
+
+        actionBuilder.addParameter(
+                ImmutableByteSequence.copyFrom((short) inst.port().toLong()));
+
+        return actionBuilder.build();
+    }
+
+    private static Bmv2Model getModel() {
+        InputStream inputStream = Bmv2SimplePipelineTranslatorConfig.class
+                .getResourceAsStream(JSON_CONFIG_PATH);
+        InputStreamReader reader = new InputStreamReader(inputStream);
+        BufferedReader bufReader = new BufferedReader(reader);
+        JsonObject json = null;
+        try {
+            json = Json.parse(bufReader).asObject();
+        } catch (IOException e) {
+            throw new RuntimeException("Unable to parse JSON file: " + e.getMessage());
+        }
+
+        return Bmv2Model.parse(json);
+    }
+
+    @Override
+    public Bmv2Model model() {
+        return this.model;
+    }
+
+    @Override
+    public Map<String, Criterion.Type> fieldToCriterionTypeMap() {
+        return fieldMap;
+    }
+
+    @Override
+    public Bmv2Action buildAction(TrafficTreatment treatment)
+            throws Bmv2FlowRuleTranslatorException {
+
+
+        if (treatment.allInstructions().size() == 0) {
+            // no instructions means drop
+            return buildDropAction();
+        } else if (treatment.allInstructions().size() > 1) {
+            // otherwise, we understand treatments with only 1 instruction
+            throw new Bmv2FlowRuleTranslatorException(
+                    "Treatment not supported, more than 1 instructions found: "
+                            + treatment.toString());
+        }
+
+        Instruction instruction = treatment.allInstructions().get(0);
+
+        switch (instruction.type()) {
+            case OUTPUT:
+                return buildFwdAction((Instructions.OutputInstruction) instruction);
+            case NOACTION:
+                return buildDropAction();
+            default:
+                throw new Bmv2FlowRuleTranslatorException(
+                        "Instruction type not supported: "
+                                + instruction.type().name());
+        }
+    }
+}
diff --git a/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/package-info.java b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/package-info.java
new file mode 100644
index 0000000..97963f0
--- /dev/null
+++ b/drivers/bmv2/src/main/java/org/onosproject/drivers/bmv2/translators/package-info.java
@@ -0,0 +1,20 @@
+/*
+ * Copyright 2016-present Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * Translators of ONOS abstractions to BMv2 model-dependent abstractions.
+ */
+package org.onosproject.drivers.bmv2.translators;
\ No newline at end of file
diff --git a/drivers/bmv2/src/main/resources/simple_pipeline.json b/drivers/bmv2/src/main/resources/simple_pipeline.json
new file mode 100644
index 0000000..372bdcd
--- /dev/null
+++ b/drivers/bmv2/src/main/resources/simple_pipeline.json
@@ -0,0 +1,505 @@
+{
+  "header_types": [
+    {
+      "name": "standard_metadata_t",
+      "id": 0,
+      "fields": [
+        [
+          "ingress_port",
+          9
+        ],
+        [
+          "packet_length",
+          32
+        ],
+        [
+          "egress_spec",
+          9
+        ],
+        [
+          "egress_port",
+          9
+        ],
+        [
+          "egress_instance",
+          32
+        ],
+        [
+          "instance_type",
+          32
+        ],
+        [
+          "clone_spec",
+          32
+        ],
+        [
+          "_padding",
+          5
+        ]
+      ],
+      "length_exp": null,
+      "max_length": null
+    },
+    {
+      "name": "ethernet_t",
+      "id": 1,
+      "fields": [
+        [
+          "dstAddr",
+          48
+        ],
+        [
+          "srcAddr",
+          48
+        ],
+        [
+          "etherType",
+          16
+        ]
+      ],
+      "length_exp": null,
+      "max_length": null
+    },
+    {
+      "name": "intrinsic_metadata_t",
+      "id": 2,
+      "fields": [
+        [
+          "ingress_global_timestamp",
+          32
+        ],
+        [
+          "lf_field_list",
+          32
+        ],
+        [
+          "mcast_grp",
+          16
+        ],
+        [
+          "egress_rid",
+          16
+        ]
+      ],
+      "length_exp": null,
+      "max_length": null
+    },
+    {
+      "name": "cpu_header_t",
+      "id": 3,
+      "fields": [
+        [
+          "device",
+          8
+        ],
+        [
+          "reason",
+          8
+        ]
+      ],
+      "length_exp": null,
+      "max_length": null
+    }
+  ],
+  "headers": [
+    {
+      "name": "standard_metadata",
+      "id": 0,
+      "header_type": "standard_metadata_t",
+      "metadata": true
+    },
+    {
+      "name": "ethernet",
+      "id": 1,
+      "header_type": "ethernet_t",
+      "metadata": false
+    },
+    {
+      "name": "intrinsic_metadata",
+      "id": 2,
+      "header_type": "intrinsic_metadata_t",
+      "metadata": true
+    },
+    {
+      "name": "cpu_header",
+      "id": 3,
+      "header_type": "cpu_header_t",
+      "metadata": false
+    }
+  ],
+  "header_stacks": [],
+  "parsers": [
+    {
+      "name": "parser",
+      "id": 0,
+      "init_state": "start",
+      "parse_states": [
+        {
+          "name": "start",
+          "id": 0,
+          "parser_ops": [],
+          "transition_key": [
+            {
+              "type": "lookahead",
+              "value": [
+                0,
+                64
+              ]
+            }
+          ],
+          "transitions": [
+            {
+              "value": "0x0000000000000000",
+              "mask": null,
+              "next_state": "parse_cpu_header"
+            },
+            {
+              "value": "default",
+              "mask": null,
+              "next_state": "parse_ethernet"
+            }
+          ]
+        },
+        {
+          "name": "parse_cpu_header",
+          "id": 1,
+          "parser_ops": [
+            {
+              "op": "extract",
+              "parameters": [
+                {
+                  "type": "regular",
+                  "value": "cpu_header"
+                }
+              ]
+            }
+          ],
+          "transition_key": [],
+          "transitions": [
+            {
+              "value": "default",
+              "mask": null,
+              "next_state": "parse_ethernet"
+            }
+          ]
+        },
+        {
+          "name": "parse_ethernet",
+          "id": 2,
+          "parser_ops": [
+            {
+              "op": "extract",
+              "parameters": [
+                {
+                  "type": "regular",
+                  "value": "ethernet"
+                }
+              ]
+            }
+          ],
+          "transition_key": [],
+          "transitions": [
+            {
+              "value": "default",
+              "mask": null,
+              "next_state": null
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "deparsers": [
+    {
+      "name": "deparser",
+      "id": 0,
+      "order": [
+        "cpu_header",
+        "ethernet"
+      ]
+    }
+  ],
+  "meter_arrays": [],
+  "actions": [
+    {
+      "name": "flood",
+      "id": 0,
+      "runtime_data": [],
+      "primitives": [
+        {
+          "op": "modify_field",
+          "parameters": [
+            {
+              "type": "field",
+              "value": [
+                "intrinsic_metadata",
+                "mcast_grp"
+              ]
+            },
+            {
+              "type": "field",
+              "value": [
+                "standard_metadata",
+                "ingress_port"
+              ]
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "_drop",
+      "id": 1,
+      "runtime_data": [],
+      "primitives": [
+        {
+          "op": "modify_field",
+          "parameters": [
+            {
+              "type": "field",
+              "value": [
+                "standard_metadata",
+                "egress_spec"
+              ]
+            },
+            {
+              "type": "hexstr",
+              "value": "0x1ff"
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "fwd",
+      "id": 2,
+      "runtime_data": [
+        {
+          "name": "port",
+          "bitwidth": 9
+        }
+      ],
+      "primitives": [
+        {
+          "op": "modify_field",
+          "parameters": [
+            {
+              "type": "field",
+              "value": [
+                "standard_metadata",
+                "egress_spec"
+              ]
+            },
+            {
+              "type": "runtime_data",
+              "value": 0
+            }
+          ]
+        }
+      ]
+    },
+    {
+      "name": "send_to_cpu",
+      "id": 3,
+      "runtime_data": [
+        {
+          "name": "device",
+          "bitwidth": 8
+        },
+        {
+          "name": "reason",
+          "bitwidth": 8
+        }
+      ],
+      "primitives": [
+        {
+          "op": "add_header",
+          "parameters": [
+            {
+              "type": "header",
+              "value": "cpu_header"
+            }
+          ]
+        },
+        {
+          "op": "modify_field",
+          "parameters": [
+            {
+              "type": "field",
+              "value": [
+                "cpu_header",
+                "device"
+              ]
+            },
+            {
+              "type": "runtime_data",
+              "value": 0
+            }
+          ]
+        },
+        {
+          "op": "modify_field",
+          "parameters": [
+            {
+              "type": "field",
+              "value": [
+                "cpu_header",
+                "reason"
+              ]
+            },
+            {
+              "type": "runtime_data",
+              "value": 1
+            }
+          ]
+        },
+        {
+          "op": "modify_field",
+          "parameters": [
+            {
+              "type": "field",
+              "value": [
+                "standard_metadata",
+                "egress_spec"
+              ]
+            },
+            {
+              "type": "hexstr",
+              "value": "0xfa"
+            }
+          ]
+        }
+      ]
+    }
+  ],
+  "pipelines": [
+    {
+      "name": "ingress",
+      "id": 0,
+      "init_table": "table0",
+      "tables": [
+        {
+          "name": "table0",
+          "id": 0,
+          "match_type": "ternary",
+          "type": "simple",
+          "max_size": 16384,
+          "with_counters": false,
+          "direct_meters": null,
+          "support_timeout": false,
+          "key": [
+            {
+              "match_type": "ternary",
+              "target": [
+                "standard_metadata",
+                "ingress_port"
+              ],
+              "mask": null
+            },
+            {
+              "match_type": "ternary",
+              "target": [
+                "ethernet",
+                "dstAddr"
+              ],
+              "mask": null
+            },
+            {
+              "match_type": "ternary",
+              "target": [
+                "ethernet",
+                "srcAddr"
+              ],
+              "mask": null
+            },
+            {
+              "match_type": "ternary",
+              "target": [
+                "ethernet",
+                "etherType"
+              ],
+              "mask": null
+            }
+          ],
+          "actions": [
+            "fwd",
+            "flood",
+            "send_to_cpu",
+            "_drop"
+          ],
+          "next_tables": {
+            "fwd": null,
+            "flood": null,
+            "send_to_cpu": null,
+            "_drop": null
+          },
+          "default_action": null
+        }
+      ],
+      "conditionals": []
+    },
+    {
+      "name": "egress",
+      "id": 1,
+      "init_table": null,
+      "tables": [],
+      "conditionals": []
+    }
+  ],
+  "calculations": [],
+  "checksums": [],
+  "learn_lists": [],
+  "field_lists": [],
+  "counter_arrays": [],
+  "register_arrays": [],
+  "force_arith": [
+    [
+      "standard_metadata",
+      "ingress_port"
+    ],
+    [
+      "standard_metadata",
+      "packet_length"
+    ],
+    [
+      "standard_metadata",
+      "egress_spec"
+    ],
+    [
+      "standard_metadata",
+      "egress_port"
+    ],
+    [
+      "standard_metadata",
+      "egress_instance"
+    ],
+    [
+      "standard_metadata",
+      "instance_type"
+    ],
+    [
+      "standard_metadata",
+      "clone_spec"
+    ],
+    [
+      "standard_metadata",
+      "_padding"
+    ],
+    [
+      "intrinsic_metadata",
+      "ingress_global_timestamp"
+    ],
+    [
+      "intrinsic_metadata",
+      "lf_field_list"
+    ],
+    [
+      "intrinsic_metadata",
+      "mcast_grp"
+    ],
+    [
+      "intrinsic_metadata",
+      "egress_rid"
+    ]
+  ]
+}
\ No newline at end of file
diff --git a/drivers/bmv2/src/test/java/org/onosproject/drivers/bmv2/Bmv2DefaultFlowRuleTranslatorTest.java b/drivers/bmv2/src/test/java/org/onosproject/drivers/bmv2/Bmv2DefaultFlowRuleTranslatorTest.java
new file mode 100644
index 0000000..7b1b215
--- /dev/null
+++ b/drivers/bmv2/src/test/java/org/onosproject/drivers/bmv2/Bmv2DefaultFlowRuleTranslatorTest.java
@@ -0,0 +1,137 @@
+/*
+ * Copyright 2014-2016 Open Networking Laboratory
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.onosproject.drivers.bmv2;
+
+import com.google.common.testing.EqualsTester;
+import org.junit.Test;
+import org.onlab.packet.MacAddress;
+import org.onosproject.bmv2.api.model.Bmv2Model;
+import org.onosproject.bmv2.api.runtime.Bmv2TableEntry;
+import org.onosproject.bmv2.api.runtime.Bmv2TernaryMatchParam;
+import org.onosproject.core.ApplicationId;
+import org.onosproject.core.DefaultApplicationId;
+import org.onosproject.drivers.bmv2.translators.Bmv2DefaultFlowRuleTranslator;
+import org.onosproject.drivers.bmv2.translators.Bmv2FlowRuleTranslator;
+import org.onosproject.net.DeviceId;
+import org.onosproject.net.PortNumber;
+import org.onosproject.net.flow.DefaultFlowRule;
+import org.onosproject.net.flow.DefaultTrafficSelector;
+import org.onosproject.net.flow.DefaultTrafficTreatment;
+import org.onosproject.net.flow.FlowRule;
+import org.onosproject.net.flow.TrafficSelector;
+import org.onosproject.net.flow.TrafficTreatment;
+
+import java.util.Random;
+
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+/**
+ * Tests for {@link Bmv2DefaultFlowRuleTranslator}.
+ */
+public class Bmv2DefaultFlowRuleTranslatorTest {
+
+    private Random random = new Random();
+    private Bmv2FlowRuleTranslator translator = new Bmv2DefaultFlowRuleTranslator();
+    private Bmv2Model model = translator.config().model();
+
+
+    @Test
+    public void testCompiler() throws Exception {
+
+        DeviceId deviceId = DeviceId.NONE;
+        ApplicationId appId = new DefaultApplicationId(1, "test");
+        int tableId = 0;
+        MacAddress ethDstMac = MacAddress.valueOf(random.nextLong());
+        MacAddress ethSrcMac = MacAddress.valueOf(random.nextLong());
+        short ethType = (short) (0x0000FFFF & random.nextInt());
+        short outPort = (short) random.nextInt(65);
+        short inPort = (short) random.nextInt(65);
+        int timeout = random.nextInt(100);
+        int priority = random.nextInt(100);
+
+        TrafficSelector matchInPort1 = DefaultTrafficSelector
+                .builder()
+                .matchInPort(PortNumber.portNumber(inPort))
+                .matchEthDst(ethDstMac)
+                .matchEthSrc(ethSrcMac)
+                .matchEthType(ethType)
+                .build();
+
+        TrafficTreatment outPort2 = DefaultTrafficTreatment
+                .builder()
+                .setOutput(PortNumber.portNumber(outPort))
+                .build();
+
+        FlowRule rule1 = DefaultFlowRule.builder()
+                .forDevice(deviceId)
+                .forTable(tableId)
+                .fromApp(appId)
+                .withSelector(matchInPort1)
+                .withTreatment(outPort2)
+                .makeTemporary(timeout)
+                .withPriority(priority)
+                .build();
+
+        FlowRule rule2 = DefaultFlowRule.builder()
+                .forDevice(deviceId)
+                .forTable(tableId)
+                .fromApp(appId)
+                .withSelector(matchInPort1)
+                .withTreatment(outPort2)
+                .makeTemporary(timeout)
+                .withPriority(priority)
+                .build();
+
+        Bmv2TableEntry entry1 = translator.translate(rule1);
+        Bmv2TableEntry entry2 = translator.translate(rule1);
+
+        // check equality, i.e. same rules must produce same entries
+        new EqualsTester()
+                .addEqualityGroup(rule1, rule2)
+                .addEqualityGroup(entry1, entry2)
+                .testEquals();
+
+        int numMatchParams = model.table(0).keys().size();
+        // parse values stored in entry1
+        Bmv2TernaryMatchParam inPortParam = (Bmv2TernaryMatchParam) entry1.matchKey().matchParams().get(0);
+        Bmv2TernaryMatchParam ethDstParam = (Bmv2TernaryMatchParam) entry1.matchKey().matchParams().get(1);
+        Bmv2TernaryMatchParam ethSrcParam = (Bmv2TernaryMatchParam) entry1.matchKey().matchParams().get(2);
+        Bmv2TernaryMatchParam ethTypeParam = (Bmv2TernaryMatchParam) entry1.matchKey().matchParams().get(3);
+        double expectedTimeout = (double) (model.table(0).hasTimeouts() ? rule1.timeout() : -1);
+
+        // check that the number of parameters in the entry is the same as the number of table keys
+        assertThat("Incorrect number of match parameters",
+                   entry1.matchKey().matchParams().size(), is(equalTo(numMatchParams)));
+
+        // check that values stored in entry are the same used for the flow rule
+        assertThat("Incorrect inPort match param value",
+                   inPortParam.value().asReadOnlyBuffer().getShort(), is(equalTo(inPort)));
+        assertThat("Incorrect ethDestMac match param value",
+                   ethDstParam.value().asArray(), is(equalTo(ethDstMac.toBytes())));
+        assertThat("Incorrect ethSrcMac match param value",
+                   ethSrcParam.value().asArray(), is(equalTo(ethSrcMac.toBytes())));
+        assertThat("Incorrect ethType match param value",
+                   ethTypeParam.value().asReadOnlyBuffer().getShort(), is(equalTo(ethType)));
+        assertThat("Incorrect priority value",
+                   entry1.priority(), is(equalTo(rule1.priority())));
+        assertThat("Incorrect timeout value",
+                   entry1.timeout(), is(equalTo(expectedTimeout)));
+
+    }
+}
\ No newline at end of file
