aboutsummaryrefslogtreecommitdiffstats
path: root/tests/various
Commit message (Expand)AuthorAgeFilesLines
* Merge pull request #2133 from dh73/nodev_headClaire Xen2020-11-2518-65/+322
|\
| * Removing trailing whitespacediego2020-06-101-30/+30
| * Adding latch tests for shift&mask AST dynamic part-select enhancementsdiego2020-06-0918-68/+325
* | tests: Centralize test collection and Makefile generationXiretza2020-09-211-19/+3
* | Merge pull request #2352 from zachjs/const-func-localparamclairexen2020-09-011-3/+6
|\ \
| * | Allow localparams in constant functionsZachary Snow2020-08-201-3/+6
* | | Fix constant args used with function ports split across declarationsZachary Snow2020-08-291-0/+20
|/ /
* | Merge pull request #2328 from YosysHQ/mwk/opt_dff-cleanupclairexen2020-08-201-143/+0
|\ \
| * | peepopt: Remove now-redundant dffmux pattern.Marcelina Kościelnicka2020-08-071-143/+0
* | | Merge branch 'const-func-block-var' of https://github.com/zachjs/yosys into z...Claire Wolf2020-08-182-0/+24
|\ \ \
| * | | Allow blocks with declarations within constant functionsZachary Snow2020-07-252-0/+24
* | | | Merge pull request #2281 from zachjs/const-realclairexen2020-08-181-0/+12
|\ \ \ \ | |_|/ / |/| | |
| * | | Allow reals as constant function parametersZachary Snow2020-07-191-0/+12
| |/ /
* | | Merge pull request #2306 from YosysHQ/mwk/equiv_induct-undefclairexen2020-07-281-0/+35
|\ \ \
| * | | equiv_induct: Fix up assumption for $equiv cells in -undef mode.Marcelina Kościelnicka2020-07-271-0/+35
| |/ /
* / / Avoid generating wires for function args which are constantZachary Snow2020-07-242-0/+45
|/ /
* | Revert "Revert PRs #2203 and #2244."Kamil Rakoczy2020-07-104-0/+49
* | Revert PRs #2203 and #2244.whitequark2020-07-094-49/+0
* | Add logic param and integer bad syntax testsKamil Rakoczy2020-07-063-0/+21
* | Merge pull request #2203 from antmicro/fix-grammarclairexen2020-07-011-0/+28
|\ \
| * | Add signed/unsigned testsKamil Rakoczy2020-06-261-0/+28
* | | Allow constant function calls in for loops and generate if and caseZachary Snow2020-06-292-0/+76
|/ /
* / Use C++11 final/override keywords.whitequark2020-06-181-1/+1
|/
* Merge pull request #2077 from YosysHQ/eddie/abc9_dff_improveEddie Hung2020-06-041-1/+2
|\
| * abc9_ops: -reintegrate use SigMap to remove (* init *) from $_DFF_[NP]_Eddie Hung2020-05-291-1/+2
* | Merge pull request #2080 from YosysHQ/eddie/fix_test_warningsEddie Hung2020-06-033-4/+4
|\ \
| * | tests: fix some test warningsEddie Hung2020-05-253-4/+4
| |/
* / printattrs: Add test.Alberto Gonzalez2020-05-271-0/+14
|/
* xaiger: add testcaseEddie Hung2020-05-241-0/+13
* abc9: preserve $_DFF_?_.Q's (* init *); rely on clean to remove itEddie Hung2020-05-141-3/+8
* abc9: not enough to techmap_fail on (* init=1 *), hide them using $__Eddie Hung2020-05-141-2/+21
* abc9: add flop boxes to basic $_DFF_P_ and $_DFF_N_ tooEddie Hung2020-05-141-5/+7
* Merge pull request #2028 from zachjs/masterEddie Hung2020-05-062-0/+17
|\
| * verilog: allow null gen-if then blockZachary Snow2020-05-062-0/+17
* | Merge pull request #2024 from YosysHQ/eddie/primitive_srcEddie Hung2020-05-051-0/+16
|\ \
| * | tests: add tests for primitives' srcEddie Hung2020-05-041-0/+16
| |/
* / verilog: fix specify src attributeEddie Hung2020-05-041-0/+6
|/
* test: add test for #2014Eddie Hung2020-05-021-0/+12
* Merge pull request #1973 from YosysHQ/eddie/fix1966Eddie Hung2020-04-221-1/+3
|\
| * tests: use `yosys-config --datdir` instead of hard-codedEddie Hung2020-04-221-1/+3
* | Merge pull request #1950 from YosysHQ/eddie/design_importEddie Hung2020-04-222-5/+22
|\ \
| * | design: add testEddie Hung2020-04-162-5/+22
| |/
* | Merge pull request #1976 from YosysHQ/dave/fix-sim-constClaire Wolf2020-04-221-0/+13
|\ \
| * | sim: Fix handling of constant-connected cell inputs at startupDavid Shah2020-04-211-0/+13
| |/
* | hierarchy: Convert positional parameters to named.Marcelina Kościelnicka2020-04-211-0/+23
* | Merge pull request #1851 from YosysHQ/claire/bitselwriteClaire Wolf2020-04-2113-0/+1224
|\ \
| * | Remove '-ignore_unknown_cells' option from 'sat'Eddie Hung2020-04-201-6/+6
| * | Simplify test case scriptEddie Hung2020-04-201-30/+17
| * | Modifications of tests as per Eddie's requestdiego2020-04-2013-0/+1237
* | | abc9: add testcase reduced from #1970Eddie Hung2020-04-201-0/+19
| |/ |/|
; if (term_cmd_buf_size != term_last_cmd_buf_size || memcmp(term_cmd_buf, term_last_cmd_buf, term_cmd_buf_size) != 0) { for(i = 0; i < term_last_cmd_buf_index; i++) { term_printf("\033[D"); } term_cmd_buf[term_cmd_buf_size] = '\0'; if (term_is_password) { len = strlen(term_cmd_buf); for(i = 0; i < len; i++) term_printf("*"); } else { term_printf("%s", term_cmd_buf); } term_printf("\033[K"); memcpy(term_last_cmd_buf, term_cmd_buf, term_cmd_buf_size); term_last_cmd_buf_size = term_cmd_buf_size; term_last_cmd_buf_index = term_cmd_buf_size; } if (term_cmd_buf_index != term_last_cmd_buf_index) { delta = term_cmd_buf_index - term_last_cmd_buf_index; if (delta > 0) { for(i = 0;i < delta; i++) { term_printf("\033[C"); } } else { delta = -delta; for(i = 0;i < delta; i++) { term_printf("\033[D"); } } term_last_cmd_buf_index = term_cmd_buf_index; } term_flush(); } static void term_insert_char(int ch) { if (term_cmd_buf_index < TERM_CMD_BUF_SIZE) { memmove(term_cmd_buf + term_cmd_buf_index + 1, term_cmd_buf + term_cmd_buf_index, term_cmd_buf_size - term_cmd_buf_index); term_cmd_buf[term_cmd_buf_index] = ch; term_cmd_buf_size++; term_cmd_buf_index++; } } static void term_backward_char(void) { if (term_cmd_buf_index > 0) { term_cmd_buf_index--; } } static void term_forward_char(void) { if (term_cmd_buf_index < term_cmd_buf_size) { term_cmd_buf_index++; } } static void term_delete_char(void) { if (term_cmd_buf_index < term_cmd_buf_size) { memmove(term_cmd_buf + term_cmd_buf_index, term_cmd_buf + term_cmd_buf_index + 1, term_cmd_buf_size - term_cmd_buf_index - 1); term_cmd_buf_size--; } } static void term_backspace(void) { if (term_cmd_buf_index > 0) { term_backward_char(); term_delete_char(); } } static void term_bol(void) { term_cmd_buf_index = 0; } static void term_eol(void) { term_cmd_buf_index = term_cmd_buf_size; } static void term_up_char(void) { int idx; if (term_hist_entry == 0) return; if (term_hist_entry == -1) { /* Find latest entry */ for (idx = 0; idx < TERM_MAX_CMDS; idx++) { if (term_history[idx] == NULL) break; } term_hist_entry = idx; } term_hist_entry--; if (term_hist_entry >= 0) { pstrcpy(term_cmd_buf, sizeof(term_cmd_buf), term_history[term_hist_entry]); term_cmd_buf_index = term_cmd_buf_size = strlen(term_cmd_buf); } } static void term_down_char(void) { if (term_hist_entry == TERM_MAX_CMDS - 1 || term_hist_entry == -1) return; if (term_history[++term_hist_entry] != NULL) { pstrcpy(term_cmd_buf, sizeof(term_cmd_buf), term_history[term_hist_entry]); } else { term_hist_entry = -1; } term_cmd_buf_index = term_cmd_buf_size = strlen(term_cmd_buf); } static void term_hist_add(const char *cmdline) { char *hist_entry, *new_entry; int idx; if (cmdline[0] == '\0') return; new_entry = NULL; if (term_hist_entry != -1) { /* We were editing an existing history entry: replace it */ hist_entry = term_history[term_hist_entry]; idx = term_hist_entry; if (strcmp(hist_entry, cmdline) == 0) { goto same_entry; } } /* Search cmdline in history buffers */ for (idx = 0; idx < TERM_MAX_CMDS; idx++) { hist_entry = term_history[idx]; if (hist_entry == NULL) break; if (strcmp(hist_entry, cmdline) == 0) { same_entry: new_entry = hist_entry; /* Put this entry at the end of history */ memmove(&term_history[idx], &term_history[idx + 1], &term_history[TERM_MAX_CMDS] - &term_history[idx + 1]); term_history[TERM_MAX_CMDS - 1] = NULL; for (; idx < TERM_MAX_CMDS; idx++) { if (term_history[idx] == NULL) break; } break; } } if (idx == TERM_MAX_CMDS) { /* Need to get one free slot */ free(term_history[0]); memcpy(term_history, &term_history[1], &term_history[TERM_MAX_CMDS] - &term_history[1]); term_history[TERM_MAX_CMDS - 1] = NULL; idx = TERM_MAX_CMDS - 1; } if (new_entry == NULL) new_entry = strdup(cmdline); term_history[idx] = new_entry; term_hist_entry = -1; } /* completion support */ void add_completion(const char *str) { if (nb_completions < NB_COMPLETIONS_MAX) { completions[nb_completions++] = qemu_strdup(str); } } static void term_completion(void) { int len, i, j, max_width, nb_cols; char *cmdline; nb_completions = 0; cmdline = qemu_malloc(term_cmd_buf_index + 1); if (!cmdline) return; memcpy(cmdline, term_cmd_buf, term_cmd_buf_index); cmdline[term_cmd_buf_index] = '\0'; qemu_free(cmdline); /* no completion found */ if (nb_completions <= 0) return; if (nb_completions == 1) { len = strlen(completions[0]); for(i = completion_index; i < len; i++) { term_insert_char(completions[0][i]); } /* extra space for next argument. XXX: make it more generic */ if (len > 0 && completions[0][len - 1] != '/') term_insert_char(' '); } else { term_printf("\n"); max_width = 0; for(i = 0; i < nb_completions; i++) { len = strlen(completions[i]); if (len > max_width) max_width = len; } max_width += 2; if (max_width < 10) max_width = 10; else if (max_width > 80) max_width = 80; nb_cols = 80 / max_width; j = 0; for(i = 0; i < nb_completions; i++) { term_printf("%-*s", max_width, completions[i]); if (++j == nb_cols || i == (nb_completions - 1)) { term_printf("\n"); j = 0; } } term_show_prompt2(); } } /* return true if command handled */ void readline_handle_byte(int ch) { switch(term_esc_state) { case IS_NORM: switch(ch) { case 1: term_bol(); break; case 4: term_delete_char(); break; case 5: term_eol(); break; case 9: term_completion(); break; case 10: case 13: term_cmd_buf[term_cmd_buf_size] = '\0'; if (!term_is_password) term_hist_add(term_cmd_buf); term_printf("\n"); /* NOTE: readline_start can be called here */ term_readline_func(term_readline_opaque, term_cmd_buf); break; case 27: term_esc_state = IS_ESC; break; case 127: case 8: term_backspace(); break; case 155: term_esc_state = IS_CSI; break; default: if (ch >= 32) { term_insert_char(ch); } break; } break; case IS_ESC: if (ch == '[') { term_esc_state = IS_CSI; term_esc_param = 0; } else { term_esc_state = IS_NORM; } break; case IS_CSI: switch(ch) { case 'A': case 'F': term_up_char(); break; case 'B': case 'E': term_down_char(); break; case 'D': term_backward_char(); break; case 'C': term_forward_char(); break; case '0' ... '9': term_esc_param = term_esc_param * 10 + (ch - '0'); goto the_end; case '~': switch(term_esc_param) { case 1: term_bol();