pulp-platform / tech_cells_generic

Technology dependent cells instantiated in the design for generic process (simulation, FPGA)
Other
28 stars 29 forks source link

`tc_sram`: Remove `'X` initialization for `SimInit = "none"` #19

Open micprog opened 2 years ago

micprog commented 2 years ago

This removes any form of initialization for the sram simulation in case the default "none" is set for SimInit. This allows for memory initialization from a tb by hierarchically accessing the module in an initial block, as is done in HERO, see also https://github.com/pulp-platform/hero/commit/c88efca6c5ba6666e9a949956a3020c2bea962ef. In case this is not done, the default behavior should not change drastically, as the initial value will still be 'X, however will not be reset on rst_ni. If the current behavior is desired, a value other than "none", "zeros", "ones", or "random" should be set for SimInit.

meggiman commented 2 years ago

It looks to me like this PR is implementing the same behavior as #23. However, having the if condition within the always_ff block makes the tc_sram no longer synthesizable nor verilatable. Right?