Bladeren bron

Remove EspressoFormatter

Fabio Battaglia 5 jaren geleden
bovenliggende
commit
58cb0e0f06

+ 0 - 281
src/main/java/info/hkzlab/dupal/analyzer/palanalisys/formatter/EspressoFormatter.java

@@ -1,281 +0,0 @@
-package info.hkzlab.dupal.analyzer.palanalisys.formatter;
-
-import java.util.ArrayList;
-import java.util.HashSet;
-import java.util.Set;
-
-import info.hkzlab.dupal.analyzer.devices.PALSpecs;
-import info.hkzlab.dupal.analyzer.palanalisys.graph.OutLink;
-import info.hkzlab.dupal.analyzer.palanalisys.graph.OutState;
-import info.hkzlab.dupal.analyzer.palanalisys.graph.RegLink;
-import info.hkzlab.dupal.analyzer.palanalisys.simple.SimpleState;
-import info.hkzlab.dupal.analyzer.utilities.BitUtils;
-
-public class EspressoFormatter {
-    private EspressoFormatter() {};
-
-    public static String formatEspressoTableHeader(PALSpecs pSpecs, int ioAsOutMask) {
-        StringBuffer strBuf = new StringBuffer();
-        int ioAsOut_W = BitUtils.scatterBitField(BitUtils.consolidateBitField(ioAsOutMask, pSpecs.getMask_IO_R()), pSpecs.getMask_IO_W());
-        int io_outCount = BitUtils.countBits(ioAsOutMask);
-        int io_inCount = BitUtils.countBits(pSpecs.getMask_IO_R() & ~ioAsOutMask);
-        
-        int outCount = pSpecs.getPinCount_O() + io_outCount + pSpecs.getPinCount_RO();
-        int outCount_oe = pSpecs.getPinCount_O() + io_outCount;
-        int inCount = pSpecs.getPinCount_IN() + io_inCount + io_outCount + pSpecs.getPinCount_RO();
-
-        strBuf.append("# " + pSpecs.toString() + "\n");
-        strBuf.append(".i " + inCount + "\n"); // Inputs, IO as inputs, IO as outputs (as feedbacks), registered outputs (as feedbacks)
-        strBuf.append(".o " + (outCount_oe + outCount) + "\n"); // Outputs, IO as outputs, Registered Outputs, then an out for all of those as OE
-        
-        strBuf.append(".ilb ");
-        for(int idx = 0; idx < 32; idx++) if(((pSpecs.getMask_IN() >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_IN()[idx] + " ");
-        for(int idx = 0; idx < 32; idx++) if((((pSpecs.getMask_IO_W() & ~ioAsOut_W) >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_IO()[idx] + " ");
-        for(int idx = 0; idx < 32; idx++) if((((pSpecs.getMask_IO_W() & ioAsOut_W) >> idx) & 0x01) > 0) strBuf.append("f" + pSpecs.getLabels_IO()[idx] + " ");
-        for(int idx = 0; idx < 32; idx++) if(((pSpecs.getMask_RO_W() >> idx) & 0x01) > 0) strBuf.append("ps"+pSpecs.getLabels_RO()[idx] + " ");
-        strBuf.append("\n");
-        
-        strBuf.append(".ob ");
-        for(int idx = 0; idx < 32; idx++) if(((pSpecs.getMask_O_W() >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_O()[idx] + " ");
-        for(int idx = 0; idx < 32; idx++) if((((pSpecs.getMask_IO_W() & ioAsOut_W) >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_IO()[idx] + " ");
-        for(int idx = 0; idx < 32; idx++) if(((pSpecs.getMask_RO_W() >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_RO()[idx] + " ");
-        for(int idx = 0; idx < 32; idx++) if(((pSpecs.getMask_O_W() >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_O()[idx] + "oe ");
-        for(int idx = 0; idx < 32; idx++) if((((pSpecs.getMask_IO_W() & ioAsOut_W) >> idx) & 0x01) > 0) strBuf.append(pSpecs.getLabels_IO()[idx] + "oe ");
-        strBuf.append("\n");
-       
-        strBuf.append(".phase ");
-        for(int idx = 0; idx < outCount; idx++) strBuf.append(pSpecs.isActiveLow() ? '0' : '1');
-        for(int idx = 0; idx < outCount_oe; idx++) strBuf.append('1');
-        strBuf.append("\n\n");
-        
-        return strBuf.toString();
-    }
-  
-    public static String[] formatEspressoTable(PALSpecs pSpecs, int ioAsOutMask, OutState[] states) {
-        return formatEspressoTable(pSpecs, ioAsOutMask, states, true);
-    }
-    
-    public static String[] formatEspressoTable(PALSpecs pSpecs, int ioAsOutMask, OutState[] states, boolean padTable) {
-        int ioAsOut_W = BitUtils.scatterBitField(BitUtils.consolidateBitField(ioAsOutMask, pSpecs.getMask_IO_R()), pSpecs.getMask_IO_W());
-        HashSet<String> tableRows = new HashSet<>();
-
-        int ins, io_ins, io_fio, io_fio_hiz, ro_ps, outs, outs_hiz, io_outs, io_outs_hiz, ro;
-        int io_ins_count = BitUtils.countBits(pSpecs.getMask_IO_W() & ~ioAsOut_W);
-        int io_fio_count = BitUtils.countBits(pSpecs.getMask_IO_R() & ioAsOutMask);
-        int io_outs_count = BitUtils.countBits(ioAsOutMask);
-
-        StringBuffer strBuf = new StringBuffer();
-
-        Set<Integer> visitedFIOs = new HashSet<>();
-        Set<Integer> visitedROs = new HashSet<>();
-
-        for(OutState os : states) {
-            OutLink[] outLinks = os.getOutLinks();
-            for(OutLink ol : outLinks) {
-                strBuf.delete(0, strBuf.length());
-
-                ins = BitUtils.consolidateBitField(ol.inputs, pSpecs.getMask_IN()); // inputs
-                io_ins = BitUtils.consolidateBitField(ol.inputs, pSpecs.getMask_IO_W() & ~ioAsOut_W); // IOs as inputs
-                io_fio = BitUtils.consolidateBitField(ol.src.pins.out, pSpecs.getMask_IO_R() & ioAsOutMask); // IO as outputs (feedbacks)
-                io_fio_hiz = BitUtils.consolidateBitField(ol.src.pins.hiz, pSpecs.getMask_IO_R() & ioAsOutMask); // IO as outputs (feedbacks) - hiz flags
-                io_fio &= ~io_fio_hiz;
-
-                ro_ps = BitUtils.consolidateBitField(ol.src.pins.out, pSpecs.getMask_RO_R()); // Old Registered Outputs
-
-                outs = BitUtils.consolidateBitField(ol.dest.pins.out, pSpecs.getMask_O_R()); // Outputs
-                outs_hiz = BitUtils.consolidateBitField(ol.dest.pins.hiz, pSpecs.getMask_O_R()); // Outputs - hiz flags
-                io_outs = BitUtils.consolidateBitField(ol.dest.pins.out, ioAsOutMask); // IO as outputs (feedbacks)
-                io_outs_hiz = BitUtils.consolidateBitField(ol.dest.pins.hiz, ioAsOutMask); // IO as outputs (feedbacks)
-                ro = 0x00; // We'll set these as "don't care" for this type of link, as they can only be changed via a registered link
-
-                // Build all combinations of the feedback IOs to mark as already visited
-                if(io_fio_hiz != 0) {
-                    int maxVal = 1 << BitUtils.countBits(io_fio_hiz);
-                    for(int idx = 0; idx < maxVal; idx++) {
-                        int fio_comb = io_fio | BitUtils.scatterBitField(idx, io_fio_hiz);
-                        visitedFIOs.add(fio_comb);
-                    }
-                } else visitedFIOs.add(io_fio);
-
-                // Print the inputs
-                for(int idx = 0; idx < pSpecs.getPinCount_IN(); idx++) strBuf.append((char)(((ins >> idx) & 0x01) + 0x30));
-                for(int idx = 0; idx < io_ins_count; idx++) strBuf.append((char)(((io_ins >> idx) & 0x01) + 0x30));
-                for(int idx = 0; idx < io_fio_count; idx++) {
-                    boolean fio_pin_hiz = ((io_fio_hiz >> idx) & 0x01) != 0;
-                    strBuf.append(fio_pin_hiz ? '-' : (char)(((io_fio >> idx) & 0x01) + 0x30));
-                }
-                for(int idx = 0; idx < pSpecs.getPinCount_RO(); idx++) strBuf.append((char)(((ro_ps >> idx) & 0x01) + 0x30));
-
-                strBuf.append(' ');
-                // Print the outputs
-                for(int idx = 0; idx < pSpecs.getPinCount_O(); idx++) {
-                    boolean out_pin_hiz = ((outs_hiz >> idx) & 0x01) != 0;
-                    strBuf.append(out_pin_hiz ? '-' : (char)(((outs >> idx) & 0x01) + 0x30));
-                }
-                for(int idx = 0; idx < io_outs_count; idx++) {
-                    boolean io_pin_hiz = ((io_outs_hiz >> idx) & 0x01) != 0;
-                    strBuf.append(io_pin_hiz ? '-' : (char)(((io_outs >> idx) & 0x01) + 0x30));
-                }
-                for(int idx = 0; idx < pSpecs.getPinCount_RO(); idx++) strBuf.append('-'); // Ignore the destination Registered Outputs for this type of link, as they can't change
-                // Print the outputs (hiz flags)
-                for(int idx = 0; idx < pSpecs.getPinCount_O(); idx++) strBuf.append((char)(((outs_hiz >> idx) & 0x01) + 0x30));
-                for(int idx = 0; idx < io_outs_count; idx++) strBuf.append((char)(((io_outs_hiz >> idx) & 0x01) + 0x30));
-
-                strBuf.append('\n');
-                tableRows.add(strBuf.toString());
-            }
-
-            RegLink[] regLinks = os.getRegLinks();
-            for(RegLink rl : regLinks) {
-                strBuf.delete(0, strBuf.length());
-
-                ins = BitUtils.consolidateBitField(rl.inputs, pSpecs.getMask_IN()); // inputs
-                io_ins = BitUtils.consolidateBitField(rl.inputs, pSpecs.getMask_IO_W() & ~ioAsOut_W); // IOs as inputs
-                io_fio = BitUtils.consolidateBitField(rl.middle.pins.out, pSpecs.getMask_IO_R() & ioAsOutMask); // IO as outputs (feedbacks)
-                io_fio_hiz = BitUtils.consolidateBitField(rl.middle.pins.hiz, pSpecs.getMask_IO_R() & ioAsOutMask); // IO as outputs (feedbacks) - hiz flags
-                io_fio &= ~io_fio_hiz;
-                ro_ps = BitUtils.consolidateBitField(rl.middle.pins.out, pSpecs.getMask_RO_R()); // Old Registered Outputs
-
-                visitedROs.add(ro_ps);
-
-                outs = 0x00; // Outputs, Ignore, we'll set them as don't care for this type of link, these will be set by outlinks
-                outs_hiz = 0x00;
-                io_outs = 0x00;
-                io_outs_hiz = 0x00; 
-                ro = BitUtils.consolidateBitField(rl.dest.pins.out, pSpecs.getMask_RO_R()); // Registered outputs
-
-                // Print the inputs
-                for(int idx = 0; idx < pSpecs.getPinCount_IN(); idx++) strBuf.append((char)(((ins >> idx) & 0x01) + 0x30));
-                for(int idx = 0; idx < io_ins_count; idx++) strBuf.append((char)(((io_ins >> idx) & 0x01) + 0x30));
-
-                for(int idx = 0; idx < io_fio_count; idx++) {
-                    boolean fio_pin_hiz = ((io_fio_hiz >> idx) & 0x01) != 0;
-                    strBuf.append(fio_pin_hiz ? '-' : (char)(((io_fio >> idx) & 0x01) + 0x30));
-                }
-
-                for(int idx = 0; idx < pSpecs.getPinCount_RO(); idx++) strBuf.append((char)(((ro_ps >> idx) & 0x01) + 0x30));
-                
-                strBuf.append(' ');
-
-                // Print the outputs
-                for(int idx = 0; idx < pSpecs.getPinCount_O(); idx++) strBuf.append('-');
-                for(int idx = 0; idx < io_outs_count; idx++) strBuf.append('-');
-                for(int idx = 0; idx < pSpecs.getPinCount_RO(); idx++) strBuf.append((char)(((ro >> idx) & 0x01) + 0x30));
-                // Print the outputs (hiz flags)
-                for(int idx = 0; idx < pSpecs.getPinCount_O()+io_outs_count; idx++) strBuf.append('-');
-
-                strBuf.append('\n');
-                tableRows.add(strBuf.toString());
-            }
-        }
-
-        ArrayList<String> padding = new ArrayList<>();
-        if(padTable) {
-            int outAlwaysOff = 0xFF;
-            int outAlwaysOn = 0xFF;
-
-            for(OutState os : states) {
-                outAlwaysOff &= os.pins.hiz;
-                outAlwaysOn &= ~os.pins.hiz;
-            }
-            
-            int oAOff = BitUtils.consolidateBitField(outAlwaysOff, pSpecs.getMask_O_R());
-            int oAOn = BitUtils.consolidateBitField(outAlwaysOn, pSpecs.getMask_O_R());
-            int ioAOff = BitUtils.consolidateBitField(outAlwaysOff, ioAsOutMask);
-            int ioAOn = BitUtils.consolidateBitField(outAlwaysOn, ioAsOutMask);
-
-            if(BitUtils.countBits(ioAsOutMask) > 0) {
-                // Feedback IOs
-                padding.add("# Padding FIOs START\n");
-                for(int idx = 0; idx < (1 << BitUtils.countBits(ioAsOutMask)); idx++) {
-                    if(!visitedFIOs.contains(idx)) {
-                        strBuf.delete(0, strBuf.length());
-
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_IN(); cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < io_ins_count; cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < io_fio_count; cidx++) strBuf.append((((idx >> cidx) & 0x01) != 0) ? '1' : '0');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_RO(); cidx++) strBuf.append('-');
-                        strBuf.append(' ');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_O(); cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < io_outs_count; cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_RO(); cidx++) strBuf.append('-');
-                        
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_O(); cidx++) {
-                            if(((oAOff >> cidx) & 0x01) != 0) strBuf.append('1');
-                            else if(((oAOn >> cidx) & 0x01) != 0) strBuf.append('0');
-                            else strBuf.append('-');
-                        }
-                        for(int cidx = 0; cidx < io_outs_count; cidx++) {
-                            if(((ioAOff >> cidx) & 0x01) != 0) strBuf.append('1');
-                            else if(((ioAOn >> cidx) & 0x01) != 0) strBuf.append('0');
-                            else strBuf.append('-');
-                        }
-
-                        strBuf.append('\n');
-                        padding.add(strBuf.toString());
-                    }
-                }
-            }
-
-            if(pSpecs.getPinCount_RO() > 0) {
-                // Registered Outputs
-                padding.add("# Padding ROs START\n");
-                for(int idx = 0; idx < (1 << pSpecs.getPinCount_RO()); idx++) {
-                    if(!visitedROs.contains(idx)) {
-                        strBuf.delete(0, strBuf.length());
-                        
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_IN(); cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < io_ins_count; cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < io_fio_count; cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_RO(); cidx++) strBuf.append((((idx >> cidx) & 0x01) != 0) ? '1' : '0');
-                        strBuf.append(' ');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_O(); cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < io_outs_count; cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_RO(); cidx++) strBuf.append('-');
-                        for(int cidx = 0; cidx < pSpecs.getPinCount_O()+io_outs_count; cidx++) strBuf.append('-');
-
-                        strBuf.append('\n');
-                        padding.add(strBuf.toString());
-                    }
-                }
-            }
-
-            padding.add("# Padding END\n");
-        }
-
-        ArrayList<String> paddedTable = new ArrayList<>();
-        for(String p : padding) paddedTable.add(p);
-        paddedTable.addAll(tableRows);
-
-        return paddedTable.toArray(new String[paddedTable.size()]);
-    }
-
-    public static String[] formatEspressoTable(PALSpecs pSpecs, SimpleState[] states) {
-        ArrayList<String> tableRows = new ArrayList<>();
-
-        StringBuffer strBuf = new StringBuffer();
-        for(SimpleState ss : states) {
-            strBuf.delete(0, strBuf.length());
-            
-            int inputs = BitUtils.consolidateBitField(ss.input, pSpecs.getMask_IN());
-            int output = BitUtils.consolidateBitField(ss.output, pSpecs.getMask_O_R());
-            int hiz = BitUtils.consolidateBitField(ss.hiz, pSpecs.getMask_O_R());
-            for(int idx = 0; idx < pSpecs.getPinCount_IN(); idx++) strBuf.append((char)(((inputs >> idx) & 0x01) + 0x30));
-            strBuf.append(' ');
-            for(int idx = 0; idx < pSpecs.getPinCount_O(); idx++) {
-                boolean hiz_pin = ((hiz >> idx) & 0x01) != 0;
-                strBuf.append(hiz_pin ? '-' : (char)(((output >> idx) & 0x01) + 0x30));
-            }
-            for(int idx = 0; idx < pSpecs.getPinCount_O(); idx++) strBuf.append((char)(((hiz >> idx) & 0x01) + 0x30));
-            strBuf.append('\n');
-
-            tableRows.add(strBuf.toString());
-        }
-
-        return tableRows.toArray(new String[tableRows.size()]);
-    }
-
-    public static String formatEspressoFooter() {
-        return ".e\n\n";
-    }
-}

+ 0 - 119
src/test/java/info/hkzlab/dupal/analyzer/FormattersTest.java

@@ -1,119 +0,0 @@
-package info.hkzlab.dupal.analyzer;
-
-import static org.junit.Assert.*;
-
-import java.util.Arrays;
-
-import org.junit.Test;
-
-import info.hkzlab.dupal.analyzer.devices.PAL16L8Specs;
-import info.hkzlab.dupal.analyzer.exceptions.DuPALAnalyzerException;
-import info.hkzlab.dupal.analyzer.palanalisys.formatter.EspressoFormatter;
-import info.hkzlab.dupal.analyzer.palanalisys.graph.OutLink;
-import info.hkzlab.dupal.analyzer.palanalisys.graph.OutState;
-import info.hkzlab.dupal.analyzer.palanalisys.graph.OutStatePins;
-
-public class FormattersTest {
-    @Test
-    public void espressoFormatterShouldBuildCorrect16L8Header() {
-        PAL16L8Specs pSpecs = new PAL16L8Specs();
-        int ioAsOutMask = 0x03;
-        String header = EspressoFormatter.formatEspressoTableHeader(pSpecs, ioAsOutMask);
-        String expectedHeader = "# PAL16L8\n" + ".i 16\n" + ".o 8\n"
-                + ".ilb i1 i2 i3 i4 i5 i6 i7 i8 i9 i11 io16 io15 io14 io13 fio18 fio17 \n"
-                + ".ob o19 o12 io18 io17 o19oe o12oe io18oe io17oe \n" + ".phase 00001111\n\n";
-
-        assertEquals("EspressoFormatter should build a correct 16L8 header", expectedHeader, header);
-    }
-
-    @Test
-    public void espressoFormatterShouldCorrectlyPadTableWithOutLinks() throws DuPALAnalyzerException {
-        PAL16L8Specs pSpecs = new PAL16L8Specs();
-        int ioAsOutMask = 0x07;
-        OutState[] states = new OutState[3];
-
-        states[0] = new OutState(new OutStatePins(0x38, 0x00), 3);
-        states[1] = new OutState(new OutStatePins(0xAF, 0x01), 3);
-        states[2] = new OutState(new OutStatePins(0x00, 0x00), 3);
-
-        states[0].addOutLink(new OutLink(states[0], states[0], 0x00));
-        states[0].addOutLink(new OutLink(states[0], states[1], 0x3800));
-        states[0].addOutLink(new OutLink(states[0], states[2], 0x04));
-        
-        states[1].addOutLink(new OutLink(states[1], states[0], 0x00));
-        states[1].addOutLink(new OutLink(states[1], states[1], 0x07));
-        states[1].addOutLink(new OutLink(states[1], states[2], 0x04));
-        
-        states[2].addOutLink(new OutLink(states[2], states[2], 0x09));
-        states[2].addOutLink(new OutLink(states[2], states[1], 0x2800));
-        states[2].addOutLink(new OutLink(states[2], states[1], 0x04));
-
-        String[] rows = EspressoFormatter.formatEspressoTable(pSpecs, ioAsOutMask, states, true);
-
-        String[] expected = new String[] {
-            "# Padding FIOs START\n",
-            "-------------100 -----00-00\n",
-            "-------------010 -----00-00\n",
-            "-------------110 -----00-00\n",
-            "-------------001 -----00-00\n",
-            "-------------101 -----00-00\n",
-            "# Padding END\n",
-            "1110000000000-11 01-1100100\n",
-            "0000000000000-11 0000000000\n",
-            "0010000000000000 01-1100100\n",
-            "0010000000000000 0000000000\n",
-            "0010000000000-11 0000000000\n",
-            "1001000000000000 0000000000\n",
-            "0000000000000000 0000000000\n",
-            "0000000000100000 01-1100100\n"
-        };
-
-        assertArrayEquals("EspressoFormatter should correctly build and pad the table", expected, rows);
-    }
-
-    @Test
-    public void espressoFormatterShouldBuildCorrect16L8TableWithoutRegLinks() throws DuPALAnalyzerException {
-        PAL16L8Specs pSpecs = new PAL16L8Specs();
-        int ioAsOutMask = 0x38;
-
-        OutState[] states = new OutState[3];
-
-        states[0] = new OutState(new OutStatePins(0x38, 0xC0), 3);
-        states[1] = new OutState(new OutStatePins(0xAF, 0x20), 3);
-        states[2] = new OutState(new OutStatePins(0x00, 0x00), 3);
-
-        states[0].addOutLink(new OutLink(states[0], states[0], 0x00));
-        states[0].addOutLink(new OutLink(states[0], states[1], 0x3800));
-        states[0].addOutLink(new OutLink(states[0], states[2], 0x04));
-        
-        states[1].addOutLink(new OutLink(states[1], states[0], 0x00));
-        states[1].addOutLink(new OutLink(states[1], states[1], 0x07));
-        states[1].addOutLink(new OutLink(states[1], states[2], 0x04));
-        
-        states[2].addOutLink(new OutLink(states[2], states[2], 0x09));
-        states[2].addOutLink(new OutLink(states[2], states[1], 0x2800));
-        states[2].addOutLink(new OutLink(states[2], states[1], 0x04));
-
-        String[] rows = EspressoFormatter.formatEspressoTable(pSpecs, ioAsOutMask, states, false);
-
-        String[] expected = new String[] {
-            "0000000000000111 --11111000\n",
-            "0000000000011111 0110-00001\n",
-            "0010000000000111 0000000000\n",
-            
-            "000000000000010- --11111000\n",
-            "111000000000010- 0110-00001\n",
-            "001000000000010- 0000000000\n",
-            
-            "1001000000000000 0000000000\n",
-            "0000000000010000 0110-00001\n",
-            "0010000000000000 0110-00001\n",
-        };
-
-        // Sort them, as we cannot guarantee the order of the formatted espresso table
-        Arrays.sort(expected);
-        Arrays.sort(rows);
-
-        assertArrayEquals("EspressoFormatter should build the correct truth table for specified states", expected, rows);
-    }
-}