Added OMUX explicitly Signed-off-by: Maciej Kurc <mkurc@antmicro.com>
diff --git a/tests/test_v2x.py b/tests/test_v2x.py index bfefe66..34215d1 100644 --- a/tests/test_v2x.py +++ b/tests/test_v2x.py
@@ -53,17 +53,6 @@ name_mux='RMUX', name_inputs='I0,I1' ) - # Generate tests/vtr/lutff-pair/omux for tests/vtr/lutff-pair - mux_gen(outdir=os.path.join(testdir, 'vtr/lutff-pair/omux'), - outfilename='omux', - datatype='routing', - width=2, - split_inputs=True, - name_output='O', - name_mux='omux', - name_inputs='L,F' - ) - # Generate dff.pb_type.xml required by various tests newpbfile = os.path.join(testdir, 'vtr/dff/dff.pb_type.xml') pbtypeout = vlog_to_pbtype.vlog_to_pbtype(
diff --git a/tests/vtr/lutff-pair/omux/omux.model.xml b/tests/vtr/lutff-pair/omux/omux.model.xml new file mode 100644 index 0000000..ce22797 --- /dev/null +++ b/tests/vtr/lutff-pair/omux/omux.model.xml
@@ -0,0 +1 @@ +<models><!-- No models for routing elements.--></models> \ No newline at end of file
diff --git a/tests/vtr/lutff-pair/omux/omux.pb_type.xml b/tests/vtr/lutff-pair/omux/omux.pb_type.xml new file mode 100644 index 0000000..76a9987 --- /dev/null +++ b/tests/vtr/lutff-pair/omux/omux.pb_type.xml
@@ -0,0 +1,38 @@ +<pb_type name="omux" num_pb="1"> + <metadata> + <meta name="type">bel</meta> + <meta name="subtype">routing</meta> + </metadata> + <!-- + Generated with P + y + t + h + o + n + + f + u + n + c + t + i + o + n + --> + <input name="L" num_pins="1"/> + <input name="F" num_pins="1"/> + <output name="O" num_pins="1"/> + <interconnect> + <mux name="omux" input="omux.L omux.F" output="omux.O"> + <metadata> + <meta name="type">bel</meta> + <meta name="subtype">routing</meta> + <meta key="fasm_mux"> +omux.L = omux.L +omux.F = omux.F +</meta> + </metadata> + </mux> + </interconnect> +</pb_type>
diff --git a/tests/vtr/lutff-pair/omux/omux.sim.v b/tests/vtr/lutff-pair/omux/omux.sim.v new file mode 100644 index 0000000..54258b5 --- /dev/null +++ b/tests/vtr/lutff-pair/omux/omux.sim.v
@@ -0,0 +1,44 @@ +/* + * Copyright (C) 2020 The SymbiFlow Authors. + * + * Use of this source code is governed by a ISC-style + * license that can be found in the LICENSE file or at + * https://opensource.org/licenses/ISC + * + * SPDX-License-Identifier: ISC + */ + +/* + * Generated with v2x/mux_gen.py + */ + +`default_nettype none + + +(* CLASS="routing" *) +(* MODES="L; F" *) +(* whitebox *) +module OMUX(L, F, O); + + input wire L; + input wire F; + + parameter MODE = ""; + + output wire O; + + generate + if ( MODE == "L" ) + begin:SELECT_L + assign O = L; + end + else if ( MODE == "F" ) + begin:SELECT_F + assign O = F; + end + else + begin + //$error("omux: Invalid routing value %s (options are: L, F)", MODE); + end + endgenerate +endmodule