aboutsummaryrefslogtreecommitdiffstats
path: root/passes/memory
Commit message (Collapse)AuthorAgeFilesLines
* memory_dff: recognize more dff cellsMarcelina Koƛcielnicka2020-07-231-11/+112
|
* Use C++11 final/override keywords.whitequark2020-06-189-18/+18
|
* Add flooring division operatorXiretza2020-05-281-0/+1
| | | | | | | | | | The $div and $mod cells use truncating division semantics (rounding towards 0), as defined by e.g. Verilog. Another rounding mode, flooring (rounding towards negative infinity), can be used in e.g. VHDL. The new $divfloor cell provides this flooring division. This commit also fixes the handling of $div in opt_expr, which was previously optimized as if it was $divfloor.
* Add flooring modulo operatorXiretza2020-05-281-0/+1
| | | | | | | | | | | The $div and $mod cells use truncating division semantics (rounding towards 0), as defined by e.g. Verilog. Another rounding mode, flooring (rounding towards negative infinity), can be used in e.g. VHDL. The new $modfloor cell provides this flooring modulo (also known as "remainder" in several languages, but this name is ambiguous). This commit also fixes the handling of $mod in opt_expr, which was previously optimized as if it was $modfloor.
* memory_bram: Fix ignorance of valid, matched rulesDavid Shah2020-04-101-3/+3
| | | | Signed-off-by: David Shah <dave@ds0.me>
* Merge pull request #1603 from whitequark/ice40-ram_stylewhitequark2020-04-102-13/+148
|\ | | | | ice40/ecp5: add support for both 1364.1 and Synplify/LSE RAM/ROM attributes
| * memory_map: add -attr option, to respect inference attributes.whitequark2020-04-031-6/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, memory_map (which is always a part of a synth script) would always pick up any $mem cell that was not processed by a preceding pass and lower it down to $dff/$mux cells. This is undesirable for two reasons: * If there is an explicit inference attribute set on a $mem cell, e.g. (* ram_block *), then it is arguably incorrect to map such a memory to $dff/$mux cells. * If memory_map tries to lower a memory that was intended to be mapped to a large BRAM, it often takes extraordinarily long time to finish, produces an extremely large log file, and outputs an unusable design. After this commit, properly invoked memory_map will not map any memory that has an explicit inference attribute specified, solving the first issue, and alleviating the second. The default behavior is not changed.
| * memory_bram: add `attr_icase` option.whitequark2020-02-061-7/+35
| | | | | | | | | | Some vendor toolchains use case insensitive matching for values of attributes that control BRAM inference.
* | Merge pull request #1890 from boqwxp/cleanup_memory_collectN. Engelhardt2020-04-091-6/+3
|\ \ | | | | | | Clean up `passes/memory/memory_collect.cc`.
| * | Clean up `passes/memory/memory_collect.cc`.Alberto Gonzalez2020-04-091-6/+3
| | |
* | | Clean up `passes/memory/memory_unpack.cc`.Alberto Gonzalez2020-04-091-7/+6
|/ /
* | kernel: big fat patch to use more ID::*, otherwise ID(*)Eddie Hung2020-04-028-322/+322
| |
* | kernel: use more ID::*Eddie Hung2020-04-023-40/+40
| |
* | Merge pull request #1845 from YosysHQ/eddie/kernel_speedupEddie Hung2020-04-021-8/+8
|\ \ | | | | | | kernel: speedup by using more pass-by-const-ref
| * | kernel: SigSpec use more const& + overloads to prevent implicit SigSpecEddie Hung2020-03-131-8/+8
| |/
* | memory_share: fix stray braceEddie Hung2020-03-301-1/+0
| |
* | Code review fixesEddie Hung2020-03-301-2/+2
| |
* | Apply suggestions from code reviewEddie Hung2020-03-301-4/+1
| | | | | | Co-Authored-By: Alberto Gonzalez <61295559+boqwxp@users.noreply.github.com>
* | kernel: share a single CellTypes within a passEddie Hung2020-03-181-4/+16
|/
* CleanupEddie Hung2019-12-171-11/+7
|
* Enforce non-existenceEddie Hung2019-12-161-0/+4
|
* Update docEddie Hung2019-12-161-4/+6
|
* More sloppiness, thanks @dh73 for spottingEddie Hung2019-12-161-4/+4
|
* OopsEddie Hung2019-12-161-4/+1
|
* Implement 'attributes' grammarEddie Hung2019-12-161-80/+88
|
* Fixing compiler warning/issues. Moving test script to the correct placeDiego H2019-12-161-8/+8
|
* Merging attribute rules into a single match block; Adding testsDiego H2019-12-151-68/+80
|
* Refactoring memory attribute matching based on IEEE 1364.1 and Tool specificDiego H2019-12-131-0/+77
|
* Merge pull request #1501 from YosysHQ/dave/mem_copy_attrClifford Wolf2019-11-271-0/+4
|\ | | | | memory_collect: Copy attr from RTLIL::Memory to cell
| * memory_collect: Copy attr from RTLIL::Memory to cellDavid Shah2019-11-181-0/+4
| | | | | | | | Signed-off-by: David Shah <dave@ds0.me>
* | Add "opt_mem" passClifford Wolf2019-11-221-0/+2
|/ | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>
* stoi -> atoiEddie Hung2019-08-071-4/+4
|
* Use std::stoi instead of atoi(<str>.c_str())Eddie Hung2019-08-061-4/+4
|
* Use State::S{0,1}Eddie Hung2019-08-062-6/+6
|
* Make liberal use of IdString.in()Eddie Hung2019-08-062-4/+4
|
* Error out if enable > dbitsEddie Hung2019-07-131-0/+4
|
* memory_dff: Fix checking of feedback mux input when more than one muxDavid Shah2019-07-021-3/+5
| | | | Signed-off-by: David Shah <dave@ds0.me>
* Fix spacingEddie Hung2019-06-251-4/+3
|
* Move only one consumer check outside of while loopEddie Hung2019-06-251-6/+5
|
* Walk through as many muxes as exist for rd_enEddie Hung2019-06-241-8/+16
|
* memory_bram: Fix multiport make_transpDavid Shah2019-04-071-1/+2
| | | | Signed-off-by: David Shah <dave@ds0.me>
* memory_bram: Consider read enable for address expansion registerDavid Shah2019-04-021-0/+2
| | | | Signed-off-by: David Shah <dave@ds0.me>
* memory_bram: Reset make_transp when growing read portsDavid Shah2019-03-271-0/+1
| | | | Signed-off-by: David Shah <dave@ds0.me>
* memory_bram: Fix multiclock make_transpDavid Shah2019-03-241-9/+16
| | | | Signed-off-by: David Shah <dave@ds0.me>
* memory_collect: do not truncate 'x from \INIT.whitequark2018-12-211-3/+0
| | | | | | | The semantics of an RTLIL constant that has less bits than its declared bit width is zero padding. Therefore, if the output of memory_collect will be used for simulation, truncating 'x from the end of \INIT will produce incorrect simulation results.
* memory_dff: Fix typo when checking init valueDavid Shah2018-12-181-1/+1
| | | | Signed-off-by: David Shah <davey1576@gmail.com>
* memory_bram: Fix initdata bit order after shufflingGraham Edgecombe2018-12-111-0/+17
| | | | | | | | | | | | | In some cases the memory_bram pass shuffles the order of the bits in a memory's RD_DATA port. Although the order of the bits in the WR_DATA and WR_EN ports is changed to match the RD_DATA port, the order of the bits in the initialization data is not. This causes reads of initialized memories to return invalid data (until the initialization data is overwritten). This commit fixes the bug by shuffling the initdata bits in exactly the same order as the RD_DATA/WR_DATA/WR_EN bits.
* memory_bram: Reset make_outreg when growing read portsDavid Shah2018-10-191-0/+1
| | | | Signed-off-by: David Shah <dave@ds0.me>
* Consistent use of 'override' for virtual methods in derived classes.Henner Zeller2018-07-209-18/+18
| | | | | | | | | o Not all derived methods were marked 'override', but it is a great feature of C++11 that we should make use of. o While at it: touched header files got a -*- c++ -*- for emacs to provide support for that language. o use YS_OVERRIDE for all override keywords (though we should probably use the plain keyword going forward now that C++11 is established)
* Disable memory_dff for initialized FFsClifford Wolf2018-05-281-1/+19
| | | | Signed-off-by: Clifford Wolf <clifford@clifford.at>