aboutsummaryrefslogtreecommitdiffstats
path: root/frontends
Commit message (Collapse)AuthorAgeFilesLines
...
* verilog: Squash a memory leak.Marcelina Kościelnicka2021-06-144-19/+14
| | | | That was added in ecc22f7fedfa639482dbc55a05709da85116a60f
* Merge pull request #2817 from YosysHQ/claire/fixemailsClaire Xen2021-06-0925-25/+25
|\ | | | | Fixing old e-mail addresses and deadnames
| * Fixing old e-mail addresses and deadnamesClaire Xenia Wolf2021-06-0825-25/+25
| | | | | | | | | | | | | | | | s/((Claire|Xen|Xenia|Clifford)\s+)+(Wolf|Xen)\s+<(claire|clifford)@(symbioticeda.com|clifford.at|yosyshq.com)>/Claire Xenia Wolf <claire@yosyshq.com>/gi; s/((Nina|Nak|N\.)\s+)+Engelhardt\s+<nak@(symbioticeda.com|yosyshq.com)>/N. Engelhardt <nak@yosyshq.com>/gi; s/((David)\s+)+Shah\s+<(dave|david)@(symbioticeda.com|yosyshq.com|ds0.me)>/David Shah <dave@ds0.me>/gi; s/((Miodrag)\s+)+Milanovic\s+<(miodrag|micko)@(symbioticeda.com|yosyshq.com)>/Miodrag Milanovic <micko@yosyshq.com>/gi; s,https?://www.clifford.at/yosys/,http://yosyshq.net/yosys/,g;
* | verilog: check for module scope identifiers during width detectionZachary Snow2021-06-083-13/+30
| | | | | | | | | | | | | | | | The recent fix for case expression width detection causes the width of the expressions to be queried before they are simplified. Because the logic supporting module scope identifiers only existed in simplify, looking them up would fail during width detection. This moves the logic to a common helper used in both simplify() and detectSignWidthWorker().
* | mem2reg: tolerate out of bounds constant accessesZachary Snow2021-06-081-5/+42
|/ | | | This brings the mem2reg behavior in line with the nomem2reg behavior.
* sv: support tasks and functions within packagesZachary Snow2021-06-013-2/+22
|
* verilog: fix case expression sign and width handlingZachary Snow2021-05-253-12/+49
| | | | | | | | | - The case expression and case item expressions are extended to the maximum width among them, and are only interpreted as signed if all of them are signed - Add overall width and sign detection for AST_CASE - Add sign argument to genWidthRTLIL helper - Coverage for both const and non-const case statements
* sv: support remaining assignment operatorsZachary Snow2021-05-252-42/+41
| | | | | - Add support for: *=, /=, %=, <<=, >>=, <<<=, >>>= - Unify existing support for: +=, -=, &=, |=, ^=
* Change the type of current_module to ModuleRupert Swarbrick2021-05-132-24/+26
| | | | | | | | | | | The current_module global is needed so that genRTLIL has somewhere to put cells and wires that it generates as it makes sense of expressions that it sees. However, that doesn't actually need to be an AstModule: the Module base class is enough. This patch should cause no functional change, but the point is that it's now possible to call genRTLIL with a module that isn't an AstModule as "current_module". This will be needed for 'bind' support.
* Use range-based for loop in AST::processRupert Swarbrick2021-05-131-21/+21
| | | | | | No functional change: just get rid of the explicit iterator and replace (*it)-> with child->. It's even the same number of characters, but is hopefully a little easier to read.
* sv: check validity of package end labelZachary Snow2021-05-101-0/+2
|
* blif: Use library cells' start_offset and upto for wideports.Marcelina Kościelnicka2021-05-081-10/+27
| | | | Fixes #2729.
* Remove duplicates from conns array in JSON front-end, fixes #2736Claire Xenia Wolf2021-04-261-0/+4
|
* verilog: revise hot comment warningsZachary Snow2021-03-301-6/+21
|
* preproc: Fix up conditional handling.Marcelina Kościelnicka2021-03-301-3/+17
| | | | | Fixes #2710. Fixes #2711.
* ast: make design available to process_module()Zachary Snow2021-03-241-8/+8
|
* verilog: check entire user type stack for type definitionXiretza2021-03-211-6/+12
|
* sv: allow typenames as function return typesZachary Snow2021-03-191-0/+6
|
* verilog: rebuild user_type_stack from globals before parsing fileXiretza2021-03-181-5/+21
| | | | | | | | | | | | This was actually a ticking UB bomb: after running the parser, the type maps contain pointers to children of the current AST, which is recursively deleted after the pass has executed. This leaves the pointers in user_type_stack dangling, which just happened to never be a problem due to another bug that causes typedefs from higher-level type maps to never be considered. Rebuilding the type stack from the design's globals ensures the AstNode pointers are valid.
* ast: Use better parameter serialization for paramod names.Marcelina Kościelnicka2021-03-181-2/+25
| | | | | | | | | | | | Calling log_signal is problematic for several reasons: - with recent changes, empty string is serialized as { }, which violates the "no spaces in IdString" rule - the type (plain / real / signed / string) is dropped, wrongly conflating functionally different values and potentially introducing a subtle elaboration bug Instead, use a custom simple serialization scheme.
* sv: carry over global typedefs from previous filesZachary Snow2021-03-171-2/+5
| | | | | | | This breaks the ability to use a global typename as a standard identifier in a subsequent input file. This is otherwise backwards compatible, including for sources which previously included conflicting typedefs in each input file.
* verilog: fix buf/not primitives with multiple outputsXiretza2021-03-171-4/+15
| | | | | | | | | | | | From IEEE1364-2005, section 7.3 buf and not gates: > These two logic gates shall have one input and one or more outputs. > The last terminal in the terminal list shall connect to the input of the > logic gate, and the other terminals shall connect to the outputs of > the logic gate. yosys does not follow this and instead interprets the first argument as the output, the second as the input and ignores the rest.
* verilog: support module scope identifiers in parametric modulesZachary Snow2021-03-161-4/+8
|
* json: Add support for memories.Marcelina Kościelnicka2021-03-151-0/+46
| | | | | | | | | | | | | | Previously, memories were silently discarded by the JSON backend, making round-tripping modules with them crash. Since there are already some users using JSON to implement custom external passes that use memories (and infer width/size from memory ports), let's fix this by just making JSON backend and frontend support memories as first-class objects. Processes are still not supported, and will now cause a hard error. Fixes #1908.
* sv: allow globals in one file to depend on globals in anotherZachary Snow2021-03-122-1/+1
| | | | | | This defers the simplification of globals so that globals in one file may depend on globals in other files. Adds a simplify() call downstream because globals are appended at the end.
* verilog: disallow overriding global parametersZachary Snow2021-03-111-0/+2
| | | | | | It was previously possible to override global parameters on a per-instance basis. This could be dangerous when using positional parameter bindings, hiding oversupplied parameters.
* Merge pull request #2643 from zachjs/fix-param-no-default-logwhitequark2021-03-081-1/+1
|\ | | | | Fix param without default log line
| * Fix param without default log lineZachary Snow2021-03-071-1/+1
| |
* | verilog: Use proc memory writes in the frontend.Marcelina Kościelnicka2021-03-084-29/+89
| |
* | Add support for memory writes in processes.Marcelina Kościelnicka2021-03-082-1/+19
|/
* Merge pull request #2626 from zachjs/param-no-defaultwhitequark2021-03-072-5/+48
|\ | | | | sv: support for parameters without default values
| * sv: support for parameters without default valuesZachary Snow2021-03-022-5/+48
| | | | | | | | | | | | | | | | | | - Modules with a parameter without a default value will be automatically deferred until the hierarchy pass - Allows for parameters without defaults as module items, rather than just int the `parameter_port_list`, despite being forbidden in the LRM - Check for parameters without defaults that haven't been overriden - Add location info to parameter/localparam declarations
* | Merge pull request #2632 from zachjs/width-limitwhitequark2021-03-071-0/+6
|\ \ | | | | | | verilog: impose limit on maximum expression width
| * | verilog: impose limit on maximum expression widthZachary Snow2021-03-041-0/+6
| | | | | | | | | | | | | | | Designs with unreasonably wide expressions would previously get stuck allocating memory forever.
* | | sv: fix some edge cases for unbased unsized literalsZachary Snow2021-03-062-1/+23
|/ / | | | | | | | | | | - Fix explicit size cast of unbased unsized literals - Fix unbased unsized literal bound directly to port - Output `is_unsized` flag in `dumpAst`
* / Update READMEClaire Xen2021-03-041-4/+4
|/
* verilog: fix sizing of ports with int types in module headersZachary Snow2021-03-011-2/+3
| | | | | | Declaring the ports as standard module items already worked as expected. This adds a missing usage of `checkRange()` so that headers such as `module m(output integer x);` now work correctly.
* verilog: fix handling of nested ifdef directivesZachary Snow2021-03-011-11/+38
| | | | | - track depth so we know whether to consider higher-level elsifs - error on unmatched endif/elsif/else
* Merge pull request #2523 from tomverbeure/define_synthesisClaire Xen2021-03-011-3/+12
|\ | | | | Add -nosynthesis flag for read_verilog command
| * Fix indents.Tom Verbeure2021-01-041-2/+2
| |
| * Add -nosynthesis flag for read_verilog command.Tom Verbeure2021-01-041-3/+12
| |
* | Merge pull request #2615 from zachjs/genrtlil-conflictwhitequark2021-03-011-12/+37
|\ \ | | | | | | genrtlil: improve name conflict error messaging
| * | genrtlil: improve name conflict error messagingZachary Snow2021-02-261-12/+37
| | |
* | | sv: extended support for integer typesZachary Snow2021-02-282-39/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Standard data declarations can now use any integer type - Parameters and localparams can now use any integer type - Function returns types can now use any integer type - Fix `parameter logic`, `localparam reg`, etc. to be 1 bit (previously 32 bits) - Added longint type (64 bits) - Unified parser source for integer type widths
* | | Implement $countones, $isunknown and $onehot{,0}Michael Singer2021-02-261-0/+28
| | |
* | | Implement $countbits functionMichael Singer2021-02-261-0/+59
| | |
* | | Extend simplify() recursion warningZachary Snow2021-02-261-1/+1
| | |
* | | Merge pull request #2554 from hzeller/masterwhitequark2021-02-251-6/+17
|\ \ \ | | | | | | | | Fix digit-formatting calculation for small numbers.
| * | | Provide an integer implementation of decimal_digits().Henner Zeller2021-02-011-2/+9
| | | | | | | | | | | | | | | | Signed-off-by: Henner Zeller <h.zeller@acm.org>
| * | | Fix digit-formatting calculation for small numbers.Henner Zeller2021-01-211-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Calling log10() on zero causes a non-sensical value to be calculated. On some compile options, I've observed yosys crashing with an illegal instruction (SIGILL). To make it safe, fix the calculation to do a range check; wrap it a decimal_digits() function, and use it where the previous ceil(log10(n)) call was used. As a side, it also improves readability. Signed-off-by: Henner Zeller <h.zeller@acm.org>