diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-09-08 12:15:39 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-09-08 12:15:39 +0200 |
commit | d46bac330520f91ee5bf8027abe98a8f9389f696 (patch) | |
tree | d1b87a2409d082fa281d2c9ea100e94c69a43912 /passes/tests | |
parent | 1a88e47396305bd6b5ee2a7a91a1d014ebd37c10 (diff) | |
download | yosys-d46bac330520f91ee5bf8027abe98a8f9389f696.tar.gz yosys-d46bac330520f91ee5bf8027abe98a8f9389f696.tar.bz2 yosys-d46bac330520f91ee5bf8027abe98a8f9389f696.zip |
Added "$fa" cell type
Diffstat (limited to 'passes/tests')
-rw-r--r-- | passes/tests/test_cell.cc | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/passes/tests/test_cell.cc b/passes/tests/test_cell.cc index 310c3bdfe..72fb74d3a 100644 --- a/passes/tests/test_cell.cc +++ b/passes/tests/test_cell.cc @@ -39,6 +39,36 @@ static void create_gold_module(RTLIL::Design *design, RTLIL::IdString cell_type, RTLIL::Cell *cell = module->addCell("\\UUT", cell_type); RTLIL::Wire *wire; + if (cell_type == "$fa") + { + int width = 1 + xorshift32(8); + + wire = module->addWire("\\A"); + wire->width = width; + wire->port_input = true; + cell->setPort("\\A", wire); + + wire = module->addWire("\\B"); + wire->width = width; + wire->port_input = true; + cell->setPort("\\B", wire); + + wire = module->addWire("\\C"); + wire->width = width; + wire->port_input = true; + cell->setPort("\\C", wire); + + wire = module->addWire("\\X"); + wire->width = width; + wire->port_output = true; + cell->setPort("\\X", wire); + + wire = module->addWire("\\Y"); + wire->width = width; + wire->port_output = true; + cell->setPort("\\Y", wire); + } + if (cell_type == "$macc") { Macc macc; @@ -603,6 +633,7 @@ struct TestCellPass : public Pass { cell_types["$lut"] = "*"; cell_types["$alu"] = "ABSY"; cell_types["$macc"] = "*"; + cell_types["$fa"] = "*"; for (; argidx < SIZE(args); argidx++) { |